Package com.alachisoft.ncache.client
Class ClientInfo
- java.lang.Object
-
- com.alachisoft.ncache.client.ClientInfo
-
- All Implemented Interfaces:
java.lang.Cloneable
public class ClientInfo extends java.lang.Object implements java.lang.Cloneable
This class provides detailed information about cache client.
-
-
Constructor Summary
Constructors Constructor Description ClientInfo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
Clones the object and returns the newly created clone of the object.java.lang.String
getAppName()
Gets Application's Name.java.lang.String
getClientID()
Gets client id.int
getClientVersion()
Gets the client version of the cache client.int
getCores()
Get the available cores of the cache client.java.net.InetAddress
getiPAddress()
Gets the ip address of the cache client.static java.lang.String
getLegacyClientID(ClientInfo info)
GetLegacyClientId returns the client id in string.java.lang.String
getMacAddress()
Gets the mac address of the cache client.java.lang.String
getMachineName()
Gets the machine name of the cache client.int
getProcessID()
Gets the process id of the cache client.ConnectivityStatus
getStatus()
Gets the connectivity status of the cache client.void
setAppName(java.lang.String appName)
Sets Application's Name.void
setClientID(java.lang.String clientID)
Sets client id.void
setClientVersion(int clientVersion)
Sets the client version of the cache client.void
setCores(int cores)
Sets the available cores of the cache client.void
setiPAddress(java.net.InetAddress iPAddress)
Sets the ip Address of the cache client.void
setMacAddress(java.lang.String macAddress)
Sets the mac address of the cache client.void
setMachineName(java.lang.String machineName)
Sets the machine name of the cache client.void
setProcessID(int processID)
Sets the process id of the cache client.void
setStatus(ConnectivityStatus status)
Sets the connectivity status of the cache client.java.lang.String
toString()
Converts Client Info to string , contains client id , Application name ,Process id , machine name and address.static ClientInfo
tryParseLegacyClientID(java.lang.String clientId)
TryParseLegacyClientId parse the Client id and get information about the client id in the form of ClientInfo
-
-
-
Method Detail
-
getLegacyClientID
public static java.lang.String getLegacyClientID(ClientInfo info)
GetLegacyClientId returns the client id in string.- Parameters:
info
-- Returns:
- Client id of the client
-
tryParseLegacyClientID
public static ClientInfo tryParseLegacyClientID(java.lang.String clientId)
TryParseLegacyClientId parse the Client id and get information about the client id in the form of ClientInfo- Parameters:
clientId
- Client id of the client- Returns:
-
setAppName
public void setAppName(java.lang.String appName)
Sets Application's Name.- Parameters:
appName
- The name to be given to application.
-
getAppName
public java.lang.String getAppName()
Gets Application's Name.- Returns:
- The name of the application.
-
getClientID
public java.lang.String getClientID()
Gets client id.- Returns:
- The unique id of client.
-
setClientID
public void setClientID(java.lang.String clientID)
Sets client id.- Parameters:
clientID
- Unique id of client.
-
getiPAddress
public java.net.InetAddress getiPAddress()
Gets the ip address of the cache client.- Returns:
- The ipAddress of client.
-
setiPAddress
public void setiPAddress(java.net.InetAddress iPAddress)
Sets the ip Address of the cache client.- Parameters:
iPAddress
- The ip address of the client.
-
setMacAddress
public void setMacAddress(java.lang.String macAddress)
Sets the mac address of the cache client.- Parameters:
macAddress
- The mac address of the client.
-
getCores
public int getCores()
Get the available cores of the cache client.- Returns:
- The available cores of the cache client.
-
setCores
public void setCores(int cores)
Sets the available cores of the cache client.- Parameters:
cores
-
-
getProcessID
public int getProcessID()
Gets the process id of the cache client.- Returns:
- The process id of the cache client.
-
setProcessID
public void setProcessID(int processID)
Sets the process id of the cache client.- Parameters:
processID
- The process id of the cache client.
-
getMachineName
public java.lang.String getMachineName()
Gets the machine name of the cache client.- Returns:
- The machine name of the cache client.
-
setMachineName
public void setMachineName(java.lang.String machineName)
Sets the machine name of the cache client.- Parameters:
machineName
- The machine name of the cache client.
-
getMacAddress
public java.lang.String getMacAddress()
Gets the mac address of the cache client.- Returns:
- The mac address of the cache client.
-
getStatus
public ConnectivityStatus getStatus()
Gets the connectivity status of the cache client.- Returns:
- The connectivity status of the cache client.
-
setStatus
public void setStatus(ConnectivityStatus status)
Sets the connectivity status of the cache client.- Parameters:
status
- The connectivity status of the cache client.
-
getClientVersion
public int getClientVersion()
Gets the client version of the cache client.- Returns:
- The client version of the cache client.
-
setClientVersion
public void setClientVersion(int clientVersion)
Sets the client version of the cache client.- Parameters:
clientVersion
- The client version of the cache client.
-
toString
public java.lang.String toString()
Converts Client Info to string , contains client id , Application name ,Process id , machine name and address.- Overrides:
toString
in classjava.lang.Object
- Returns:
- ClientInfo in string form
-
clone
public final java.lang.Object clone()
Clones the object and returns the newly created clone of the object.- Overrides:
clone
in classjava.lang.Object
- Returns:
- The newly cloned ClientInfo object
-
-