C# Class DeltaDNA.EventStore

The Event Store queues game events until they are ready to be sent to Collect. It is a double buffer queue, events are written to one queue whilst being read from another. Mostly files are used to hold the events as UTF8 json strings. For platforms that don't support filesystem, such as Webplayer in memory files are used instead.
Inheritance: IDisposable
Afficher le fichier Open project: deltaDNA/unity-sdk

Méthodes publiques

Méthode Description
ClearAll ( ) : void

Clears both in and out buffers.

ClearOut ( ) : void

Clears the out buffer.

ClearStream ( Stream stream ) : void
Dispose ( ) : void
EventStore ( string dir ) : System

Initializes a new instance of the DeltaDNA.EventStore class.

FlushBuffers ( ) : void

Flushs the buffers to disk.

Push ( string obj ) : bool

Add a new event to the in buffer.

PushEvent ( string obj, Stream stream ) : bool
Read ( ) : List

Reads events from the out buffer.

ReadEvents ( Stream stream, IList events ) : void
Swap ( ) : bool

Swap the in and out buffers over.

SwapStreams ( Stream &sin, Stream &sout ) : void

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Private Methods

Méthode Description
InitialiseFileStreams ( string dir ) : bool

Method Details

ClearAll() public méthode

Clears both in and out buffers.
public ClearAll ( ) : void
Résultat void

ClearOut() public méthode

Clears the out buffer.
public ClearOut ( ) : void
Résultat void

ClearStream() public static méthode

public static ClearStream ( Stream stream ) : void
stream Stream
Résultat void

Dispose() public méthode

public Dispose ( ) : void
Résultat void

Dispose() protected méthode

protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

EventStore() public méthode

Initializes a new instance of the DeltaDNA.EventStore class.
public EventStore ( string dir ) : System
dir string Full path on the filesystem where to create the files.
Résultat System

FlushBuffers() public méthode

Flushs the buffers to disk.
public FlushBuffers ( ) : void
Résultat void

Push() public méthode

Add a new event to the in buffer.
public Push ( string obj ) : bool
obj string
Résultat bool

PushEvent() public static méthode

public static PushEvent ( string obj, Stream stream ) : bool
obj string
stream Stream
Résultat bool

Read() public méthode

Reads events from the out buffer.
public Read ( ) : List
Résultat List

ReadEvents() public static méthode

public static ReadEvents ( Stream stream, IList events ) : void
stream Stream
events IList
Résultat void

Swap() public méthode

Swap the in and out buffers over.
public Swap ( ) : bool
Résultat bool

SwapStreams() public static méthode

public static SwapStreams ( Stream &sin, Stream &sout ) : void
sin Stream
sout Stream
Résultat void