public final class RecordToIDMap extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RecordToIDMap.ReadAccessor
An accessor for performing lookup operations.
|
static class |
RecordToIDMap.WriteAccessor
An accessor for building the map.
|
Constructor and Description |
---|
RecordToIDMap(RecordTokenType keyType,
int initialCapacity)
Create a new RecordToIDMap
|
Modifier and Type | Method and Description |
---|---|
RecordTokenType |
getKeyType()
Returns the type of keys contained within this map.
|
RecordValuedIterator |
newIterator()
Creates an iterator to iterate over keys within the map.
|
RecordToIDMap.WriteAccessor |
newLRUWriteAccessor(RecordValued value,
int maxSize)
Creates an accessor for building the map.
|
RecordToIDMap.ReadAccessor |
newReadAccessor(RecordValued value)
Creates an accessor for performing lookup operations.
|
RecordToIDMap.WriteAccessor |
newWriteAccessor(RecordValued value)
Creates an accessor for building the map.
|
int |
size()
Creates the number of entries in the map.
|
public RecordToIDMap(RecordTokenType keyType, int initialCapacity)
keyType
- The record token type that corresponds to the keys
that we are selecting. Must be a subset of values from the record
input from which we are building/looking up.initialCapacity
- The initial capacity ( in records ) to use for the
internal data structures of this mapping.public RecordToIDMap.ReadAccessor newReadAccessor(RecordValued value)
NOTE: From a thread safety standpoint, it is safe to
have multiple ReadAccessors
in different threads that reference a single
RecordToIDMap
. However, each thread must have
its own ReadAccessor
instance.
value
- The record valued object for which we are performing lookup
operations. Typically will be a RecordInput
.ReadAccessor
public RecordTokenType getKeyType()
public RecordToIDMap.WriteAccessor newWriteAccessor(RecordValued value)
NOTE: From a thread safety standpoint, it is unsafe to
have multiple WriteAccessors
in different threads that reference a single
RecordToIDMap
.
value
- The record valued object from which we are building the map.
Typically will be a RecordInput
.WriteAccessor
public RecordToIDMap.WriteAccessor newLRUWriteAccessor(RecordValued value, int maxSize)
NOTE: From a thread safety standpoint, it is unsafe to
have multiple WriteAccessors
in different threads that reference a single
RecordToIDMap
.
value
- The record valued object from which we are building the map.
Typically will be a RecordInput
.maxSize
- The maximum number of items to keep in the mapWriteAccessor
public RecordValuedIterator newIterator()
absolute index
of
the iterator will be equivalent to the ID.public int size()
Copyright © 2020 Actian Corporation. All rights reserved.