public class SpaceCounter extends Object
| Constructor and Description |
|---|
SpaceCounter(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 SpaceCounter(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 © 2015. All Rights Reserved.