@terascope/teraslice-state-storage / elasticsearch-state-storage / default
Class: default
Constructors
new default()
new default(
client
,logger
,config
):default
Parameters
Parameter | Type |
---|---|
client | Client |
logger | Logger |
config | ESStateStorageConfig |
Returns
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
Parameter | Type |
---|---|
doc | DataEntity <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
Parameter | Type |
---|---|
doc | DataEntity <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
Parameter | Type |
---|---|
key | string | number |
Returns
undefined
| DataEntity
<Record
<string
, any
>, _DataEntityMetadata
<Record
<string
, any
>>>
Source
elasticsearch-state-storage/index.ts:86
getIdentifier()
getIdentifier(
doc
,metaField
):string
Parameters
Parameter | Type |
---|---|
doc | DataEntity <Record <string , any >, _DataEntityMetadata <Record <string , any >>> |
metaField | string |
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
Parameter | Type |
---|---|
doc | DataEntity <Record <string , any >, _DataEntityMetadata <Record <string , any >>> |
Returns
boolean
Source
elasticsearch-state-storage/index.ts:90
isKeyCached()
isKeyCached(
key
):boolean
Parameters
Parameter | Type |
---|---|
key | string | number |
Returns
boolean
Source
elasticsearch-state-storage/index.ts:95
mget()
mget(
docArray
):Promise
<MGetCacheResponse
>
Parameters
Parameter | Type |
---|---|
docArray | DataEntity <Record <string , any >, _DataEntityMetadata <Record <string , any >>>[] |
Returns
Promise
<MGetCacheResponse
>
Source
elasticsearch-state-storage/index.ts:107
mset()
mset(
docArray
):Promise
<void
>
Parameters
Parameter | Type |
---|---|
docArray | DataEntity <Record <string , any >, _DataEntityMetadata <Record <string , any >>>[] |
Returns
Promise
<void
>
Source
elasticsearch-state-storage/index.ts:57
set()
set(
doc
):void
Parameters
Parameter | Type |
---|---|
doc | DataEntity <Record <string , any >, _DataEntityMetadata <Record <string , any >>> |
Returns
void
Source
elasticsearch-state-storage/index.ts:71
setCacheByKey()
setCacheByKey(
key
,doc
):void
Parameters
Parameter | Type |
---|---|
key | string | number |
doc | DataEntity <Record <string , any >, _DataEntityMetadata <Record <string , any >>> |
Returns
void
Source
elasticsearch-state-storage/index.ts:77
shutdown()
shutdown():
Promise
<void
>
Returns
Promise
<void
>