- java.lang.Object
-
- com.pervasive.datarush.tokens.record.RecordMap
-
public final class RecordMap extends Object
Provides a mapping interface over records by defined key fields. ARecordMap
is built by invoking one of thenewRecordMap
methods. These methods load the data cache from the record port and index the loaded records by the key fields.Once loaded, the map can be accessed via an iterator. The iterator can be synchronized with another data source. As the secondary data source is stepped, the record map iterator can then seek to the records in the cache matching the current key fields of the secondary input.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RecordMap.Builder
Factory for creating record maps.class
RecordMap.RecordMapIterator
An iterator capable of providing access to a subset of records within the record map's cache.
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_CAPACITY
Default initial capacity value
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
entryCount()
Returns the number of entries in the mapRecordTokenType
getKeyType()
Returns the token type of the keys of the map.RecordTokenType
getType()
Get the token type of the cached data.RecordValuedIterator
newEntryIterator()
Create aRecordValuedIterator
over the entries in this map.RecordMap.RecordMapIterator
newIterator(RecordValued value)
Create aRecordMap.RecordMapIterator
that is able to reference key values in the given record valued data source.
-
-
-
Field Detail
-
DEFAULT_CAPACITY
public static final int DEFAULT_CAPACITY
Default initial capacity value- See Also:
- Constant Field Values
-
-
Method Detail
-
getType
public RecordTokenType getType()
Get the token type of the cached data.- Returns:
- token type of the cached data
-
getKeyType
public RecordTokenType getKeyType()
Returns the token type of the keys of the map.- Returns:
- the token type of the keys of the map.
-
newIterator
public RecordMap.RecordMapIterator newIterator(RecordValued value)
Create aRecordMap.RecordMapIterator
that is able to reference key values in the given record valued data source. As the given data source is stepped, the iterator must be queried using theseek
method for the source's current key value.- Parameters:
value
- record valued data source- Returns:
- iterator over values in the record map matching the current key value in the data source
-
newEntryIterator
public RecordValuedIterator newEntryIterator()
Create aRecordValuedIterator
over the entries in this map. This iterator will indexed by entry number.- Returns:
- an iterator over records in the map
-
entryCount
public int entryCount()
Returns the number of entries in the map- Returns:
- the number of records stored
-
-