Class ClientInfo
- java.lang.Object
-
- com.alachisoft.ncache.runtime.caching.ClientInfo
-
- All Implemented Interfaces:
java.lang.Cloneable
public class ClientInfo extends java.lang.Object implements java.lang.CloneableThis 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.Objectclone()Creates a new object that is a copy of the current instance.java.lang.StringgetAppName()Gets the client application name.java.lang.StringgetClientID()Gets the client unique ID of the cache client.intgetClientVersion()Gets the version of the NCache client.intgetCores()Gets the available cores of the cache client.java.net.InetAddressgetIPAddress()Gets the IP Address of the cache client.java.lang.StringgetMacAddress()Gets the Mac Address of the cache client.java.lang.StringgetMachineName()Gets the name of the machine the client is running on.intgetProcessID()Gets the Process ID of the cache client.ConnectivityStatusgetStatus()Gets the enum that specifies whether client is connected to cache or not.voidsetAppName(java.lang.String value)Sets the client application name.voidsetClientID(java.lang.String value)Sets the client unique ID of the cache client.voidsetClientVersion(int value)Sets the version of the NCache client.voidsetCores(int value)Sets the available cores of the cache client.voidsetIPAddress(java.net.InetAddress value)Sets the IP Address of the cache client.voidsetMacAddress(java.lang.String value)Sets the Mac Address of the cache client.voidsetMachineName(java.lang.String value)Sets the name of the machine the client is running on.voidsetProcessID(int value)Sets the Process ID of the cache client.voidsetStatus(ConnectivityStatus value)Sets the enum that specifies whether client is connected to cache or not.java.lang.StringtoString()Converts Client Info to string, contains client ID, application name, process ID, machine name and address.static ClientInfotryParseLegacyClientID(java.lang.String clientId)Parses the Client ID and gets information about the client ID in the form of ClientInfo.
-
-
-
Method Detail
-
tryParseLegacyClientID
public static ClientInfo tryParseLegacyClientID(java.lang.String clientId)
Parses the Client ID and gets information about the client ID in the form of ClientInfo.- Parameters:
clientId- Client ID of the client.- Returns:
ClientInfoinstance.
-
getAppName
public java.lang.String getAppName()
Gets the client application name.- Returns:
- The client application name.
-
setAppName
public void setAppName(java.lang.String value)
Sets the client application name.- Parameters:
value- The client application name.
-
getClientID
public java.lang.String getClientID()
Gets the client unique ID of the cache client.- Returns:
- The client unique ID of the cache client.
-
setClientID
public void setClientID(java.lang.String value)
Sets the client unique ID of the cache client.- Parameters:
value- The client unique ID of the cache client.
-
getIPAddress
public java.net.InetAddress getIPAddress()
Gets the IP Address of the cache client.- Returns:
- The IP Address of the cache client.
-
setIPAddress
public void setIPAddress(java.net.InetAddress value)
Sets the IP Address of the cache client.- Parameters:
value- The IP Address 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.
-
setMacAddress
public void setMacAddress(java.lang.String value)
Sets the Mac Address of the cache client.- Parameters:
value- The Mac Address of the cache 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 value)
Sets the available cores of the cache client.- Parameters:
value- 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 value)
Sets the Process ID of the cache client.- Parameters:
value- The Process ID of the cache client.
-
getMachineName
public java.lang.String getMachineName()
Gets the name of the machine the client is running on.- Returns:
- The name of the machine the client is running on.
-
setMachineName
public void setMachineName(java.lang.String value)
Sets the name of the machine the client is running on.- Parameters:
value- The name of the machine the client is running on.
-
getStatus
public ConnectivityStatus getStatus()
Gets the enum that specifies whether client is connected to cache or not.- Returns:
- The ConnectivityStatus of the client.
-
setStatus
public void setStatus(ConnectivityStatus value)
Sets the enum that specifies whether client is connected to cache or not.- Parameters:
value- The ConnectivityStatus of the client.
-
getClientVersion
public int getClientVersion()
Gets the version of the NCache client.- Returns:
- Version of the NCache client.
-
setClientVersion
public void setClientVersion(int value)
Sets the version of the NCache client.- Parameters:
value- Version of NCache client.
-
toString
public java.lang.String toString()
Converts Client Info to string, contains client ID, application name, process ID, machine name and address.- Overrides:
toStringin classjava.lang.Object- Returns:
- Client info in form of a string.
-
clone
public java.lang.Object clone()
Creates a new object that is a copy of the current instance.- Returns:
- Object that is a copy of the current instance.
-
-