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()
Creates a new object that is a copy of the current instance.java.lang.String
getAppName()
Gets the application's name.java.lang.String
getClientID()
Gets the client ID.int
getClientVersion()
Gets the client version of the cache client.int
getCores()
Gets 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 the application's name.void
setClientID(java.lang.String clientID)
Sets the 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)
It parses the client ID and gets 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)
It parses the client ID and gets information about the client ID in the form of ClientInfo.- Parameters:
clientId
- Client ID of the client.- Returns:
- Information about the client ID in the form of ClientInfo.
-
setAppName
public void setAppName(java.lang.String appName)
Sets the application's name.- Parameters:
appName
- The name to be given to the application.
-
getAppName
public java.lang.String getAppName()
Gets the application's name.- Returns:
- The name of the application.
-
getClientID
public java.lang.String getClientID()
Gets the client ID.- Returns:
- The unique ID of client.
-
setClientID
public void setClientID(java.lang.String clientID)
Sets the client ID.- Parameters:
clientID
- Unique ID of the client.
-
getiPAddress
public java.net.InetAddress getiPAddress()
Gets the IP Address of the cache client.- Returns:
- The IP Address of the 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()
Gets 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
- Sets the available cores of the cache client.
-
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()
Creates a new object that is a copy of the current instance.- Returns:
- A new object that is a copy of this instance.
-
-