use of org.infinispan.persistence.support.DelegatingNonBlockingStore in project infinispan by infinispan.
the class TestingUtil method getStore.
@SuppressWarnings({ "unchecked", "unchecked cast" })
public static <T extends NonBlockingStore<K, V>, K, V> T getStore(Cache<K, V> cache, int position, boolean unwrapped) {
PersistenceManagerImpl persistenceManager = getActualPersistenceManager(cache);
NonBlockingStore<K, V> nonBlockingStore = persistenceManager.<K, V>getAllStores(characteristics -> !characteristics.contains(NonBlockingStore.Characteristic.WRITE_ONLY)).get(position);
if (unwrapped && nonBlockingStore instanceof DelegatingNonBlockingStore) {
nonBlockingStore = ((DelegatingNonBlockingStore<K, V>) nonBlockingStore).delegate();
}
return (T) nonBlockingStore;
}
Aggregations