public class HollowReadStateEngine extends java.lang.Object implements HollowStateEngine, HollowDataAccess
A dataset changes over time. A core concept in Hollow is that the timeline for a changing dataset can be broken down into discrete data states, each of which is a complete snapshot of the data at a particular point in time. Data consumers handle data states with a HollowReadStateEngine.
Constructor and Description |
---|
HollowReadStateEngine() |
HollowReadStateEngine(ArraySegmentRecycler recycler) |
HollowReadStateEngine(boolean listenToAllPopulatedOrdinals) |
HollowReadStateEngine(HollowObjectHashCodeFinder hashCodeFinder) |
HollowReadStateEngine(HollowObjectHashCodeFinder hashCodeFinder,
boolean listenToAllPopulatedOrdinals,
ArraySegmentRecycler recycler) |
Modifier and Type | Method and Description |
---|---|
void |
addTypeListener(java.lang.String typeName,
HollowTypeStateListener listener)
Add a
HollowTypeStateListener to a type. |
protected void |
addTypeState(HollowTypeReadState typeState) |
protected void |
afterInitialization() |
java.util.Collection<java.lang.String> |
getAllTypes() |
long |
getCurrentRandomizedTag() |
HollowObjectHashCodeFinder |
getHashCodeFinder() |
java.lang.String |
getHeaderTag(java.lang.String name) |
java.util.Map<java.lang.String,java.lang.String> |
getHeaderTags() |
ArraySegmentRecycler |
getMemoryRecycler() |
MissingDataHandler |
getMissingDataHandler() |
HollowSchema |
getSchema(java.lang.String type) |
java.util.List<HollowSchema> |
getSchemas() |
HollowTypeDataAccess |
getTypeDataAccess(java.lang.String type) |
HollowTypeDataAccess |
getTypeDataAccess(java.lang.String type,
int ordinal) |
HollowTypeReadState |
getTypeState(java.lang.String type) |
java.util.Collection<HollowTypeReadState> |
getTypeStates() |
java.util.Set<java.lang.String> |
getTypesWithDefinedHashCodes() |
boolean |
hasSampleResults() |
void |
invalidate() |
boolean |
isListenToAllPopulatedOrdinals() |
void |
resetSampling() |
void |
setCurrentRandomizedTag(long currentRandomizedTag) |
void |
setHeaderTags(java.util.Map<java.lang.String,java.lang.String> headerTags) |
void |
setMissingDataHandler(MissingDataHandler handler) |
boolean |
updatedLastCycle() |
public HollowReadStateEngine()
public HollowReadStateEngine(HollowObjectHashCodeFinder hashCodeFinder)
public HollowReadStateEngine(boolean listenToAllPopulatedOrdinals)
public HollowReadStateEngine(ArraySegmentRecycler recycler)
public HollowReadStateEngine(HollowObjectHashCodeFinder hashCodeFinder, boolean listenToAllPopulatedOrdinals, ArraySegmentRecycler recycler)
public HollowObjectHashCodeFinder getHashCodeFinder()
getHashCodeFinder
in interface HollowDataAccess
protected void addTypeState(HollowTypeReadState typeState)
public void addTypeListener(java.lang.String typeName, HollowTypeStateListener listener)
HollowTypeStateListener
to a type.public HollowTypeDataAccess getTypeDataAccess(java.lang.String type)
getTypeDataAccess
in interface HollowDataAccess
public HollowTypeDataAccess getTypeDataAccess(java.lang.String type, int ordinal)
getTypeDataAccess
in interface HollowDataAccess
type
- The type nameordinal
- optional parameter. When known, may provide a more optimal data access implementation for traversal of historical data access.public java.util.Collection<java.lang.String> getAllTypes()
getAllTypes
in interface HollowDataAccess
public HollowTypeReadState getTypeState(java.lang.String type)
public java.util.Collection<HollowTypeReadState> getTypeStates()
public ArraySegmentRecycler getMemoryRecycler()
public boolean isListenToAllPopulatedOrdinals()
public java.util.List<HollowSchema> getSchemas()
getSchemas
in interface HollowDataset
getSchemas
in interface HollowStateEngine
getSchemas
in interface HollowDataAccess
public HollowSchema getSchema(java.lang.String type)
getSchema
in interface HollowDataset
getSchema
in interface HollowStateEngine
getSchema
in interface HollowDataAccess
protected void afterInitialization()
public void setMissingDataHandler(MissingDataHandler handler)
public MissingDataHandler getMissingDataHandler()
getMissingDataHandler
in interface HollowDataAccess
public void setHeaderTags(java.util.Map<java.lang.String,java.lang.String> headerTags)
public java.util.Map<java.lang.String,java.lang.String> getHeaderTags()
getHeaderTags
in interface HollowStateEngine
public java.lang.String getHeaderTag(java.lang.String name)
getHeaderTag
in interface HollowStateEngine
public void invalidate()
public void resetSampling()
resetSampling
in interface HollowDataAccess
public boolean hasSampleResults()
hasSampleResults
in interface HollowDataAccess
public boolean updatedLastCycle()
public java.util.Set<java.lang.String> getTypesWithDefinedHashCodes()
public long getCurrentRandomizedTag()
public void setCurrentRandomizedTag(long currentRandomizedTag)