## Contents

- Properties
- Methods

class solace.CacheSessionProperties

Encapsulates the properties of a cache session.

## Constructor Top

| CacheSessionProperties ( String cacheName, Number maxAgeSec, Number maxMessages, Number timeoutMsec ) |  |

## Properties Top

String | cacheName |  |
Number | maxAgeSec = `0` |  |
Number | maxMessages = `1` |  |
Number | timeoutMsec = `10000` |  |

## Methods Top

String | getCacheName ( ) |
Number | getMaxMessageAgeSec ( ) |
Number | getMaxMessages ( ) |
Number | getTimeoutMsec ( ) |
void | setCacheName ( String value ) |
void | setMaxMessageAgeSec ( Number value ) |
void | setMaxMessages ( Number value ) |
void | setTimeoutMsec ( Number value ) |

## Constructor details Top

###
CacheSessionProperties ( String cacheName, Number maxAgeSec, Number maxMessages, Number timeoutMsec )

Encapsulates the properties of a cache session.

#### Parameters

String | cacheName A property that specifies the cache name to which CacheSession operations should be sent.
Number | maxAgeSec = `0` The maximum allowable message age in seconds to deliver in response to a cache request. 0 means no restriction on age. (Optional)
Number | maxMessages = `1` The maximum number of messages per Topic to deliver in response to cache requests. 0 means no restriction on the number of messages. (Optional)
Number | timeoutMsec = `10000` The timeout period (in milliseconds) to wait for a response from the cache. This is a protocol timer used internally by the API on each message exchange with SolCache. A single call to solace.CacheSession#sendCacheRequest 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. The valid range for this property is >= 3000. (Optional)

## Properties Detail Top

###
public String cacheName

A property that specifies the cache name to which CacheSession operations should be sent.

###
public Number maxAgeSec = `0`

The maximum allowable message age in seconds to deliver in response to cache requests. 0 means no restriction on age.

###
public Number maxMessages = `1`

The maximum number of messages per Topic to deliver in response to cache requests. 0 means no restriction on the number of messages.

###
public Number timeoutMsec = `10000`

The timeout for a cache request, in milliseconds. The valid range for this property is >= 3000.

## Methods Detail Top

###
public String getCacheName ( )

Gets the cache name to which solace.CacheSession requests should be sent, for sessions constructed using these properties.

#### Return Value

String | The cache name.

###
public Number getMaxMessageAgeSec ( )

Gets the maximum allowable message age for messages to be delivered in response to a request made on a solace.CacheSession that was constructed using these properties. 0 means no restriction on age.

#### Return Value

Number | The maximum allowable message age to be returned by an associated {@link solace.CacheSession}, or 0 for no restriction.

###
public Number getMaxMessages ( )

Gets the maximum count of messages to be delivered, per solace.Destination, in response to a request issued on a solace.CacheSession constructed using these properties. 0 means no restriction on the number of messages.

#### Return Value

Number | The maximum number of messages per Topic to deliver, or 0 for no restriction.

###
public Number getTimeoutMsec ( )

Gets the timeout for requests issued on a solace.CacheSession constructed using these properties.

- The valid range is >= 3000.

#### Return Value

Number | The timeout, in milliseconds, for cache session requests.

###
public void setCacheName ( String value )

Sets the cache name to which requests should be sent. Cannot be null or blank.

#### Parameters

String | value The cache name to which requests should be sent.

#### Return Value

void |

###
public void setMaxMessageAgeSec ( Number value )

Sets the maximum allowable message age. 0 means no restriction on age.

#### Parameters

Number | value The maximum allowable message age, or 0 for no restriction.

#### Return Value

void |

###
public void setMaxMessages ( Number value )

Sets the maximum count of messages to be delivered per solace.Destination in response to a cache request. 0 means no restriction.

#### Parameters

Number | value The maximum count of messages to deliver, or 0 for no restriction.

#### Return Value

void |

###
public void setTimeoutMsec ( Number value )

Sets the timeout for requests.

- The valid range is >= 3000.

#### Parameters

Number | value The timeout for requests.

#### Return Value

void |