com.alachisoft.ncache.web.caching
Class CacheInitParams

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

public final class CacheInitParams
extends java.lang.Object


Constructor Summary
CacheInitParams()
           
 
Method Summary
 boolean getClientCacheStatus()
          Returns the current client Cache Enabled or disabled status
 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 getLoadBalance()
          When this flag is set, client tries to connect to the optimum server in terms of number of connected clients.
 int getOperationTimeout()
          gets operation Timeout value
 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 getRetryInterval()
          gets interval value between retry connection
 SecurityParams getSecondaryUserCredentials()
          Get the user-id and password for the secondary cache user.
 java.lang.String getServer()
           
 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 setLoadBalance(boolean balanceNodes)
          When this flag is set, client tries to connect to the optimum server in terms of number of connected clients.
 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.
 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

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

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

getConnectionRetries

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

Returns:
value

getConnectionTimeout

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

Returns:
Connection time out value

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

getOperationTimeout

public int getOperationTimeout()
gets operation Timeout value

Returns:

getPort

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

Returns:
the port number

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

getRetryInterval

public int getRetryInterval()
gets interval value between retry connection

Returns:

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

getServer

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

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

setConnectionRetries

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

Parameters:
connectionRetries - value

setConnectionTimeout

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

Parameters:
connectionTimeout - value

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

setPort

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

Parameters:
port - specify port number

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

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

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

setServer

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