Package org.infinispan.container.offheap
Class MemoryAddressHash
- java.lang.Object
-
- org.infinispan.container.offheap.MemoryAddressHash
-
public class MemoryAddressHash extends java.lang.Object
- Since:
- 9.0
- Author:
- wburns
-
-
Constructor Summary
Constructors Constructor Description MemoryAddressHash(int pointers, OffHeapMemoryAllocator allocator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deallocate()
long
getMemoryAddressOffset(int offset)
long
getMemoryAddressOffsetNoTraceIfAbsent(int offset)
int
getPointerCount()
void
putMemoryAddressOffset(int offset, long address)
java.util.stream.LongStream
removeAll()
Removes all the address lookups by setting them to 0.java.util.stream.LongStream
removeAll(int offset, int count)
Removes all the address lookups by setting them to 0 within the given offset, limiting the removal to only a specific count of addresses.java.util.stream.LongStream
toStream()
Returns a stream of longs that are all of the various memory locations
-
-
-
Constructor Detail
-
MemoryAddressHash
public MemoryAddressHash(int pointers, OffHeapMemoryAllocator allocator)
-
-
Method Detail
-
putMemoryAddressOffset
public void putMemoryAddressOffset(int offset, long address)
-
getMemoryAddressOffset
public long getMemoryAddressOffset(int offset)
-
getMemoryAddressOffsetNoTraceIfAbsent
public long getMemoryAddressOffsetNoTraceIfAbsent(int offset)
-
deallocate
public void deallocate()
-
toStream
public java.util.stream.LongStream toStream()
Returns a stream of longs that are all of the various memory locations- Returns:
- stream of the various memory locations
-
removeAll
public java.util.stream.LongStream removeAll()
Removes all the address lookups by setting them to 0. This method returns a LongStream that contains all of valid (non zero) addresses that were present during this operation.- Returns:
- stream with the valid memory pointers to stored values
-
removeAll
public java.util.stream.LongStream removeAll(int offset, int count)
Removes all the address lookups by setting them to 0 within the given offset, limiting the removal to only a specific count of addresses. This method returns a LongStream that contains all of valid (non zero) addresses that were present during this operation.- Parameters:
offset
- offset into the blockcount
- how many pointers to look at- Returns:
- stream with the valid memory pointers to stored values
-
getPointerCount
public int getPointerCount()
-
-