Package com.alachisoft.ncache.client
Class CacheConnection
- java.lang.Object
-
- com.alachisoft.ncache.client.CacheConnection
-
- All Implemented Interfaces:
java.lang.Cloneable
public class CacheConnection extends java.lang.Object implements java.lang.CloneableInstance of this class can be used to define the parameters to establish connection with cache.
-
-
Constructor Summary
Constructors Constructor Description CacheConnection(java.lang.String server)Initializes new instance of CacheConnection.CacheConnection(java.lang.String server, int port)Initializes new instance of CacheConnection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetPort()Gets the port of server on which cache is running.java.lang.StringgetServer()Gets the name of server on which cache is running.CredentialsgetUserCredentials()GetsCredentialsof the cache for authorization.voidsetUserCredentials(Credentials value)SetsCredentialsof the cache for authorization.
-
-
-
Constructor Detail
-
CacheConnection
public CacheConnection(java.lang.String server, int port)Initializes new instance of CacheConnection.- Parameters:
server- Name of server on which the cache is running.port- Port of server on which the cache is running.
-
CacheConnection
public CacheConnection(java.lang.String server)
Initializes new instance of CacheConnection.- Parameters:
server- Name of server on which the cache is running.
-
-
Method Detail
-
getServer
public java.lang.String getServer()
Gets the name of server on which cache is running.- Returns:
- The name of server on which cache is running.
-
getPort
public int getPort()
Gets the port of server on which cache is running.- Returns:
- The port of server on which cache is running.
-
getUserCredentials
public Credentials getUserCredentials()
GetsCredentialsof the cache for authorization.- Returns:
- The credentials of the cache for authorization.
-
setUserCredentials
public void setUserCredentials(Credentials value)
SetsCredentialsof the cache for authorization.- Parameters:
value- The credentials of the cache for authorization.
-
-