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.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 application's name.java.lang.StringgetClientID()Gets the client ID.intgetClientVersion()Gets the client version of the cache client.intgetCores()Gets the available cores of the cache client.java.net.InetAddressgetiPAddress()Gets the IP Address of the cache client.static java.lang.StringgetLegacyClientID(ClientInfo info)GetLegacyClientId returns the client ID in string.java.lang.StringgetMacAddress()Gets the Mac address of the cache client.java.lang.StringgetMachineName()Gets the machine name of the cache client.intgetProcessID()Gets the process ID of the cache client.ConnectivityStatusgetStatus()Gets the connectivity status of the cache client.voidsetAppName(java.lang.String appName)Sets the application's name.voidsetClientID(java.lang.String clientID)Sets the client ID.voidsetClientVersion(int clientVersion)Sets the client version of the cache client.voidsetCores(int cores)Sets the available cores of the cache client.voidsetiPAddress(java.net.InetAddress iPAddress)Sets the IP Address of the cache client.voidsetMacAddress(java.lang.String macAddress)Sets the Mac Address of the cache client.voidsetMachineName(java.lang.String machineName)Sets the machine name of the cache client.voidsetProcessID(int processID)Sets the process ID of the cache client.voidsetStatus(ConnectivityStatus status)Sets the connectivity status of the cache client.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)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:
toStringin 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.
-
-