public class ControllerSEntry extends java.lang.Object implements java.lang.Comparable<ControllerSEntry>
Modifier and Type | Field and Description |
---|---|
static long |
expirationSecs |
Constructor and Description |
---|
ControllerSEntry(HostID id,
ChunkDescriptor[] chunkDesc)
Create new entry for list of chunk servers.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ControllerSEntry csle)
Compare this entry to another by number of chunks stored.
|
boolean |
equals(ControllerSEntry cme) |
boolean |
equals(HostID cs) |
ChunkDescriptor[] |
getChunks() |
HostID |
getID()
Get the host id of the chunkserver
described by this entry.
|
boolean |
hasExpired() |
boolean |
holdsChunk(ChunkDescriptor cd) |
void |
incrementNumChunks() |
void |
setNumChunks(int n) |
java.lang.String |
toString()
Generate human readable string describing this chunkserver list entry.
|
void |
touch(ChunkDescriptor[] chunkDesc) |
public static final long expirationSecs
public ControllerSEntry(HostID id, ChunkDescriptor[] chunkDesc)
id
- Identification for chunkserver we are describing.chunkDesc
- Chunks initially on chunkserver.public HostID getID()
public void setNumChunks(int n)
public void incrementNumChunks()
public void touch(ChunkDescriptor[] chunkDesc)
public boolean hasExpired()
public boolean holdsChunk(ChunkDescriptor cd)
public ChunkDescriptor[] getChunks()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(ControllerSEntry cme)
public boolean equals(HostID cs)
public int compareTo(ControllerSEntry csle)
compareTo
in interface java.lang.Comparable<ControllerSEntry>