Class SegmentedLongArray
- java.lang.Object
-
- org.apache.pulsar.common.util.collections.SegmentedLongArray
-
- All Implemented Interfaces:
java.lang.AutoCloseable
@NotThreadSafe public class SegmentedLongArray extends java.lang.Object implements java.lang.AutoCloseable
-
-
Constructor Summary
Constructors Constructor Description SegmentedLongArray(long initialCapacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longbytesCapacity()The amount of memory used to back the array of longs.voidclose()voidincreaseCapacity()longreadLong(long offset)voidshrink(long newCapacity)voidwriteLong(long offset, long value)
-
-
-
Method Detail
-
writeLong
public void writeLong(long offset, long value)
-
readLong
public long readLong(long offset)
-
increaseCapacity
public void increaseCapacity()
-
shrink
public void shrink(long newCapacity)
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
bytesCapacity
public long bytesCapacity()
The amount of memory used to back the array of longs.
-
-