DataStructureManager

DataStructureManager

This class contains methods and parameters for Distributed Datastructure


Constructor

# new DataStructureManager()

Methods

# (async) createCounter(key, attributes, initialValue, options) → {Counter}

create counter datastructure

Parameters:
Name Type Default Description
key String

key that will used for counter in cache

attributes DataStructureAttributes null

attributes that will be set for counter based data structure

initialValue long

indicates the inialization value

options WriteThruOptions

write through options that will be set for counter based data structure

Returns:
Type
Counter

# (async) createList(key, cls, attributes, options) → {DistributedList.<T>}

create list datastructure

Parameters:
Name Type Default Description
key String

key that will used for list in cache

cls JsonDataType

data type for data stored in list

attributes DataStructureAttributes null

attributes that will be set for list based data structure

options WriteThruOptions null

write through options that will be set for list based data structure

Returns:
Type
DistributedList.<T>

# (async) createQueue(key, cls, attributes, options) → {DistributedQueue.<T>}

create queue data structure

Parameters:
Name Type Default Description
key String

key that will used for queue in cache

cls JsonDataType

data type for data stored in queue

attributes DataStructureAttributes null

attributes that will be set for queue based data structure

options WriteThruOptions null

write through options that will be set for queue based data structure

Returns:
Type
DistributedQueue.<T>

# getCache() → {Cache}

returns the connected cache

Returns:
Type
Cache

# (async) getCounter(key, options) → {Counter}

Parameters:
Name Type Default Description
key String

key against which counter will be searched in cache

options ReadThruOptions null

indicates read thru options

Returns:
Type
Counter

# (async) getList(key, cls, options) → {DistributedList.<T>}

Parameters:
Name Type Default Description
key String

key against which list will be searched in cache

cls JsonDataType

indicates type for json data conversion for value stored in list

options ReadThruOptions null

indicates read thru options

Returns:
Type
DistributedList.<T>

# (async) getQueue(key, cls, options) → {DistributedQueue.<T>}

Parameters:
Name Type Default Description
key String

key against which queue will be searched in cache

cls JsonDataType

indicates type for json data conversion for value stored in queue

options ReadThruOptions null

indicates read thru options

Returns:
Type
DistributedQueue.<T>

# (async) remove(key, options)

remove data structure from cache on given key

Parameters:
Name Type Default Description
key String

key against which queue will be searched in cache

options WriteThruOptions null

write thru options for data removal

# setCache(value)

set cache

Parameters:
Name Type Description
value cache

cache instance