@Component public class L1Cache extends DefaultMolgenisTransactionListener
| Modifier and Type | Method and Description |
|---|---|
void |
doCleanupAfterCompletion(String transactionId) |
Optional<CacheHit<Entity>> |
get(String entityTypeId,
Object id,
EntityType entityType)
Retrieves an entity from the L1 cache based on a combination of entity name and entity id.
|
void |
put(String entityTypeId,
Entity entity)
Puts an entity into the L1 cache, if the cache exists for the current thread.
|
void |
transactionStarted(String transactionId) |
afterCommitTransaction, commitTransaction, rollbackTransactionpublic void transactionStarted(String transactionId)
transactionStarted in interface TransactionListenertransactionStarted in class DefaultMolgenisTransactionListenerpublic void doCleanupAfterCompletion(String transactionId)
doCleanupAfterCompletion in interface TransactionListenerdoCleanupAfterCompletion in class DefaultMolgenisTransactionListenerpublic Optional<CacheHit<Entity>> get(String entityTypeId, Object id, EntityType entityType)
entityTypeId - name of the entity to retrieveid - id value of the entity to retrieveOptional of which the CacheHit contains an Entity or is
empty if deletion of this entity is stored in the cache, or Optional.empty() if there's no
information available about this entity in the cacheCopyright © 2018 Pivotal Software, Inc.. All rights reserved.