@Override public void initStore(Store<?, ?> resource) { CreatedStoreRef createdStoreRef = createdStores.get(resource); if (createdStoreRef == null) { throw new IllegalArgumentException("Given store is not managed by this provider : " + resource); } Store.Provider underlyingStoreProvider = createdStoreRef.storeProvider; SoftLockValueCombinedSerializerLifecycleHelper<?> helper = createdStoreRef.lifecycleHelper; if (resource instanceof XAStore) { XAStore<?, ?> xaStore = (XAStore<?, ?>) resource; underlyingStoreProvider.initStore(xaStore.underlyingStore); helper.softLockSerializerRef.set(new SoftLockSerializer<>(helper.classLoader)); try { xaStore.journal.open(); } catch (IOException ioe) { throw new RuntimeException(ioe); } xaStore.transactionManagerWrapper.registerXAResource(xaStore.uniqueXAResourceId, xaStore.recoveryXaResource); } else { underlyingStoreProvider.initStore(resource); } }
@Override public boolean equals(SoftLock<T> object, ByteBuffer binary) throws SerializerException, ClassNotFoundException { return object.equals(read(binary)); }
@Override public boolean equals(SoftLock<T> object, ByteBuffer binary) throws SerializerException, ClassNotFoundException { return object.equals(read(binary)); }
@Override public void initStore(Store<?, ?> resource) { CreatedStoreRef createdStoreRef = createdStores.get(resource); if (createdStoreRef == null) { throw new IllegalArgumentException("Given store is not managed by this provider : " + resource); } Store.Provider underlyingStoreProvider = createdStoreRef.storeProvider; SoftLockValueCombinedSerializerLifecycleHelper<?> helper = createdStoreRef.lifecycleHelper; if (resource instanceof XAStore) { XAStore<?, ?> xaStore = (XAStore<?, ?>) resource; underlyingStoreProvider.initStore(xaStore.underlyingStore); helper.softLockSerializerRef.set(new SoftLockSerializer<>(helper.classLoader)); try { xaStore.journal.open(); } catch (IOException ioe) { throw new RuntimeException(ioe); } xaStore.transactionManagerWrapper.registerXAResource(xaStore.uniqueXAResourceId, xaStore.recoveryXaResource); } else { underlyingStoreProvider.initStore(resource); } }