private LockReason lockReason;
private DataStores datastores;
private String lastUpdatedTime;
+ private Boolean dataSyncEnabled;
/**
* To create the {@link CompositeState}.
compositeState.setLockReason(lockReason);
compositeState.setDataStores(datastores);
compositeState.setLastUpdateTime(lastUpdatedTime);
+ compositeState.setDataSyncEnabled(dataSyncEnabled);
return compositeState;
}
/**
* To use attributes for creating {@link CompositeState}.
*
- * @param syncState for the locked state
+ * @param dataStoreSyncState for the locked state
* @param lastSyncTime for the locked state
* @return CompositeStateBuilder
*/
- public CompositeStateBuilder withOperationalDataStores(final SyncState syncState, final String lastSyncTime) {
+ public CompositeStateBuilder withOperationalDataStores(final DataStoreSyncState dataStoreSyncState,
+ final String lastSyncTime) {
this.datastores = DataStores.builder().operationalDataStore(
- Operational.builder().syncState(syncState).lastSyncTime(lastSyncTime).build()).build();
+ Operational.builder().dataStoreSyncState(dataStoreSyncState).lastSyncTime(lastSyncTime).build()).build();
return this;
}
this.cmHandleState = CmHandleState.valueOf((String) dataNode.getLeaves()
.get("cm-handle-state"));
this.lastUpdatedTime = (String) dataNode.getLeaves().get("last-update-time");
+ if (this.cmHandleState == CmHandleState.READY) {
+ this.dataSyncEnabled = (Boolean) dataNode.getLeaves().get("data-sync-enabled");
+ }
for (final DataNode stateChildNode : dataNode.getChildDataNodes()) {
if (stateChildNode.getXpath().endsWith("/lock-reason")) {
this.lockReason = getLockReason(stateChildNode);
private Operational getOperationalDataStore(final DataNode dataStoreNodes) {
return Operational.builder()
- .syncState(SyncState.valueOf((String) dataStoreNodes.getLeaves().get("sync-state")))
+ .dataStoreSyncState(DataStoreSyncState.valueOf((String) dataStoreNodes.getLeaves().get("sync-state")))
.lastSyncTime((String) dataStoreNodes.getLeaves().get("last-sync-time"))
.build();
}