VMware GemFire Java API Reference
Interface ClientSubscriptionConfig
-
public interface ClientSubscriptionConfigUsed to configure queuing on a cache server for client subscriptions.- For eviction-policy none client queue entries are not evicted to disk
- For eviction-policy mem client queue entries are evicted to disk when limit is reached, defined by capacity
- For eviction-policy entry HA entries are evicted to disk when limit is reached, defined by capacity
The capacity limits the total amount of memory or entries for all client queues on held on this server. If this server hosts multiple client queues, they will all share the same capacity.Configuration:
The
client queueis configurable declaratively or programmatically. Declarative configuration is achieved through defining the configuration parameters in acache.xmlfile. Programmatic configuration may be achieved by first instantiating aCacheServerobject and getCacheServer.getClientSubscriptionConfig()ClientSubscriptionConfigobject and modify each desired parameter and value.If you are using a
cache.xmlfile to create aCacheServerdeclaratively, you can do the following to configureClientSubscriptionConfigand to have none eviction policy no need to specify client-subscription tag as it is a default one.<cache-server port=4444> <client-subscription eviction-policy="entry | mem" capacity=35 overflow-directory="OverflowDir"></client-subscription> </cache-server>- Since:
- GemFire 5.7
- See Also:
getEvictionPolicy(),getCapacity()
- For eviction-policy none client queue entries are not evicted to disk
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_CAPACITYThe default limit that is assigned to client subscription.static java.lang.StringDEFAULT_EVICTION_POLICYThe default eviction policy that is assigned to client subscription.static java.lang.StringDEFAULT_OVERFLOW_DIRECTORYThe default overflow directory that is assigned to client subscription.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description intgetCapacity()Returns the capacity of the client queue.java.lang.StringgetDiskStoreName()get the diskStoreName for overflowjava.lang.StringgetEvictionPolicy()Returns the eviction policy that is executed when capacity of the client queue is reached.java.lang.StringgetOverflowDirectory()Deprecated.as of 6.5 usegetDiskStoreName()insteadvoidsetCapacity(int capacity)Sets the capacity of the client queue.voidsetDiskStoreName(java.lang.String diskStoreName)Sets the disk store name for overflowvoidsetEvictionPolicy(java.lang.String policy)Sets the eviction policy that is executed when capacity of the client queue is reached.voidsetOverflowDirectory(java.lang.String overflowDirectory)Deprecated.as of 6.5 usesetDiskStoreName(String)instead
-
-
-
Field Detail
-
DEFAULT_CAPACITY
static final int DEFAULT_CAPACITY
The default limit that is assigned to client subscription.- See Also:
- Constant Field Values
-
DEFAULT_EVICTION_POLICY
static final java.lang.String DEFAULT_EVICTION_POLICY
The default eviction policy that is assigned to client subscription.- See Also:
- Constant Field Values
-
DEFAULT_OVERFLOW_DIRECTORY
static final java.lang.String DEFAULT_OVERFLOW_DIRECTORY
The default overflow directory that is assigned to client subscription.- See Also:
- Constant Field Values
-
-
Method Detail
-
getCapacity
int getCapacity()
Returns the capacity of the client queue. will be in MB for eviction-policy mem else number of entries- Returns:
- the capacity of the client queue
- Since:
- GemFire 5.7
- See Also:
DEFAULT_CAPACITY
-
setCapacity
void setCapacity(int capacity)
Sets the capacity of the client queue. will be in MB for eviction-policy mem else number of entries- Parameters:
capacity- the capacity of the client queue- Since:
- GemFire 5.7
- See Also:
DEFAULT_CAPACITY
-
getEvictionPolicy
java.lang.String getEvictionPolicy()
Returns the eviction policy that is executed when capacity of the client queue is reached.- Returns:
- the eviction policy that is executed when capacity of the client queue is reached
- Since:
- GemFire 5.7
- See Also:
DEFAULT_EVICTION_POLICY
-
setEvictionPolicy
void setEvictionPolicy(java.lang.String policy)
Sets the eviction policy that is executed when capacity of the client queue is reached.- Parameters:
policy- the eviction policy that is executed when capacity of the client queue is reached- Since:
- GemFire 5.7
- See Also:
DEFAULT_EVICTION_POLICY
-
setOverflowDirectory
@Deprecated void setOverflowDirectory(java.lang.String overflowDirectory)
Deprecated.as of 6.5 usesetDiskStoreName(String)insteadSets the overflow directory for a client queue- Parameters:
overflowDirectory- the overflow directory for a client queue's overflowed entries- Since:
- GemFire 5.7
-
getOverflowDirectory
@Deprecated java.lang.String getOverflowDirectory()
Deprecated.as of 6.5 usegetDiskStoreName()insteadAnswers the overflow directory for a client queue's overflowed client queue entries.- Returns:
- the overflow directory for a client queue's overflowed entries
- Since:
- GemFire 5.7
-
setDiskStoreName
void setDiskStoreName(java.lang.String diskStoreName)
Sets the disk store name for overflow- Parameters:
diskStoreName- the disk store name for overflow- Since:
- GemFire 6.5
-
getDiskStoreName
java.lang.String getDiskStoreName()
get the diskStoreName for overflow- Returns:
- the diskStoreName for overflow
- Since:
- GemFire 6.5
-
-