Classes Files

com::wombat::mamda::orderbook::MamdaOrderBookEntryManager

Public Functions

  Name
  MamdaOrderBookEntryManager(int approxCount)
void clear()
void clear(String symbol)
void addEntry(MamdaOrderBookEntry entry)
void addEntry(MamdaOrderBookEntry entry, String entryId)
MamdaOrderBookEntry findEntry(String entryId, boolean mustExist)
void removeEntry(String entryId)

Public Functions Documentation

function MamdaOrderBookEntryManager

inline MamdaOrderBookEntryManager(
    int approxCount
)

Parameters:

  • approxCount Approximate number of entries.

Default constructor. Create an empty order book entry manager.

function clear

inline void clear()

Clear all entries from the manager.

function clear

inline void clear(
    String symbol
)

Parameters:

  • symbol the symbol.

Clear all entries for a particular symbol from the manager.

function addEntry

inline void addEntry(
    MamdaOrderBookEntry entry
)

Parameters:

  • entry the entry to add.

Add an entry to the manager. This method may throw a MamdaOrderBookDuplicateEntry exception.

function addEntry

inline void addEntry(
    MamdaOrderBookEntry entry,
    String entryId
)

Parameters:

  • entry the entry to add.
  • entryId the entry id to use.

Add an entry to the manager using a specific entry ID, which may be different from the entry’s entry ID. This method may throw a MamdaOrderBookDuplicateEntry exception.

function findEntry

inline MamdaOrderBookEntry findEntry(
    String entryId,
    boolean mustExist
)

Parameters:

  • entryId The entry id to search for.
  • mustExist true if the entry must exist.

Return: the entry if found.

Find an entry in the manager. If no entry matches the unique entry ID and “mustExist” is true then a MamdaOrderBookMissingEntryException exception is thrown, otherwise it returns NULL.

function removeEntry

inline void removeEntry(
    String entryId
)

Parameters:

  • entryId the id for the entry to be removed.

Remove an entry from the manager. This method does not actually delete the MamdaOrderBookEntry object itself.


Updated on 2023-03-31 at 15:30:38 +0100