@NotThreadSafe public final class WorkerInfo extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
WorkerInfo.LastContactSecComparator
Determine order from most recently contacted to least recently contacted.
|
Constructor and Description |
---|
WorkerInfo() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
WorkerNetAddress |
getAddress() |
long |
getBlockCount() |
long |
getCapacityBytes() |
Map<String,Long> |
getCapacityBytesOnTiers() |
long |
getId() |
int |
getLastContactSec() |
String |
getRevision() |
long |
getStartTimeMs() |
String |
getState() |
long |
getUsedBytes() |
Map<String,Long> |
getUsedBytesOnTiers() |
String |
getVersion() |
int |
hashCode() |
WorkerInfo |
setAddress(WorkerNetAddress address) |
WorkerInfo |
setBlockCount(long blockCount) |
WorkerInfo |
setCapacityBytes(long capacityBytes) |
WorkerInfo |
setCapacityBytesOnTiers(Map<String,Long> capacityBytesOnTiers) |
WorkerInfo |
setId(long id) |
WorkerInfo |
setLastContactSec(int lastContactSec) |
WorkerInfo |
setRevision(String revision) |
WorkerInfo |
setStartTimeMs(long startTimeMs) |
WorkerInfo |
setState(String state) |
WorkerInfo |
setUsedBytes(long usedBytes) |
WorkerInfo |
setUsedBytesOnTiers(Map<String,Long> usedBytesOnTiers) |
WorkerInfo |
setVersion(String version) |
String |
toString() |
public long getId()
public WorkerNetAddress getAddress()
public int getLastContactSec()
public String getState()
public long getCapacityBytes()
public long getUsedBytes()
public long getStartTimeMs()
public Map<String,Long> getCapacityBytesOnTiers()
public Map<String,Long> getUsedBytesOnTiers()
public String getVersion()
public String getRevision()
public WorkerInfo setId(long id)
id
- the worker id to usepublic WorkerInfo setAddress(WorkerNetAddress address)
address
- the worker address to usepublic WorkerInfo setLastContactSec(int lastContactSec)
lastContactSec
- the worker last contact (in seconds) to usepublic WorkerInfo setState(String state)
state
- the worker state to usepublic WorkerInfo setCapacityBytes(long capacityBytes)
capacityBytes
- the worker total capacity (in bytes) to usepublic WorkerInfo setUsedBytes(long usedBytes)
usedBytes
- the worker used capacity (in bytes) to usepublic WorkerInfo setStartTimeMs(long startTimeMs)
startTimeMs
- the worker start time (in milliseconds) to usepublic WorkerInfo setCapacityBytesOnTiers(Map<String,Long> capacityBytesOnTiers)
capacityBytesOnTiers
- the total worker capacity (in bytes) to usepublic WorkerInfo setUsedBytesOnTiers(Map<String,Long> usedBytesOnTiers)
usedBytesOnTiers
- the used worker capacity (in bytes) to usepublic WorkerInfo setVersion(String version)
version
- the project version of the workerpublic WorkerInfo setRevision(String revision)
revision
- the git revision at the time of building the workerpublic WorkerInfo setBlockCount(long blockCount)
blockCount
- the worker block countpublic long getBlockCount()
Copyright © 2023. All Rights Reserved.