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.Cloneable
Instance 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 int
getPort()
Gets the port of server on which cache is running.java.lang.String
getServer()
Gets the name of server on which cache is running.Credentials
getUserCredentials()
GetsCredentials
of the cache for authorization.void
setUserCredentials(Credentials value)
SetsCredentials
of the cache for authorization.
-
-
-
Constructor Detail
-
CacheConnection
public CacheConnection(java.lang.String server, int port)
Initializes new instance of CacheConnection.- Parameters:
server
- Specifies the name of server on which cache is running.port
- Specifies the port of server on which cache is running.
-
CacheConnection
public CacheConnection(java.lang.String server)
Initializes new instance of CacheConnection.- Parameters:
server
- Specifies the name of server on which 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()
GetsCredentials
of the cache for authorization.- Returns:
- The credentials of the cache for authorization.
-
setUserCredentials
public void setUserCredentials(Credentials value)
SetsCredentials
of the cache for authorization.- Parameters:
value
- The credentials of the cache for authorization.
-
-