Name | |
---|---|
void | finalize() |
Name | |
---|---|
final int | DEFAULT_RETRIES |
final double | DEFAULT_TIMEOUT |
inline MamaSubscription()
The constructor allocates the underlying C subscription.
inline void createSubscription(
MamaSubscriptionCallback callback,
MamaQueue queue,
MamaSource source,
String symbol,
Object closure
)
Parameters:
Create and activate subscription. This is effectively a pair of calls to mamaSubscription_setup() and mamaSubscription_activate().
inline MamaDictionary createDictionarySubscription(
MamaDictionaryCallback callback,
MamaQueue queue,
MamaSource source
)
Parameters:
Create a dictionary subscription using default values for the timeout and number of retries.
inline MamaDictionary createDictionarySubscription(
MamaDictionaryCallback callback,
MamaQueue queue,
MamaSource source,
double timeout,
int retries
)
Parameters:
Create a dictionary subscription using default values for the timeout and number of retries.
inline void createSnapshotSubscription(
MamaSubscriptionCallback callback,
MamaQueue queue,
MamaSource source,
String symbol,
Object closure
)
Parameters:
Create a snapshot subscription for initial value only (no updates). This function is equivalent to mamaSubscription_create () with svcLevel set to MAMA_SERVICE_LEVEL_SNAPSHOT and default arguments for type, svcLevelOpt, requiresInitial, retries, timeout.
inline Object getClosure()
Return: The closure object.
This function returns the closure supplied to the createSubscription function.
inline long getPointerVal()
Return: The pointer.
This function returns the pointer to the underlying C subscription.
inline MamaSource getSource()
Return: The MamaSource object.
Return the source associated with the subscription.
inline MamaQueue getQueue()
Return: The MamaQueue object
Return the queue used for this subscription
inline MamaSubscriptionState getState()
Return: The MamaSubscriptionState that represents the current state of the subscription.
This function returns the current state of the subscription as one of the MamaSubscriptionState instances, see this class for more information.
inline void setupSubscription(
MamaSubscriptionCallback callback,
MamaQueue queue,
MamaSource source,
String symbol,
Object closure
)
Parameters:
Setup a basic subscription without marketdata semantics. Note that activate must still be called.
inline void setAppDataType(
MamaMdDataType type
)
inline MamaMdDataType getAppDataType()
inline void setDebugLevel(
Level level
)
inline void setMessageQualifierFilter(
MamaMsgQualifier qualifier
)
inline MamaMsgQualifier getMessageQualifierFilter()
inline void setSubscriptionType(
MamaSubscriptionType type
)
inline MamaSubscriptionType getSubscriptionType()
inline MamaTransport getTransport()
native void activate()
Activate a subscription that has been set up by calling MamaSubscription.setup. Subscription creation actually occurs on the throttle queue. An individual subscription cannot be assumed to be fully created until its onCreate() callback has been successfully invoked. The subscription rate can be governed via the MamaTransport.setOutboundThrottle () function. Any subscription properties should be set prior to calling this function.
native void deactivate()
Deactivate a subscription. The subscription can be reactivated if desired using MamaSubscription.activate(). Note that the subscription will not be fully deactivated until the onDestroy callback is received.
native void deallocate()
De-allocates the underlying C subscription. This can be used to reduce time during finalization.
native void destroy()
This function will destroy the subscription, it must be called from the same thread that is processing the queue for the subscription. Use destroyEx to destroy the subscription from any thread. Note that the subscription will not be fully destroyed until the onDestroy callback is received.
native void destroyEx()
This function will destroy the subscription and can be called from any thread. Note that the subscription will not be fully destroyed until the onDestroy callback is received. To destroy from the dispatching thread the destroy function should be used in preference.
native boolean getReceivedInitial()
Return: True if an initial has been received.
Get whether we have received an Initial.
native String getSubscSource()
Return: The source string.
Return the source for this subscription.
native String getSymbol()
Return: The symbol string.
Return the symbol for this subscription.
native double getTimeout()
Return: The timeout in seconds.
To return the subscription timeout.
native boolean isActive()
Return: whether the subscription is valid.
Returns whether the subscription is valid, note that this function has been deprecated, use mamaSubscription_getState instead.
native boolean isValid()
Return: whether the subscription is valid.
Returns whether the subscription is valid, note that this function has been deprecated, use mamaSubscription_getState instead.
native void setRequiresInitial(
boolean value
)
Parameters:
Set whether subscriptoin requires initial value.
native void setTimeout(
double timeout
)
Parameters:
Set the timeout for this subscription.
native Object getItemClosure()
native int getPreInitialCacheSize()
native boolean getRecoverGaps()
native boolean getRequiresInitital()
native int getRetries()
native short getServiceLevel()
native long getServiceLevelOptions()
native void setPreInitialCacheSize(
int size
)
native void setItemClosure(
Object closure
)
native void setRecoverGaps(
boolean recover
)
native void setServiceLevel(
short level,
long options
)
native void setRetries(
int retries
)
inline void finalize()
Exceptions:
The finalizer deallocates the underlying C subscription.
static final int DEFAULT_RETRIES = 2;
static final double DEFAULT_TIMEOUT = 10.0;
Updated on 2023-03-31 at 15:29:44 +0100