@Test public void testCreateLocalHistory() { final ClientLocalHistory history = behavior.createLocalHistory(); Assert.assertEquals(behavior.getIdentifier(), history.getIdentifier().getClientId()); }
@Override public final ClientLocalHistory createLocalHistory() { final LocalHistoryIdentifier historyId = new LocalHistoryIdentifier(getIdentifier(), nextHistoryId.getAndIncrement()); final long stamp = lock.readLock(); try { if (aborted != null) { Throwables.throwIfUnchecked(aborted); throw new RuntimeException(aborted); } final ClientLocalHistory history = new ClientLocalHistory(this, historyId); LOG.debug("{}: creating a new local history {}", persistenceId(), history); Verify.verify(histories.put(historyId, history) == null); return history; } finally { lock.unlockRead(stamp); } }
AbstractDataStoreClientBehavior extends ClientActorBehavior<ShardBackendInfo> implements DataStoreClient { @Override public final ClientLocalHistory createLocalHistory() { final LocalHistoryIdentifier historyId = new LocalHistoryIdentifier(getIdentifier(), nextHistoryId.getAndIncrement()); final long stamp = lock.readLock(); try { if (aborted != null) { Throwables.throwIfUnchecked(aborted); throw new RuntimeException(aborted); } final ClientLocalHistory history = new ClientLocalHistory(this, historyId); LOG.debug("{}: creating a new local history {}", persistenceId(), history); Verify.verify(histories.put(historyId, history) == null); return history; } finally { lock.unlockRead(stamp); } } }
AbstractDataStoreClientBehavior extends ClientActorBehavior<ShardBackendInfo> implements DataStoreClient { @Override public final ClientLocalHistory createLocalHistory() { final LocalHistoryIdentifier historyId = new LocalHistoryIdentifier(getIdentifier(), nextHistoryId.getAndIncrement()); final long stamp = lock.readLock(); try { if (aborted != null) { Throwables.throwIfUnchecked(aborted); throw new RuntimeException(aborted); } final ClientLocalHistory history = new ClientLocalHistory(this, historyId); LOG.debug("{}: creating a new local history {}", persistenceId(), history); Verify.verify(histories.put(historyId, history) == null); return history; } finally { lock.unlockRead(stamp); } } AbstractDataStoreClientBehavior(final ClientActorContext context,
            final BackendInfoResolver<ShardBackendInfo> resolver); }
AbstractDataStoreClientBehavior extends ClientActorBehavior<ShardBackendInfo> implements DataStoreClient { @Override public final ClientLocalHistory createLocalHistory() { final LocalHistoryIdentifier historyId = new LocalHistoryIdentifier(getIdentifier(), nextHistoryId.getAndIncrement()); final long stamp = lock.readLock(); try { if (aborted != null) { Throwables.throwIfUnchecked(aborted); throw new RuntimeException(aborted); } final ClientLocalHistory history = new ClientLocalHistory(this, historyId); LOG.debug("{}: creating a new local history {}", persistenceId(), history); Verify.verify(histories.put(historyId, history) == null); return history; } finally { lock.unlockRead(stamp); } } AbstractDataStoreClientBehavior(final ClientActorContext context,
            final BackendInfoResolver<ShardBackendInfo> resolver); @Override final ClientLocalHistory createLocalHistory(); @Override final ClientTransaction createTransaction(); @Override final ClientSnapshot createSnapshot(); @Override void close(); }
AbstractDataStoreClientBehavior extends ClientActorBehavior<ShardBackendInfo> implements DataStoreClient { @Override public final ClientLocalHistory createLocalHistory() { final LocalHistoryIdentifier historyId = new LocalHistoryIdentifier(getIdentifier(), nextHistoryId.getAndIncrement()); final long stamp = lock.readLock(); try { if (aborted != null) { Throwables.throwIfUnchecked(aborted); throw new RuntimeException(aborted); } final ClientLocalHistory history = new ClientLocalHistory(this, historyId); LOG.debug("{}: creating a new local history {}", persistenceId(), history); Verify.verify(histories.put(historyId, history) == null); return history; } finally { lock.unlockRead(stamp); } } AbstractDataStoreClientBehavior(final ClientActorContext context,
            final BackendInfoResolver<ShardBackendInfo> resolver); @Override final ClientLocalHistory createLocalHistory(); @Override final ClientTransaction createTransaction(); @Override final ClientSnapshot createSnapshot(); @Override void close();  }