com.alachisoft.jvcache.web.caching
Class CacheInitParams

java.lang.Object
  extended by com.alachisoft.jvcache.web.caching.CacheInitParams

public final class CacheInitParams
extends java.lang.Object

Holds the set of parameters that control the initialization behavior of the cache.


Constructor Summary
CacheInitParams()
           
 
Method Summary
 boolean getClientCacheStatus()
          Returns the current client Cache Enabled or disabled status
 ClientCacheSyncMode getClientCacheSyncMode()
           
 int getClientRequestTimeOut()
          * Clients operation timeout specified in seconds.
 int getConnectionRetries()
          * Get Number of tries to re-establish a broken connection between client and server.
 int getConnectionTimeout()
          * Get Client's connection timeout specified in seconds.
 boolean getIsBridgeClient()
           
 boolean getLoadBalance()
          When this flag is set, client tries to connect to the optimum server in terms of number of connected clients.
 CacheMode getMode()
           
 int getPort()
          * Gets the port on which the clients will connect to a server.
 SecurityParams getPrimaryUserCredentials()
          * Get the user-id and password for the primary cache user.
 int getRetryConnectionDelay()
          * Get Client's connection retry delay in seconds.
 int getRetryInterval()
          gets interval value between retry connection in seconds
 SecurityParams getSecondaryUserCredentials()
          * Get the user-id and password for the secondary cache user.
 java.lang.String getServer()
           
 void Initialize(java.lang.String cacheId)
           
 void setClientCacheSyncMode(ClientCacheSyncMode value)
           
 void setClientRequestTimeOut(int opTimeout)
          * Clients operation timeout specified in seconds.
 void setConnectionRetries(int connectionRetries)
          * Set Number of tries to re-establish a broken connection between client and server.
 void setConnectionTimeout(int connectionTimeout)
          * Set Client's connection timeout specified in seconds.
 void setIsBridgeClient(boolean value)
           
 void setLoadBalance(boolean balanceNodes)
          When this flag is set, client tries to connect to the optimum server in terms of number of connected clients.
 void setMode(CacheMode mode)
           
 void setPort(int port)
          * Set the port on which the clients will connect to a server.
 void setPrimaryUserCredentials(SecurityParams primaryUserCredentials)
          * Set the user-id and password for the primary cache user.
 void setRetryConnectionDelay(int retryConnectionDelay)
          * Set Client's connection retry delay in seconds.
 int setRetryInterval()
          * Get Time in seconds to wait between two connection retries.
 void setRetryInterval(int retryInterval)
          * Set Time in seconds to wait between two connection retries.
 void setSecondaryUserCredentials(SecurityParams secondaryUserCredentials)
          * Set the user-id and password for the secondary cache user.
 void setServer(java.lang.String server)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheInitParams

public CacheInitParams()
Method Detail

getServer

public java.lang.String getServer()
Returns:
Gets the server clients will connect to.

setServer

public void setServer(java.lang.String server)
Parameters:
server - Sets the server clients will connect to.

getPrimaryUserCredentials

public SecurityParams getPrimaryUserCredentials()
* Get the user-id and password for the primary cache user. This information is required when the security is enabled. If primary user's authentication fails, SecondaryUserCredentials are tried.

Returns:
SecurityParams of primary user's cache credentials

setPrimaryUserCredentials

public void setPrimaryUserCredentials(SecurityParams primaryUserCredentials)
* Set the user-id and password for the primary cache user. This information is required when the security is enabled. If primary user's authentication fails, SecondaryUserCredentials are tried.

Parameters:
primaryUserCredentials - primary user's cache credentials

getSecondaryUserCredentials

public SecurityParams getSecondaryUserCredentials()
* Get the user-id and password for the secondary cache user. This information is required when the security is enabled. If primary user's authentication fails, SecondaryUserCredentials are tried.

Returns:
SecurityParams of secondary user's credentials

setSecondaryUserCredentials

public void setSecondaryUserCredentials(SecurityParams secondaryUserCredentials)
* Set the user-id and password for the secondary cache user. This information is required when the security is enabled. If primary user's authentication fails, SecondaryUserCredentials are tried.

Parameters:
secondaryUserCredentials - secondary user's credentials

getLoadBalance

public boolean getLoadBalance()
When this flag is set, client tries to connect to the optimum server in terms of number of connected clients. This way almost equal number of clients are connected to every node in the clustered cache and no single node is over burdened.

Returns:
boolean true will Load Balance is set to true otherwise false

setLoadBalance

public void setLoadBalance(boolean balanceNodes)
When this flag is set, client tries to connect to the optimum server in terms of number of connected clients. This way almost equal number of clients are connected to every node in the clustered cache and no single node is over burdened.

Parameters:
balanceNodes - if true balance client tries to connect to the optimum server

getPort

public int getPort()
* Gets the port on which the clients will connect to a server.

Returns:
the port number

setPort

public void setPort(int port)
* Set the port on which the clients will connect to a server.

Parameters:
port - specify port number

getMode

public CacheMode getMode()

setMode

public void setMode(CacheMode mode)

getClientRequestTimeOut

public int getClientRequestTimeOut()
* Clients operation timeout specified in seconds. Clients wait for the response from the server for this time. If the response is not received within this time, the operation is not successful. Based on the network conditions, OperationTimeout value can be adjusted. The default value is 90 seconds.

Returns:
the client request time out value

setClientRequestTimeOut

public void setClientRequestTimeOut(int opTimeout)
* Clients operation timeout specified in seconds. Clients wait for the response from the server for this time. If the response is not received within this time, the operation is not successful. Based on the network conditions, OperationTimeout value can be adjusted.

Parameters:
opTimeout - Client operation time out value

getConnectionTimeout

public int getConnectionTimeout()
* Get Client's connection timeout specified in seconds.

Returns:
Connection time out value

setConnectionTimeout

public void setConnectionTimeout(int connectionTimeout)
* Set Client's connection timeout specified in seconds.

Parameters:
connectionTimeout - value

setRetryConnectionDelay

public void setRetryConnectionDelay(int retryConnectionDelay)
* Set Client's connection retry delay in seconds.

Parameters:
retryConnectionDelay - value

getRetryConnectionDelay

public int getRetryConnectionDelay()
* Get Client's connection retry delay in seconds.

Returns:
Connection retry delay value

getConnectionRetries

public int getConnectionRetries()
* Get Number of tries to re-establish a broken connection between client and server.

Returns:
value

setConnectionRetries

public void setConnectionRetries(int connectionRetries)
* Set Number of tries to re-establish a broken connection between client and server.

Parameters:
connectionRetries - value

setRetryInterval

public int setRetryInterval()
* Get Time in seconds to wait between two connection retries.

Returns:
retry interval is returned

setRetryInterval

public void setRetryInterval(int retryInterval)
* Set Time in seconds to wait between two connection retries.

Parameters:
retryInterval - value

getClientCacheSyncMode

public ClientCacheSyncMode getClientCacheSyncMode()

setClientCacheSyncMode

public void setClientCacheSyncMode(ClientCacheSyncMode value)

getRetryInterval

public int getRetryInterval()
gets interval value between retry connection in seconds

Returns:

getIsBridgeClient

public boolean getIsBridgeClient()

setIsBridgeClient

public void setIsBridgeClient(boolean value)

Initialize

public void Initialize(java.lang.String cacheId)
Parameters:
cacheId -

getClientCacheStatus

public boolean getClientCacheStatus()
Returns the current client Cache Enabled or disabled status

Returns:
A boolean type, true for Enabled and false for Disabled Client Cache