Package com.wombat.mamda.orderbook
Class MamdaOrderBookEntryManager
- java.lang.Object
-
- com.wombat.mamda.orderbook.MamdaOrderBookEntryManager
-
public class MamdaOrderBookEntryManager extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description MamdaOrderBookEntryManager(int approxCount)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEntry(MamdaOrderBookEntry entry)
Add an entry to the manager.void
addEntry(MamdaOrderBookEntry entry, java.lang.String entryId)
Add an entry to the manager using a specific entry ID, which may be different from the entry's entry ID.void
clear()
Clear all entries from the manager.void
clear(java.lang.String symbol)
Clear all entries for a particular symbol from the manager.MamdaOrderBookEntry
findEntry(java.lang.String entryId, boolean mustExist)
Find an entry in the manager.void
removeEntry(java.lang.String entryId)
Remove an entry from the manager.
-
-
-
Method Detail
-
clear
public void clear()
Clear all entries from the manager.
-
clear
public void clear(java.lang.String symbol)
Clear all entries for a particular symbol from the manager.- Parameters:
symbol
- the symbol.
-
addEntry
public void addEntry(MamdaOrderBookEntry entry)
Add an entry to the manager. This method may throw a MamdaOrderBookDuplicateEntry exception.- Parameters:
entry
- the entry to add.
-
addEntry
public void addEntry(MamdaOrderBookEntry entry, java.lang.String entryId)
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.- Parameters:
entry
- the entry to add.entryId
- the entry id to use.
-
findEntry
public MamdaOrderBookEntry findEntry(java.lang.String entryId, boolean mustExist)
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.- Parameters:
entryId
- The entry id to search for.mustExist
- true if the entry must exist.- Returns:
- the entry if found.
-
removeEntry
public void removeEntry(java.lang.String entryId)
Remove an entry from the manager. This method does not actually delete the MamdaOrderBookEntry object itself.- Parameters:
entryId
- the id for the entry to be removed.
-
-