Package org.molgenis.data.cache.l3
Class L3CacheRepositoryDecorator
- java.lang.Object
-
- com.google.common.collect.ForwardingObject
-
- org.molgenis.data.AbstractRepositoryDecorator<org.molgenis.data.Entity>
-
- org.molgenis.data.cache.l3.L3CacheRepositoryDecorator
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.lang.Iterable<org.molgenis.data.Entity>,org.molgenis.data.Repository<org.molgenis.data.Entity>
public class L3CacheRepositoryDecorator extends org.molgenis.data.AbstractRepositoryDecorator<org.molgenis.data.Entity>Retrieves identifiers from theL3Cachebased on aQueryifRepositoryCapability.CACHEABLE.Delegates to the underlying
Repository
-
-
Constructor Summary
Constructors Constructor Description L3CacheRepositoryDecorator(org.molgenis.data.Repository<org.molgenis.data.Entity> delegateRepository, L3Cache l3Cache, org.molgenis.data.transaction.TransactionInformation transactionInformation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.stream.Stream<org.molgenis.data.Entity>findAll(org.molgenis.data.Query<org.molgenis.data.Entity> query)Retrieves aListof identifiers from theL3Cacheif theRepositoryis cacheable and theQueryis limited (i.e.org.molgenis.data.EntityfindOne(org.molgenis.data.Query<org.molgenis.data.Entity> query)Retrieves a single identifier from theL3Cacheif theRepositoryis cacheable and hasn't been touched in this transaction.-
Methods inherited from class org.molgenis.data.AbstractRepositoryDecorator
add, add, aggregate, close, count, count, delegate, delete, delete, deleteAll, deleteAll, deleteById, findAll, findAll, findOneById, findOneById, forEachBatched, getCapabilities, getEntityType, getName, getQueryOperators, iterator, query, update, update
-
-
-
-
Constructor Detail
-
L3CacheRepositoryDecorator
public L3CacheRepositoryDecorator(org.molgenis.data.Repository<org.molgenis.data.Entity> delegateRepository, L3Cache l3Cache, org.molgenis.data.transaction.TransactionInformation transactionInformation)
-
-
Method Detail
-
findAll
public java.util.stream.Stream<org.molgenis.data.Entity> findAll(org.molgenis.data.Query<org.molgenis.data.Entity> query)
Retrieves aListof identifiers from theL3Cacheif theRepositoryis cacheable and theQueryis limited (i.e. contains a pageSize) between 0 and MAX_PAGE_SIZE- Specified by:
findAllin interfaceorg.molgenis.data.Repository<org.molgenis.data.Entity>- Overrides:
findAllin classorg.molgenis.data.AbstractRepositoryDecorator<org.molgenis.data.Entity>- Parameters:
query- TheQuery- Returns:
- A stream of
Entity
-
findOne
public org.molgenis.data.Entity findOne(org.molgenis.data.Query<org.molgenis.data.Entity> query)
Retrieves a single identifier from theL3Cacheif theRepositoryis cacheable and hasn't been touched in this transaction.- Specified by:
findOnein interfaceorg.molgenis.data.Repository<org.molgenis.data.Entity>- Overrides:
findOnein classorg.molgenis.data.AbstractRepositoryDecorator<org.molgenis.data.Entity>- Parameters:
query- TheQuery- Returns:
- A single
Entityor null if not found
-
-