tachyon
Class WorkerInfo

java.lang.Object
  extended by tachyon.WorkerInfo

public class WorkerInfo
extends Object

The structure to store a worker's information.


Field Summary
 InetSocketAddress ADDRESS
           
 
Constructor Summary
WorkerInfo(long id, InetSocketAddress address, long capacityBytes)
           
 
Method Summary
 boolean containPartition(long partition)
           
 ClientWorkerInfo generateClientWorkerInfo()
           
 InetSocketAddress getAddress()
           
 long getAvailableBytes()
           
 long getCapacityBytes()
           
 Set<Integer> getFiles()
           
 long getId()
           
 long getLastUpdatedTimeMs()
           
 long getUsedBytes()
           
 void removeFile(int fileId)
           
 boolean requestSpaceBytes(long requestSpaceBytes)
           
 void returnUsedBytes(long returnUsedBytes)
           
 String toString()
           
 void updateFile(boolean add, int fileId)
           
 void updateFiles(boolean add, Collection<Integer> fileIds)
           
 void updateId(long id)
           
 void updateLastUpdatedTimeMs()
           
 void updateUsedBytes(long usedBytes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ADDRESS

public final InetSocketAddress ADDRESS
Constructor Detail

WorkerInfo

public WorkerInfo(long id,
                  InetSocketAddress address,
                  long capacityBytes)
Method Detail

containPartition

public boolean containPartition(long partition)

getAddress

public InetSocketAddress getAddress()

getAvailableBytes

public long getAvailableBytes()

getCapacityBytes

public long getCapacityBytes()

getId

public long getId()

getLastUpdatedTimeMs

public long getLastUpdatedTimeMs()

getFiles

public Set<Integer> getFiles()

getUsedBytes

public long getUsedBytes()

requestSpaceBytes

public boolean requestSpaceBytes(long requestSpaceBytes)

returnUsedBytes

public void returnUsedBytes(long returnUsedBytes)

removeFile

public void removeFile(int fileId)

toString

public String toString()
Overrides:
toString in class Object

updateFile

public void updateFile(boolean add,
                       int fileId)

updateFiles

public void updateFiles(boolean add,
                        Collection<Integer> fileIds)

updateId

public void updateId(long id)

updateLastUpdatedTimeMs

public void updateLastUpdatedTimeMs()

updateUsedBytes

public void updateUsedBytes(long usedBytes)

generateClientWorkerInfo

public ClientWorkerInfo generateClientWorkerInfo()


Copyright © 2013. All Rights Reserved.