public class SystemInformation extends Model<SystemInformation> implements Addressable<IpAddress>, Distributable
Constructor and Description |
---|
SystemInformation(boolean isSelf,
IpAddress address)
Construct a new system descriptor.
|
SystemInformation(Id<SystemInformation,UUID> id,
boolean isSelf,
IpAddress address)
Construct a new system descriptor using the supplied unique
identification.
|
SystemInformation(SystemInformation si)
Construct a deep copy of another SystemInformation object.
|
SystemInformation(SystemInformation si,
boolean isSelf)
Construct a deep copy of another SystemInformation object.
|
Modifier and Type | Method and Description |
---|---|
IpAddress |
address()
Gets the address.
|
long |
coreDataVersion()
Gets the core data version.
|
Date |
coreDataVersionTimestamp()
Gets the core data version timestamp.
|
boolean |
isSelf()
Returns true if this system information represents the local system.
|
SystemRole |
role()
Returns the role of the system.
|
void |
setAddress(IpAddress address)
Set the contact address of the system.
|
void |
setCoreDataVersion(long coreDataVersion)
Sets the core data version.
|
void |
setCoreDataVersionTimestamp(Date coreDataVersionTimestamp)
Sets the core data version timestamp.
|
void |
setRole(SystemRole role)
Sets the role of the system.
|
void |
setStatus(SystemStatus status)
Sets the
Status for the system. |
void |
setVersion(BuildVersion version)
Set the software version of the system.
|
SystemStatus |
status()
Returns the
Status for the system. |
String |
toString() |
BuildVersion |
version()
Returns the software version of the system.
|
equals, getId, hashCode
public SystemInformation(boolean isSelf, IpAddress address)
isSelf
- true to indicate this descriptor represents local systemaddress
- contact addresspublic SystemInformation(Id<SystemInformation,UUID> id, boolean isSelf, IpAddress address)
isSelf
- true to indicate this descriptor represents local systemid
- the unique idaddress
- contact addressIllegalArgumentException
- if unique id is nullpublic SystemInformation(SystemInformation si)
si
- a SystemInformation object to copypublic SystemInformation(SystemInformation si, boolean isSelf)
si
- a SystemInformation object to copyisSelf
- true to indicate this descriptor represents local systempublic BuildVersion version()
public void setVersion(BuildVersion version)
version
- new software versionpublic IpAddress address()
Addressable
address
in interface Addressable<IpAddress>
public void setAddress(IpAddress address)
address
- new contact addresspublic long coreDataVersion()
public void setCoreDataVersion(long coreDataVersion)
coreDataVersion
- the core data versionpublic Date coreDataVersionTimestamp()
public void setCoreDataVersionTimestamp(Date coreDataVersionTimestamp)
coreDataVersionTimestamp
- the core data version timestamppublic SystemRole role()
public void setRole(SystemRole role)
role
- new system rolepublic boolean isSelf()
true
if local systempublic SystemStatus status()
Status
for the system.public void setStatus(SystemStatus status)
Status
for the system.status
- the status to setpublic String toString()
toString
in class AbstractModel<SystemInformation,UUID>
Copyright © 2015. All Rights Reserved.