Description

The options for the realtime store.

Example

// @input Asset.ConnectedLensModule connectedLensModule

var options = ConnectedLensSessionOptions.create();
script.connectedLensModule.createSession(options)

var initialStore = GeneralDataStore.create();
initialStore.putInt('state', 1);

var options = RealtimeStoreCreateOptions.create();
options.ownership = RealtimeStoreCreateOptions.Ownership.Unowned;
options.persistence = RealtimeStoreCreateOptions.Persistence.Session;
options.initialStore = initialStore;

session.createRealtimeStore(options,
function onSuccess(store) {
print('Store created! In On connected');

},
function onError(message) {
print('Unable to create a store: ' + message)
}
)
interface RealtimeStoreCreateOptions {
    allowOwnershipTakeOver: boolean;
    initialStore: GeneralDataStore;
    ownership: Ownership;
    persistence: Persistence;
    storeId: string;
    getTypeName(): string;
    isOfType(type): boolean;
    isSame(other): boolean;
}

Hierarchy (view full)

Properties

allowOwnershipTakeOver: boolean
initialStore: GeneralDataStore

Description

An existing store to be used as the initial values for the real time store.

ownership: Ownership

Description

The ownership model for the realtime store.

persistence: Persistence

Description

The persistence model for the realtime store.

storeId: string

Description

Writes an id string to the store that can be used to identify it later.

Methods

  • Returns string

    Description

    Returns the name of this object's type.

  • Parameters

    • type: string

    Returns boolean

    Description

    Returns true if the object matches or derives from the passed in type.

  • Parameters

    Returns boolean

    Description

    Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

Generated using TypeDoc