Class MemoryAddressHash


  • public class MemoryAddressHash
    extends Object
    Since:
    9.0
    Author:
    wburns
    • 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 as toStream() except that the memory addresses are also cleared out (set to 0)
        Returns:
        stream with the valid memory pointers to stored values