Name | |
---|---|
MamaFieldCacheProperties(int hashSize) | |
MamaFieldCacheProperties() | |
MamaFieldCacheProperties(MamaFieldCacheProperties source) | |
void | clear() |
void | clearAndDelete() |
void | add(MamaFieldCacheField field) |
void | addIfModified(MamaFieldCacheField field) |
void | clearAndUnregisterAll() |
void | registerProperty(int fid, MamaFieldCacheField field) |
boolean | apply(MamaMsgField value) |
MamaFieldCacheField | find(String name) |
MamaFieldCacheField | find(int fid) |
MamaFieldCacheField | find(MamaFieldDescriptor desc) |
int | size() |
boolean | empty() |
Iterator | getIterator() |
void | registerProperties(int[] fids, MamaDictionary theDictionary) |
void | apply(MamaFieldCacheFieldList fields) |
void | dump() |
void | dump(OutputStream outputStream) |
class com::wombat::mama::MamaFieldCacheProperties;
The MamaFieldCacheProperties class is used for MamdaOrderBookProperties.
This class maintains a collection of MamaFieldCacheField objects mapped to fids. A field will only be added to or updated in the cache if its fid matches a fid previously registed with the registerField
method.
inline MamaFieldCacheProperties(
int hashSize
)
inline MamaFieldCacheProperties()
inline MamaFieldCacheProperties(
MamaFieldCacheProperties source
)
inline void clear()
This method clears the fields but does not unregister the properteis.
inline void clearAndDelete()
inline void add(
MamaFieldCacheField field
)
Parameters:
Add a field to the cache. If it is not already a property it will be added with its fid.
inline void addIfModified(
MamaFieldCacheField field
)
Parameters:
Add a field to the cache. If it is not already a property it will be added with its fid. The field only gets added if the supplied field is modified.
inline void clearAndUnregisterAll()
Clear the cache and unregister all the properties.
inline void registerProperty(
int fid,
MamaFieldCacheField field
)
Parameters:
Adds a property. The MamaFieldCacheField will not appear in iterations until an [apply()](classcom_1_1wombat_1_1mama_1_1MamaFieldCacheProperties.html#function-apply)
for that field occurs.
inline boolean apply(
MamaMsgField value
)
Parameters:
Return: true if a the field was found and updated.
Apply the field to the cache. If the field does not exist as a property the cache does not change.
inline MamaFieldCacheField find(
String name
)
Parameters:
Return: The field or null.
Find a field by name. This is less efficient than find by Fid or field descriptor.
inline MamaFieldCacheField find(
int fid
)
Parameters:
Return: the field or null.
Find a field by fid.
inline MamaFieldCacheField find(
MamaFieldDescriptor desc
)
Parameters:
Return: the field or null.
Find by field descriptor. This method uses the fid from the descriptor.
inline int size()
Return: the size.
Return the number of properties in the cache.
inline boolean empty()
Return: true if the cache contains no properties.
Return true if the cache is empty.
inline Iterator getIterator()
Return: the iterator.
Returns an iterator that only iterates over the properties that have had values applied.
inline void registerProperties(
int[] fids,
MamaDictionary theDictionary
)
inline void apply(
MamaFieldCacheFieldList fields
)
Parameters:
Apply all the fields in the supplied list for which there are properties.
inline void dump()
Dump the order book to standard out.
inline void dump(
OutputStream outputStream
)
Parameters:
OutputStream
Dump the properties to an OutputStream
.
Updated on 2023-03-31 at 15:29:42 +0100