10.27.03

ICacheSessionSendCacheRequest(Int64, ITopic, Boolean, CacheLiveDataAction, EventHandlerCacheRequestEventArgs) Method

Asynchronous cache request, returns immediately upon successful buffering of the cache request for transmission. The result of the request is reported through the cacheRequestListener.

Note: Cache requests may be flow controlled if the underlying transport is flow controlled. The transport is considered flow controlled if the library is unable to write to transport device (for example, the TCP socket is full), or if there are more than 1000 session requests (ICacheSession.SendCacheRequest(...) + ISession.SendRequest(...)) outstanding. This will cause ICacheSession.SendCacheRequest(...) to block if the session property, SendBlocking is enabled. If SendBlocking is disabled and it is not possible to write the cache request to the underlying transport, SOLCLIENT_WOULD_BLOCK is returned.

Cached messages received in response to the cache request are delivered to the application through the usual receive message callback delegate as the messages arrive.

Definition

Namespace: SolaceSystems.Solclient.Messaging.Cache
Assembly: SolaceSystems.Solclient.Messaging (in SolaceSystems.Solclient.Messaging.dll) Version: 10.27.0
C#
ReturnCode SendCacheRequest(
	long requestId,
	ITopic topic,
	bool subscribe,
	CacheLiveDataAction liveDataAction,
	EventHandler<CacheRequestEventArgs> cacheRequestListener
)

Parameters

requestId  Int64
A positive Int64 that is returned to the application in the cache request response and is available in every cached message returned.
topic  ITopic
An ITopic instance representing the topic being requested from the cache.
subscribe  Boolean
If true, send a subscription request to the appliance before sending a cache request to the cache.
liveDataAction  CacheLiveDataAction
One of CacheLiveDataAction
cacheRequestListener  EventHandlerCacheRequestEventArgs
Delegate for cache request completion

Return Value

ReturnCode
SOLCLIENT_IN_PROGRESS, if buffering of the request was successful; SOLCLIENT_NOT_READY, if the underlying session is being connected or is disconnected

Exceptions

OperationErrorException Thrown when the operation fails, see ErrorInfo for specific failure reason
ObjectDisposedException Thrown when the session is already disposed (terminal state).
FatalErrorException Thrown when an unrecoverable error occurs.
ArgumentNullException If any of the required arguments is null.
ArgumentOutOfRangeException If any of the arguments is out of range.

See Also