java.lang.Object
org.rrd4j.core.RrdAllocator
An internal usage class.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate longOffset of the next free byte in the file.Constructor Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescription(package private) longallocate(long byteCount) Next available byte offset in the allocation space.
Field Details
allocationPointer
private long allocationPointerOffset of the next free byte in the file.
Constructor Details
RrdAllocator
RrdAllocator()Creates an allocator whose byte offset starts at zero.
Method Details
allocate
long allocate(long byteCount) Next available byte offset in the allocation space.- Parameters:
byteCount- how many bytes to reserve; must not be negative- Returns:
- the start offset of the reserved space