public class ClusterRepoItem extends RepositoryItemAbstract implements Cloneable
| Modifier and Type | Field and Description |
|---|---|
static String |
CPU_USAGE_ATTR |
static String |
CPU_USAGE_LABEL |
static String |
HOSTNAME_ATTR |
static String |
HOSTNAME_LABEL |
static String |
LAST_UPDATE_ATTR |
static String |
LAST_UPDATE_LABEL |
static String |
MEM_USAGE_ATTR |
static String |
MEM_USAGE_LABEL |
static String |
PASSWORD_ATTR |
static String |
PASSWORD_LABEL |
static String |
PASSWORD_PROP_VAL |
static String |
PORT_NO_ATTR |
static String |
PORT_NO_LABEL |
static int |
PORT_NO_PROP_VAL |
static String |
REPO_ITEM_ELEM_NAME |
static String |
SECONDARY_HOSTNAME_ATTR |
static String |
SECONDARY_HOSTNAME_LABEL |
ADMINS_ATT, ADMINS_LABEL, OWNER_ATT, OWNER_LABEL| Constructor and Description |
|---|
ClusterRepoItem() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCommandFields(Packet packet)
The method is used for handling ad-hoc commands.
|
protected Object |
clone() |
float |
getCpuUsage() |
String |
getElemName() |
String |
getHostname() |
String |
getKey()
Returns a unique key for the item in the repository.
|
long |
getLastUpdate() |
float |
getMemUsage() |
String |
getPassword() |
int |
getPortNo() |
String |
getSecondaryHostname() |
void |
initFromCommand(Packet packet)
The method used for handling ad-hoc commands.
|
void |
initFromElement(Element elem)
The item can be also initialized from a more complex repositories: XML repository or SQL database.
|
void |
initFromPropertyString(String propString)
The item can be initialized based on the data loaded from a configuration file.
|
protected void |
setCpuUsage(float cpuUsage) |
protected void |
setHostname(String hostname) |
protected void |
setKey(String key) |
protected void |
setLastUpdate(long update) |
protected void |
setMemUsage(float memUsage) |
protected void |
setPassword(String password) |
protected void |
setPort(int port) |
protected void |
setSecondaryHostname(String secondaryHostname) |
Element |
toElement()
Item data can be stored in a more complex form than a simple property string.
|
String |
toPropertyString()
The item can be initialized based on the data loaded from a configuration file.
|
String |
toString() |
public static final String CPU_USAGE_ATTR
public static final String CPU_USAGE_LABEL
public static final String HOSTNAME_ATTR
public static final String SECONDARY_HOSTNAME_ATTR
public static final String HOSTNAME_LABEL
public static final String SECONDARY_HOSTNAME_LABEL
public static final String LAST_UPDATE_ATTR
public static final String LAST_UPDATE_LABEL
public static final String MEM_USAGE_ATTR
public static final String MEM_USAGE_LABEL
public static final String PASSWORD_ATTR
public static final String PASSWORD_LABEL
public static final String PASSWORD_PROP_VAL
public static final String PORT_NO_ATTR
public static final String PORT_NO_LABEL
public static final int PORT_NO_PROP_VAL
public static final String REPO_ITEM_ELEM_NAME
public void addCommandFields(Packet packet)
RepositoryItemaddCommandFields in interface RepositoryItemaddCommandFields in class RepositoryItemAbstractpacket - with empty ad-hoc command to fill with fieldspublic void initFromCommand(Packet packet)
RepositoryIteminitFromCommand in interface RepositoryIteminitFromCommand in class RepositoryItemAbstractpacket - with ad-hoc command filled by the user.public void initFromElement(Element elem)
RepositoryIteminitFromElement in interface RepositoryIteminitFromElement in class RepositoryItemAbstractelem - XML Element with all the item initialization data.public void initFromPropertyString(String propString)
RepositoryIteminitFromPropertyString in interface RepositoryItempropString - is a property string to initialize the RepositoryItem.public Element toElement()
RepositoryItemtoElement in interface RepositoryItemtoElement in class RepositoryItemAbstractpublic String toPropertyString()
RepositoryItemtoPropertyString in interface RepositoryItempublic float getCpuUsage()
protected void setCpuUsage(float cpuUsage)
public String getElemName()
getElemName in class RepositoryItemAbstractpublic String getHostname()
protected void setHostname(String hostname)
public String getKey()
RepositoryItemgetKey in interface RepositoryItemprotected void setKey(String key)
setKey in class RepositoryItemAbstractpublic long getLastUpdate()
protected void setLastUpdate(long update)
public float getMemUsage()
protected void setMemUsage(float memUsage)
public String getPassword()
protected void setPassword(String password)
public String getSecondaryHostname()
protected void setSecondaryHostname(String secondaryHostname)
public int getPortNo()
protected Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionprotected void setPort(int port)
Copyright © 2004–2020 "Tigase, Inc.". All rights reserved.