@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()
Creates a new instance of
WorkerInfo . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
WorkerNetAddress |
getAddress() |
long |
getCapacityBytes() |
Map<String,Long> |
getCapacityBytesOnTiers() |
long |
getId() |
int |
getLastContactSec() |
long |
getStartTimeMs() |
String |
getState() |
long |
getUsedBytes() |
Map<String,Long> |
getUsedBytesOnTiers() |
int |
hashCode() |
WorkerInfo |
setAddress(WorkerNetAddress address) |
WorkerInfo |
setCapacityBytes(long capacityBytes) |
WorkerInfo |
setCapacityBytesOnTiers(Map<String,Long> capacityBytesOnTiers) |
WorkerInfo |
setId(long id) |
WorkerInfo |
setLastContactSec(int lastContactSec) |
WorkerInfo |
setStartTimeMs(long startTimeMs) |
WorkerInfo |
setState(String state) |
WorkerInfo |
setUsedBytes(long usedBytes) |
WorkerInfo |
setUsedBytesOnTiers(Map<String,Long> usedBytesOnTiers) |
String |
toString() |
public WorkerInfo()
WorkerInfo
.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 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 useCopyright © 2023. All Rights Reserved.