public final class

AddressSegmentMap

extends SegmentMap<K extends Comparable<K>, V extends ISegment<K>>
java.lang.Object
   ↳ java.util.AbstractMap<K, V>
     ↳ java.util.concurrent.ConcurrentSkipListMap<K, V>
       ↳ com.pnfsoftware.jeb.util.collect.SegmentMap<K extends java.lang.Comparable<K>, V extends com.pnfsoftware.jeb.util.collect.ISegment<K>>
         ↳ com.pnfsoftware.jeb.util.collect.AddressSegmentMap<T extends com.pnfsoftware.jeb.util.collect.ISegment<java.lang.Long>>

Class Overview

Segment-map specialized to handle memory addresses, up to 64-bit. The addresses are represented as longs, and should be interpreted as unsigned.

Caveat: for 64-bit spaces, the theoretically addressable byte (address 0xFFFF_FFFF_FFFF_FFFF) is not accessible. Therefore, a segment such as (base=0xFFFF_FFFF_FFFF_FFF0,size=0x10) is attempting to insert it into the map will throw an exception. The following segment would be valid: (base=0xFFFF_FFFF_FFFF_FFF0,size=0xF)

Thread safety: partially concurrent (refer to SegmentMap)

Summary

Public Constructors
AddressSegmentMap(int bitsize)
Create a segment-map designed to hold memory keys as addresses.
Public Methods
final boolean isValidKey(Long k)
Validate whether or not the provided key is valid.
[Expand]
Inherited Methods
From class com.pnfsoftware.jeb.util.collect.SegmentMap
From class java.util.concurrent.ConcurrentSkipListMap
From class java.util.AbstractMap
From class java.lang.Object
From interface com.pnfsoftware.jeb.util.collect.ISegmentMap
From interface java.util.Map
From interface java.util.NavigableMap
From interface java.util.SortedMap
From interface java.util.concurrent.ConcurrentMap
From interface java.util.concurrent.ConcurrentNavigableMap

Public Constructors

public AddressSegmentMap (int bitsize)

Create a segment-map designed to hold memory keys as addresses.

Parameters
bitsize in [1, 64]

Public Methods

public final boolean isValidKey (Long k)

Validate whether or not the provided key is valid. The default implementation simply returns true: all objects of type K are valid keys, as would be expected by an implementation of Map.

This method is called when attempting to insert an entry into a map (using add, put, or putall).

Parameters
k a key
Returns
  • true or false