C# Класс 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.
Наследование: IDisposable
Показать файл Открыть проект

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Приватные методы

Метод Описание
InitialiseFileStreams ( string dir ) : bool

Описание методов

ClearAll() публичный Метод

Clears both in and out buffers.
public ClearAll ( ) : void
Результат void

ClearOut() публичный Метод

Clears the out buffer.
public ClearOut ( ) : void
Результат void

ClearStream() публичный статический Метод

public static ClearStream ( Stream stream ) : void
stream Stream
Результат void

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

protected Dispose ( bool disposing ) : void
disposing bool
Результат void

EventStore() публичный Метод

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.
Результат System

FlushBuffers() публичный Метод

Flushs the buffers to disk.
public FlushBuffers ( ) : void
Результат void

Push() публичный Метод

Add a new event to the in buffer.
public Push ( string obj ) : bool
obj string
Результат bool

PushEvent() публичный статический Метод

public static PushEvent ( string obj, Stream stream ) : bool
obj string
stream Stream
Результат bool

Read() публичный Метод

Reads events from the out buffer.
public Read ( ) : List
Результат List

ReadEvents() публичный статический Метод

public static ReadEvents ( Stream stream, IList events ) : void
stream Stream
events IList
Результат void

Swap() публичный Метод

Swap the in and out buffers over.
public Swap ( ) : bool
Результат bool

SwapStreams() публичный статический Метод

public static SwapStreams ( Stream &sin, Stream &sout ) : void
sin Stream
sout Stream
Результат void