Skip to main content

@terascope/teraslice-state-storage / elasticsearch-state-storage / default

Class: default

Constructors

new default()

new default(client, logger, config): default

Parameters

ParameterType
clientClient
loggerLogger
configESStateStorageConfig

Returns

default

Source

elasticsearch-state-storage/index.ts:22

Properties

cache

cache: default<DataEntity<Record<string, any>, _DataEntityMetadata<Record<string, any>>>>

Source

elasticsearch-state-storage/index.ts:20

Methods

count()

count(): number

Returns

number

Source

elasticsearch-state-storage/index.ts:41


get()

get(doc): Promise<undefined | DataEntity<Record<string, any>, _DataEntityMetadata<Record<string, any>>>>

Parameters

ParameterType
docDataEntity<Record<string, any>, _DataEntityMetadata<Record<string, any>>>

Returns

Promise<undefined | DataEntity<Record<string, any>, _DataEntityMetadata<Record<string, any>>>>

Source

elasticsearch-state-storage/index.ts:99


getFromCache()

getFromCache(doc): undefined | DataEntity<Record<string, any>, _DataEntityMetadata<Record<string, any>>>

Parameters

ParameterType
docDataEntity<Record<string, any>, _DataEntityMetadata<Record<string, any>>>

Returns

undefined | DataEntity<Record<string, any>, _DataEntityMetadata<Record<string, any>>>

Source

elasticsearch-state-storage/index.ts:81


getFromCacheByKey()

getFromCacheByKey(key): undefined | DataEntity<Record<string, any>, _DataEntityMetadata<Record<string, any>>>

Parameters

ParameterType
keystring | number

Returns

undefined | DataEntity<Record<string, any>, _DataEntityMetadata<Record<string, any>>>

Source

elasticsearch-state-storage/index.ts:86


getIdentifier()

getIdentifier(doc, metaField): string

Parameters

ParameterType
docDataEntity<Record<string, any>, _DataEntityMetadata<Record<string, any>>>
metaFieldstring

Returns

string

Source

elasticsearch-state-storage/index.ts:45


initialize()

initialize(): Promise<void>

Returns

Promise<void>

Source

elasticsearch-state-storage/index.ts:35


isCached()

isCached(doc): boolean

Parameters

ParameterType
docDataEntity<Record<string, any>, _DataEntityMetadata<Record<string, any>>>

Returns

boolean

Source

elasticsearch-state-storage/index.ts:90


isKeyCached()

isKeyCached(key): boolean

Parameters

ParameterType
keystring | number

Returns

boolean

Source

elasticsearch-state-storage/index.ts:95


mget()

mget(docArray): Promise<MGetCacheResponse>

Parameters

ParameterType
docArrayDataEntity<Record<string, any>, _DataEntityMetadata<Record<string, any>>>[]

Returns

Promise<MGetCacheResponse>

Source

elasticsearch-state-storage/index.ts:107


mset()

mset(docArray): Promise<void>

Parameters

ParameterType
docArrayDataEntity<Record<string, any>, _DataEntityMetadata<Record<string, any>>>[]

Returns

Promise<void>

Source

elasticsearch-state-storage/index.ts:57


set()

set(doc): void

Parameters

ParameterType
docDataEntity<Record<string, any>, _DataEntityMetadata<Record<string, any>>>

Returns

void

Source

elasticsearch-state-storage/index.ts:71


setCacheByKey()

setCacheByKey(key, doc): void

Parameters

ParameterType
keystring | number
docDataEntity<Record<string, any>, _DataEntityMetadata<Record<string, any>>>

Returns

void

Source

elasticsearch-state-storage/index.ts:77


shutdown()

shutdown(): Promise<void>

Returns

Promise<void>

Source

elasticsearch-state-storage/index.ts:37