/** * Writes all state into a new properties object. * * @return The properties. */ public Map<String, String> store() { Map<String, String> properties = new HashMap<String, String>(); store(properties); return properties; }
/** * Writes all state into a new properties object. * * @return The properties. */ public Map<String, String> store() { Map<String, String> properties = new HashMap<String, String>(); store(properties); return properties; }
/** * {@inheritDoc} */ @Override public void complete() { currentState.store(storedState); stateExists = true; }
/** * Creates a new instance with an initial state. * * @param initialState * The initial replication state. */ public MockReplicationDestination(ReplicationState initialState) { this(); initialState.store(storedState); stateExists = true; }
@Override public void store(Map<String, String> properties) { super.store(properties); properties.put("txnMax", Long.toString(txnMax)); properties.put("txnMaxQueried", Long.toString(txnMaxQueried)); properties.put("txnActiveList", toString(txnActive)); properties.put("txnReadyList", toString(txnReady)); }
@Override public void store(Map<String, String> properties) { super.store(properties); properties.put("txnMax", Long.toString(txnMax)); properties.put("txnMaxQueried", Long.toString(txnMaxQueried)); properties.put("txnActiveList", toString(txnActive)); properties.put("txnReadyList", toString(txnReady)); }
@Override public void complete() { if (!lockObtained) { throw new OsmosisRuntimeException("initialize has not been called"); } // Write the global state file. statePersistor.store(state.store()); state = null; // Release the lock. fileLock.unlock(); lockObtained = false; }
@Override public void complete() { if (!lockObtained) { throw new OsmosisRuntimeException("initialize has not been called"); } // Write the global state file. statePersistor.store(state.store()); state = null; // Release the lock. fileLock.unlock(); lockObtained = false; }
localStatePersistor.store(localState.store());
localStatePersistor.store(localState.store());