* @param addressToFlush address to flush in addition to the current address
* @param block if true, mimics setting a flush. Otherwise, mimics un-setting a flush.
* @throws Exception if there are issues
*/
private void mimicPartialFlushViaRPC(Address addressToFlush, boolean block) throws Exception {
StateTransferControlCommand cmd = commandsFactory.buildStateTransferControlCommand(block);
if (!block) rpcManager.getTransport().getDistributedSync().releaseSync();
rpcManager.invokeRemotely(Collections.singletonList(addressToFlush), cmd, ResponseMode.SYNCHRONOUS, configuration.getStateRetrievalTimeout(), true);
if (block) rpcManager.getTransport().getDistributedSync().acquireSync();
}