Package alluxio.wire
Class WorkerInfo
- java.lang.Object
-
- alluxio.wire.WorkerInfo
-
- All Implemented Interfaces:
java.io.Serializable
@NotThreadSafe public final class WorkerInfo extends java.lang.Object implements java.io.Serializable
The worker information.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WorkerInfo.LastContactSecComparator
Determine order from most recently contacted to least recently contacted.
-
Constructor Summary
Constructors Constructor Description WorkerInfo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
WorkerNetAddress
getAddress()
long
getBlockCount()
long
getCapacityBytes()
java.util.Map<java.lang.String,java.lang.Long>
getCapacityBytesOnTiers()
long
getId()
int
getLastContactSec()
java.lang.String
getRevision()
long
getStartTimeMs()
java.lang.String
getState()
long
getUsedBytes()
java.util.Map<java.lang.String,java.lang.Long>
getUsedBytesOnTiers()
java.lang.String
getVersion()
int
hashCode()
WorkerInfo
setAddress(WorkerNetAddress address)
WorkerInfo
setBlockCount(long blockCount)
WorkerInfo
setCapacityBytes(long capacityBytes)
WorkerInfo
setCapacityBytesOnTiers(java.util.Map<java.lang.String,java.lang.Long> capacityBytesOnTiers)
WorkerInfo
setId(long id)
WorkerInfo
setLastContactSec(int lastContactSec)
WorkerInfo
setRevision(java.lang.String revision)
WorkerInfo
setStartTimeMs(long startTimeMs)
WorkerInfo
setState(java.lang.String state)
WorkerInfo
setUsedBytes(long usedBytes)
WorkerInfo
setUsedBytesOnTiers(java.util.Map<java.lang.String,java.lang.Long> usedBytesOnTiers)
WorkerInfo
setVersion(java.lang.String version)
java.lang.String
toString()
-
-
-
Method Detail
-
getId
public long getId()
- Returns:
- the worker id
-
getAddress
public WorkerNetAddress getAddress()
- Returns:
- the worker address
-
getLastContactSec
public int getLastContactSec()
- Returns:
- the worker last contact (in seconds)
-
getState
public java.lang.String getState()
- Returns:
- the worker state
-
getCapacityBytes
public long getCapacityBytes()
- Returns:
- the worker total capacity (in bytes)
-
getUsedBytes
public long getUsedBytes()
- Returns:
- the worker used capacity (in bytes)
-
getStartTimeMs
public long getStartTimeMs()
- Returns:
- the worker start time (in milliseconds)
-
getCapacityBytesOnTiers
public java.util.Map<java.lang.String,java.lang.Long> getCapacityBytesOnTiers()
- Returns:
- the worker total capacity (in bytes) on tiers
-
getUsedBytesOnTiers
public java.util.Map<java.lang.String,java.lang.Long> getUsedBytesOnTiers()
- Returns:
- the worker used capacity (in bytes) on tiers
-
getVersion
public java.lang.String getVersion()
- Returns:
- the project version of the worker
-
getRevision
public java.lang.String getRevision()
- Returns:
- the git revision at the time of building the worker
-
setId
public WorkerInfo setId(long id)
- Parameters:
id
- the worker id to use- Returns:
- the worker information
-
setAddress
public WorkerInfo setAddress(WorkerNetAddress address)
- Parameters:
address
- the worker address to use- Returns:
- the worker information
-
setLastContactSec
public WorkerInfo setLastContactSec(int lastContactSec)
- Parameters:
lastContactSec
- the worker last contact (in seconds) to use- Returns:
- the worker information
-
setState
public WorkerInfo setState(java.lang.String state)
- Parameters:
state
- the worker state to use- Returns:
- the worker information
-
setCapacityBytes
public WorkerInfo setCapacityBytes(long capacityBytes)
- Parameters:
capacityBytes
- the worker total capacity (in bytes) to use- Returns:
- the worker information
-
setUsedBytes
public WorkerInfo setUsedBytes(long usedBytes)
- Parameters:
usedBytes
- the worker used capacity (in bytes) to use- Returns:
- the worker information
-
setStartTimeMs
public WorkerInfo setStartTimeMs(long startTimeMs)
- Parameters:
startTimeMs
- the worker start time (in milliseconds) to use- Returns:
- the worker information
-
setCapacityBytesOnTiers
public WorkerInfo setCapacityBytesOnTiers(java.util.Map<java.lang.String,java.lang.Long> capacityBytesOnTiers)
- Parameters:
capacityBytesOnTiers
- the total worker capacity (in bytes) to use- Returns:
- the worker information
-
setUsedBytesOnTiers
public WorkerInfo setUsedBytesOnTiers(java.util.Map<java.lang.String,java.lang.Long> usedBytesOnTiers)
- Parameters:
usedBytesOnTiers
- the used worker capacity (in bytes) to use- Returns:
- the worker information
-
setVersion
public WorkerInfo setVersion(java.lang.String version)
- Parameters:
version
- the project version of the worker- Returns:
- the worker information
-
setRevision
public WorkerInfo setRevision(java.lang.String revision)
- Parameters:
revision
- the git revision at the time of building the worker- Returns:
- the worker information
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
setBlockCount
public WorkerInfo setBlockCount(long blockCount)
- Parameters:
blockCount
- the worker block count- Returns:
- the worker information
-
getBlockCount
public long getBlockCount()
- Returns:
- the worker block count
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-