public class CacheSessionProperties extends Object implements Cloneable
Name | Default | Description |
---|---|---|
cacheName | The name of the cache to send the request to. | |
maxMsgsPerTopic | 1 | The maximum number of messages per Topic. 0 means no restriction on number of messages. Valid values [0 - Integer.MAX_VALUE]. |
maxMsgAge | 0 | The maximum message age (in seconds). 0 means no restriction on age. Valid values [0 - Integer.MAX_VALUE]. |
timeout | 10000 | The timeout for a cache request (in milliseconds).
Valid values [3000 - Integer.MAX_VALUE]. This is a protocol timer
used internally by the API on each message exchange with solCache. A single
call to CacheSession.sendCacheRequest(Long, Topic, boolean, CacheLiveDataAction) may lead to many
request-reply exchanges with solCache and so is not bounded by this timer as
long as each internal request is satisfied in time. |
deliverEvtsThruBlockingRecv | false | If set to True, deliver a cache request complete event through the API's synchronous receive interface. |
Modifier and Type | Field and Description |
---|---|
static String |
CachePrefix |
Constructor and Description |
---|
CacheSessionProperties(String cacheName)
Create CacheProperties with default values of:
Maximum messages per topic = 1,
Maximum message age in seconds = 0,
Timeout for a cache request = 10000.
|
CacheSessionProperties(String cacheName,
int maxMsgsPerTopic,
int maxMsgAge,
int timeout)
Create CacheProperties.
|
CacheSessionProperties(String cacheName,
int maxMsgsPerTopic,
int maxMsgAge,
int timeout,
boolean deliverEvtsThruBlockingRecv)
Create CacheProperties.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
boolean |
deliverEvtsThruBlockingRecv()
Gets whether the cache request complete event will be delivered
through the API's synchronous receive interface.
|
boolean |
equals(Object obj) |
String |
getCacheName()
Gets the cache name of the cache to send the request to.
|
Topic |
getCacheTopic()
Gets the Topic for the cache request.
|
int |
getMaxAge()
Gets the maximum message age (in seconds).
|
int |
getMaxMsgs()
Gets the maximum messages per Topic.
|
int |
getTimeout()
Gets the timeout for a cache request (in milliseconds).
|
int |
hashCode() |
void |
setCacheName(String cacheName)
Sets the cache name of the cache to send the request to.
|
void |
setDeliverEvtsThruBlockingRecv(boolean deliverEvtsThruBlockingRecv)
Sets whether to deliver a cache request complete event
through the API's synchronous receive interface.
|
void |
setMaxAge(int maxMsgAge)
Sets the maximum message age (in seconds).
|
void |
setMaxMsgs(int maxMsgsPerTopic)
Sets the maximum messages per Topic.
|
void |
setTimeout(int timeout)
Sets the timeout for a cache request (in milliseconds).
|
String |
toString() |
public static final String CachePrefix
public CacheSessionProperties(String cacheName)
cacheName
- parameterpublic CacheSessionProperties(String cacheName, int maxMsgsPerTopic, int maxMsgAge, int timeout)
cacheName
- The name of the cache to send the request to.maxMsgsPerTopic
- Maximum messages per Topic. 0 means no restriction on number of messages.
Valid values [0 - Integer.MAX_VALUE].maxMsgAge
- The maximum message age (in seconds). 0 means no restriction on age.
Valid values [0 - Integer.MAX_VALUE].timeout
- The timeout for a cache request (in milliseconds).
Valid values [3000 - Integer.MAX_VALUE].public CacheSessionProperties(String cacheName, int maxMsgsPerTopic, int maxMsgAge, int timeout, boolean deliverEvtsThruBlockingRecv)
cacheName
- The name of the cache to send the request to.maxMsgsPerTopic
- The maximum number of messages per Topic. 0 means no restriction on number of messages.
Valid values [0 - Integer.MAX_VALUE].maxMsgAge
- The maximum message age (in seconds). 0 means no restriction on age.
Valid values [0 - Integer.MAX_VALUE].timeout
- The timeout for a cache request (in milliseconds).
Valid values [3000 - Integer.MAX_VALUE].deliverEvtsThruBlockingRecv
- If set to True, deliver a cache request complete event
through the API's synchronous receive interface.public int getMaxAge()
public void setMaxAge(int maxMsgAge)
maxMsgAge
- The maximum message age (in seconds). 0 means no restriction on age.public int getMaxMsgs()
public void setMaxMsgs(int maxMsgsPerTopic)
maxMsgsPerTopic
- Maximum messages per topic. 0 means no restriction on number of messages.public String getCacheName()
public void setCacheName(String cacheName)
cacheName
- The cache name of the cache to send the request to.public Topic getCacheTopic()
public int getTimeout()
public void setTimeout(int timeout)
This is a protocol timer
used internally by the API on each message exchange with solCache. A single
call to CacheSession.sendCacheRequest(Long, Topic, boolean, CacheLiveDataAction)
may lead to many
request-reply exchanges with solCache and so is not bounded by this timer as
long as each internal request is satisfied in time.
timeout
- The timeout for a cache request (in milliseconds).public boolean deliverEvtsThruBlockingRecv()
public void setDeliverEvtsThruBlockingRecv(boolean deliverEvtsThruBlockingRecv)
deliverEvtsThruBlockingRecv
- True to send cache request complete events
through the receive()
api.Copyright 2004-2024 Solace Corporation. All rights reserved.