Search in sources :

Example 1 with InMemoryFederatedCacheStore

use of org.eclipse.dataspaceconnector.catalog.store.InMemoryFederatedCacheStore in project DataSpaceConnector by eclipse-dataspaceconnector.

the class InMemoryFederatedCacheStoreTest method setUp.

@BeforeEach
public void setUp() {
    CriterionConverter<Predicate<ContractOffer>> converter = criterion -> offer -> true;
    store = new InMemoryFederatedCacheStore(converter, new LockManager(new ReentrantReadWriteLock()));
}
Also used : ContractOffer(org.eclipse.dataspaceconnector.spi.types.domain.contract.offer.ContractOffer) BeforeEach(org.junit.jupiter.api.BeforeEach) Policy(org.eclipse.dataspaceconnector.policy.model.Policy) Predicate(java.util.function.Predicate) Collection(java.util.Collection) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) UUID(java.util.UUID) ReentrantReadWriteLock(java.util.concurrent.locks.ReentrantReadWriteLock) Test(org.junit.jupiter.api.Test) FederatedCacheStore(org.eclipse.dataspaceconnector.catalog.spi.FederatedCacheStore) List(java.util.List) InMemoryFederatedCacheStore(org.eclipse.dataspaceconnector.catalog.store.InMemoryFederatedCacheStore) CriterionConverter(org.eclipse.dataspaceconnector.spi.query.CriterionConverter) Asset(org.eclipse.dataspaceconnector.spi.types.domain.asset.Asset) LockManager(org.eclipse.dataspaceconnector.common.concurrency.LockManager) Collections(java.util.Collections) LockManager(org.eclipse.dataspaceconnector.common.concurrency.LockManager) InMemoryFederatedCacheStore(org.eclipse.dataspaceconnector.catalog.store.InMemoryFederatedCacheStore) ReentrantReadWriteLock(java.util.concurrent.locks.ReentrantReadWriteLock) Predicate(java.util.function.Predicate) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

Collection (java.util.Collection)1 Collections (java.util.Collections)1 List (java.util.List)1 UUID (java.util.UUID)1 ReentrantReadWriteLock (java.util.concurrent.locks.ReentrantReadWriteLock)1 Predicate (java.util.function.Predicate)1 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)1 FederatedCacheStore (org.eclipse.dataspaceconnector.catalog.spi.FederatedCacheStore)1 InMemoryFederatedCacheStore (org.eclipse.dataspaceconnector.catalog.store.InMemoryFederatedCacheStore)1 LockManager (org.eclipse.dataspaceconnector.common.concurrency.LockManager)1 Policy (org.eclipse.dataspaceconnector.policy.model.Policy)1 CriterionConverter (org.eclipse.dataspaceconnector.spi.query.CriterionConverter)1 Asset (org.eclipse.dataspaceconnector.spi.types.domain.asset.Asset)1 ContractOffer (org.eclipse.dataspaceconnector.spi.types.domain.contract.offer.ContractOffer)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1 Test (org.junit.jupiter.api.Test)1