# Class InMemoryPreferenceStore

In-memory preference data store implementation.

#### Implements

- IPreferenceDataStore

- Defined in packages/nexus-agents/src/cli-adapters/preference-router-store.ts:21

##### Index

### Constructors

constructor

### Methods

store
getAll
getByDomain
findSimilar
getStats
clear

## Constructors

### constructor

- new InMemoryPreferenceStore(maxSize?: number): InMemoryPreferenceStore

  #### Parameters

  - maxSize: number = 10000

  #### Returns InMemoryPreferenceStore

  - Defined in packages/nexus-agents/src/cli-adapters/preference-router-store.ts:25

## Methods

### store

- store(dataPoint: PreferenceDataPoint): void

  Store a new preference data point

  #### Parameters

  - dataPoint: PreferenceDataPoint

  #### Returns void

  Implementation of IPreferenceDataStore.store

  - Defined in packages/nexus-agents/src/cli-adapters/preference-router-store.ts:29

### getAll

- getAll(): readonly PreferenceDataPoint[]

  Get all data points

  #### Returns readonly PreferenceDataPoint[]

  Implementation of IPreferenceDataStore.getAll

  - Defined in packages/nexus-agents/src/cli-adapters/preference-router-store.ts:34

### getByDomain

- getByDomain(domain: string): readonly PreferenceDataPoint[]

  Get data points by domain

  #### Parameters

  - domain: string

  #### Returns readonly PreferenceDataPoint[]

  Implementation of IPreferenceDataStore.getByDomain

  - Defined in packages/nexus-agents/src/cli-adapters/preference-router-store.ts:38

### findSimilar

- findSimilar(
  features: QueryFeatures,
  limit: number,
  ): readonly PreferenceDataPoint[]

  Find similar data points based on features

  #### Parameters

  - features: QueryFeatures
  - limit: number

  #### Returns readonly PreferenceDataPoint[]

  Implementation of IPreferenceDataStore.findSimilar

  - Defined in packages/nexus-agents/src/cli-adapters/preference-router-store.ts:48

### getStats

- getStats(): PreferenceModelStats

  Get statistics

  #### Returns PreferenceModelStats

  Implementation of IPreferenceDataStore.getStats

  - Defined in packages/nexus-agents/src/cli-adapters/preference-router-store.ts:62

### clear

- clear(): void

  Clear all data

  #### Returns void

  Implementation of IPreferenceDataStore.clear

  - Defined in packages/nexus-agents/src/cli-adapters/preference-router-store.ts:84