Classes Files

com::wombat::mamda::orderbook::MamdaOrderBookBasicDeltaList

More…

Inherited by com.wombat.mamda.orderbook.MamdaOrderBookComplexDelta

Public Functions

  Name
  MamdaOrderBookBasicDeltaList()
void clear()
void setKeepBasicDeltas(boolean keep)
int getModifiedSides()
void add(MamdaOrderBookEntry entry, MamdaOrderBookPriceLevel level, double plDeltaSize, char plAction, char entryAction)
MamdaOrderBook getOrderBook()
long getSize()
void dump(OutputStream output)
void dump()
Iterator iterator()

Public Attributes

  Name
final int MOD_SIDES_NONE
final int MOD_SIDES_BID
final int MOD_SIDES_ASK
final int MOD_SIDES_BID_AND_ASK

Detailed Description

class com::wombat::mamda::orderbook::MamdaOrderBookBasicDeltaList;

MamdaOrderBookBasicDeltaList is a class that saves information about an order book delta that involves multiple entries and/or price levels. For example, a modified order may involve a price change that means moving an entry from one price level to another. A delta list is made up of several basic deltas, which can be iterated over by methods provided in the class.

Public Functions Documentation

function MamdaOrderBookBasicDeltaList

inline MamdaOrderBookBasicDeltaList()

function clear

inline void clear()

Clear the delta.

function setKeepBasicDeltas

inline void setKeepBasicDeltas(
    boolean keep
)

Parameters:

  • keep true if to keep the basic deltas.

Set whether to actually keep the basic deltas. Many applications don’t need the basic deltas and will iterate over part or all of the full book (with the deltas already applied). If this is set to true and an attempt is made to iterate over the basic deltas (by calling begin() or end()) then a MamdaOrderBookException will be thrown.

function getModifiedSides

inline int getModifiedSides()

Return: The modified side(s).

Get which side(s) of the book have been modified by this complex update. This information may prevent the need for receivers of complex updates to iterate over one or other side of the book.

function add

inline void add(
    MamdaOrderBookEntry entry,
    MamdaOrderBookPriceLevel level,
    double plDeltaSize,
    char plAction,
    char entryAction
)

Parameters:

  • entry the entry.
  • level the level.
  • plDeltaSize the delta size.
  • plAction the price level action.
  • entryAction the entry action.

Add a basic delta. This method adds a MamdaOrderBookBasicDelta to the list.

function getOrderBook

inline MamdaOrderBook getOrderBook()

Return: The order book related to this delta.

Get the MamdaOrderBook object to which this delta belongs.

function getSize

inline long getSize()

Return: the number of deltas.

Return the number of simple deltas in this complex delta.

function dump

inline void dump(
    OutputStream output
)

Parameters:

  • output The OutputStream to write the update to.

Dump the complex update to the output stream.

function dump

inline void dump()

Dump the complex update to the output stream.

function iterator

inline Iterator iterator()

Public Attributes Documentation

variable MOD_SIDES_NONE

static final int MOD_SIDES_NONE = 0;

variable MOD_SIDES_BID

static final int MOD_SIDES_BID = 1;

variable MOD_SIDES_ASK

static final int MOD_SIDES_ASK = 2;

variable MOD_SIDES_BID_AND_ASK

static final int MOD_SIDES_BID_AND_ASK = 3;

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