- 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. ARecordMapis built by invoking one of thenewRecordMapmethods. 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 classRecordMap.BuilderFactory for creating record maps.classRecordMap.RecordMapIteratorAn 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 intDEFAULT_CAPACITYDefault initial capacity value
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intentryCount()Returns the number of entries in the mapRecordTokenTypegetKeyType()Returns the token type of the keys of the map.RecordTokenTypegetType()Get the token type of the cached data.RecordValuedIteratornewEntryIterator()Create aRecordValuedIteratorover the entries in this map.RecordMap.RecordMapIteratornewIterator(RecordValued value)Create aRecordMap.RecordMapIteratorthat 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.RecordMapIteratorthat 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 theseekmethod 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 aRecordValuedIteratorover 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
-
-