Package org.infinispan.container.offheap
Class MemoryAddressHash
- java.lang.Object
-
- org.infinispan.container.offheap.MemoryAddressHash
-
public class MemoryAddressHash extends Object
- Since:
- 9.0
- Author:
- wburns
-
-
Constructor Summary
Constructors Constructor Description MemoryAddressHash(int pointers, org.infinispan.container.offheap.OffsetCalculator offSetCalculator, OffHeapMemoryAllocator allocator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deallocate()
long
getMemoryAddress(Object instance)
long
getMemoryAddressOffset(int offset)
long
getMemoryAddressOffsetNoTraceIfAbsent(int offset)
void
putMemoryAddress(Object instance, long address)
LongStream
toStream()
Returns a stream of longs that are all of the various memory locationsLongStream
toStreamRemoved()
Same astoStream()
except that the memory addresses are also cleared out (set to 0)
-
-
-
Constructor Detail
-
MemoryAddressHash
public MemoryAddressHash(int pointers, org.infinispan.container.offheap.OffsetCalculator offSetCalculator, OffHeapMemoryAllocator allocator)
-
-
Method Detail
-
putMemoryAddress
public void putMemoryAddress(Object instance, long address)
-
getMemoryAddress
public long getMemoryAddress(Object instance)
-
getMemoryAddressOffset
public long getMemoryAddressOffset(int offset)
-
getMemoryAddressOffsetNoTraceIfAbsent
public long getMemoryAddressOffsetNoTraceIfAbsent(int offset)
-
deallocate
public void deallocate()
-
toStream
public LongStream toStream()
Returns a stream of longs that are all of the various memory locations- Returns:
- stream of the various memory locations
-
toStreamRemoved
public LongStream toStreamRemoved()
Same astoStream()
except that the memory addresses are also cleared out (set to 0)- Returns:
- stream with the valid memory pointers to stored values
-
-