@Override public String getCacheId() { return storeProxy.getCacheId(); }
@Override public String getCacheId() { return delegate.getCacheId(); }
@Override public void releaseServerStoreProxy(ServerStoreProxy storeProxy, boolean isReconnect) { connectionState.removeClusterTierClientEntity(storeProxy.getCacheId()); if (!isReconnect) { storeProxy.close(); } else { reconnectSet.add(storeProxy.getCacheId()); } }
getClusteredCacheIdentifier(service, cacheAlias), storeConfiguration, Consistency.EVENTUAL, mock(ServerCallback.class)); assertThat(serverStoreProxy.getCacheId(), is(cacheAlias));
assertThat(sharedProxy.getCacheId(), is("sharedCache")); assertThat(dedicatedProxy.getCacheId(), is("dedicatedCache"));
getClusteredCacheIdentifier(service, cacheAlias), storeConfiguration, Consistency.EVENTUAL, mock(ServerCallback.class)); assertThat(serverStoreProxy.getCacheId(), is(cacheAlias));
assertThat(serverStoreProxy.getCacheId(), is(cacheAlias));
assertThat(firstServerStoreProxy.getCacheId(), is(cacheAlias)); assertThat(secondServerStoreProxy.getCacheId(), is(cacheAlias));
assertThat(serverStoreProxy.getCacheId(), is(cacheAlias));
assertThat(serverStoreProxy.getCacheId(), is(cacheAlias));
assertThat(serverStoreProxy.getCacheId(), is(cacheAlias));
assertThat(firstServerStoreProxy.getCacheId(), is(cacheAlias)); assertThat(secondServerStoreProxy.getCacheId(), is(cacheAlias));
assertThat(creationServerStoreProxy.getCacheId(), is(cacheAlias)); assertThat(accessServerStoreProxy.getCacheId(), is(cacheAlias));
assertThat(creationServerStoreProxy.getCacheId(), is(cacheAlias)); assertThat(accessServerStoreProxy.getCacheId(), is(cacheAlias));
@Override public String getCacheId() { return delegate.getCacheId(); }
@Override public void releaseServerStoreProxy(ServerStoreProxy storeProxy, boolean isReconnect) { connectionState.removeClusterTierClientEntity(storeProxy.getCacheId()); if (!isReconnect) { storeProxy.close(); } else { reconnectSet.add(storeProxy.getCacheId()); } }
@Override public String getCacheId() { return proxy().getCacheId(); }
private <T> T onStoreProxy(TimeoutExceptionFunction<ServerStoreProxy, T> function) throws TimeoutException { ServerStoreProxy storeProxy = proxy(); try { return function.apply(storeProxy); } catch (ServerStoreProxyException sspe) { if (sspe.getCause() instanceof ConnectionClosedException) { if (delegateRef.compareAndSet(storeProxy, new ReconnectInProgressProxy(storeProxy.getCacheId()))) { onReconnect.run(); } return onStoreProxy(function); } else { throw sspe; } } }