Options
All
  • Public
  • Public/Protected
  • All
Menu

Abstracted data store access interface

In general, you will be accessing an archivist instance through a state object:

state.archivist.set('player', { userId: userId }, { name: 'someone' });

Hierarchy

  • Archivist

Index

Methods

add

  • Add a new topic value by index.

    Note that if the index already exists, this call will return an error. Use set instead if you wish to write the value regardless of whether it already exists.

    memberof

    Archivist

    Type parameters

    • T

    Parameters

    Returns void

clearCache

  • clearCache(): void
  • Clear all the loaded entries from this archivist instance

    Note that this will not clear mutated entries; please use reset() if you wish to clear all data instead.

    memberof

    Archivist

    Returns void

del

  • Delete a topic by index.

    memberof

    Archivist

    Parameters

    Returns void

distribute

exists

get

getValue

list

  • Search the backend vault for matching indexes, and return them

    In this case, the index can be partial; for instance, { userId: 1 }, would match all the following indexes:

    { userId: 1, somethingElse: 'hi'}
    { userId: 1, somethingElse: 'hello'}
    

    Note that this API returns the list of matching indexes, not the data they hold; please see scan() if you wish to retrieve the data instead.

    memberof

    Archivist

    Parameters

    Returns void

  • Parameters

    Returns void

mget

mgetValues

reset

  • reset(): void
  • Reset the instance; remove all operations that are currently scheduled on the instance

    memberof

    Archivist

    Returns void

scan

  • Scan the backend vault for entries matching a given partial index.

    In this case, the index can be partial; for instance, { userId: 1 }, would match all the following indexes:

    { userId: 1, somethingElse: 'hi'}
    { userId: 1, somethingElse: 'hello'}
    
    memberof

    Archivist

    Type parameters

    • T

    Parameters

    Returns void

  • Type parameters

    • T

    Parameters

    Returns void

set

touch

  • touch(topicName: string, index: IArchivistIndex, expirationTime?: number): void
  • Touch a topic

    Used to reset the expiration timer.

    memberof

    Archivist

    Parameters

    Returns void