public class HollowWriteStateCreator
extends java.lang.Object
HollowWriteStateEngine
which is pre-populated, with a particular data model.Constructor and Description |
---|
HollowWriteStateCreator() |
Modifier and Type | Method and Description |
---|---|
static HollowWriteStateEngine |
createWithSchemas(java.util.Collection<HollowSchema> schemas) |
static void |
populateStateEngineWithTypeWriteStates(HollowWriteStateEngine stateEngine,
java.util.Collection<HollowSchema> schemas)
Pre-populate a
HollowWriteStateEngine with a specified data model. |
static void |
populateUsingReadEngine(HollowWriteStateEngine writeEngine,
HollowReadStateEngine readEngine)
Populate the supplied
HollowWriteStateEngine with all of the records from the supplied HollowReadStateEngine . |
static HollowWriteStateEngine |
recreateAndPopulateUsingReadEngine(HollowReadStateEngine readEngine)
Recreate a
HollowWriteStateEngine which can be used to write a snapshot of or continue
a delta chain from the supplied HollowReadStateEngine . |
public static HollowWriteStateEngine createWithSchemas(java.util.Collection<HollowSchema> schemas)
schemas
- The schemas from the data modelpublic static void populateStateEngineWithTypeWriteStates(HollowWriteStateEngine stateEngine, java.util.Collection<HollowSchema> schemas)
HollowWriteStateEngine
with a specified data model.stateEngine
- The state engine to pre-populateschemas
- The schemas from the data model.public static HollowWriteStateEngine recreateAndPopulateUsingReadEngine(HollowReadStateEngine readEngine)
HollowWriteStateEngine
which can be used to write a snapshot of or continue
a delta chain from the supplied HollowReadStateEngine
.
The returned state engine will be ready to write a snapshot which will exactly recreate the data in the supplied HollowReadStateEngine
.
A delta chain may be continued from this state by calling HollowWriteStateEngine.prepareForNextCycle()
.
readEngine
- public static void populateUsingReadEngine(HollowWriteStateEngine writeEngine, HollowReadStateEngine readEngine)
HollowWriteStateEngine
with all of the records from the supplied HollowReadStateEngine
.
The supplied HollowWriteStateEngine must be newly created, initialized with a data model, and empty. After this call,
the write engine will be ready to write a snapshot which will exactly recreate the data in the supplied HollowReadStateEngine
,
except with the data model which was initialized.
A delta chain may be continued from this state by calling HollowWriteStateEngine.prepareForNextCycle()
.
readEngine
-