public class WorkerSpaceCounter extends Object
Constructor and Description |
---|
WorkerSpaceCounter(long capacityBytes) |
Modifier and Type | Method and Description |
---|---|
long |
getAvailableBytes() |
long |
getCapacityBytes() |
long |
getUsedBytes() |
boolean |
requestSpaceBytes(long requestSpaceBytes)
Request space
|
void |
returnUsedBytes(long returnUsedBytes)
Return used space size
|
String |
toString() |
void |
updateUsedBytes(long usedBytes)
Update the used bytes
|
public WorkerSpaceCounter(long capacityBytes)
capacityBytes
- The maximum memory space the TachyonWorker can use, in bytespublic long getAvailableBytes()
public long getCapacityBytes()
public long getUsedBytes()
public boolean requestSpaceBytes(long requestSpaceBytes)
requestSpaceBytes
- The requested space size, in bytespublic void returnUsedBytes(long returnUsedBytes)
returnUsedBytes
- The returned space size, in bytespublic void updateUsedBytes(long usedBytes)
usedBytes
- The new used bytesCopyright © 2014. All rights reserved.