Package io.ebeaninternal.server.cache
Class CacheChangeSet
- java.lang.Object
-
- io.ebeaninternal.server.cache.CacheChangeSet
-
public class CacheChangeSet extends Object
List of changes to be applied to L2 cache.
-
-
Constructor Summary
Constructors Constructor Description CacheChangeSet()
Construct specifying if we also need to process invalidation for entities based on views.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBeanInsert(String baseTable)
On bean insert register table for view based entity invalidation.<T> void
addBeanRemove(BeanDescriptor<T> desc, Object id)
Remove a bean from the cache.<T> void
addBeanRemoveMany(BeanDescriptor<T> desc, Collection<Object> ids)
Remove a bean from the cache.<T> void
addBeanUpdate(BeanDescriptor<T> desc, String key, Map<String,Object> changes, boolean updateNaturalKey, long version)
Update a bean entry.void
addClearBean(BeanDescriptor<?> descriptor)
Add an entry to clear a bean cache.void
addClearQuery(BeanDescriptor<?> descriptor)
Add an entry to clear a query cache.void
addInvalidate(BeanDescriptor<?> descriptor)
Add an entry to clear a query cache.void
addInvalidate(Set<String> tables)
Add invalidation on a set of tables.<T> void
addManyClear(BeanDescriptor<T> desc, String manyProperty)
Add many property clear.<T> void
addManyPut(BeanDescriptor<T> desc, String manyProperty, Object parentId, CachedManyIds entry)
Add many property put.<T> void
addManyRemove(BeanDescriptor<T> desc, String manyProperty, Object parentId)
Add many property remove.<T> void
addNaturalKeyPut(BeanDescriptor<T> desc, String key, String val)
Update a natural key.void
apply()
Apply the changes to the L2 cache except entity/view invalidation.Set<String>
touchedTables()
Return the touched tables.
-
-
-
Constructor Detail
-
CacheChangeSet
public CacheChangeSet()
Construct specifying if we also need to process invalidation for entities based on views.
-
-
Method Detail
-
touchedTables
public Set<String> touchedTables()
Return the touched tables.
-
apply
public void apply()
Apply the changes to the L2 cache except entity/view invalidation.Return the set of table changes to process invalidation for entities based on views.
-
addInvalidate
public void addInvalidate(BeanDescriptor<?> descriptor)
Add an entry to clear a query cache.
-
addInvalidate
public void addInvalidate(Set<String> tables)
Add invalidation on a set of tables.
-
addClearQuery
public void addClearQuery(BeanDescriptor<?> descriptor)
Add an entry to clear a query cache.
-
addClearBean
public void addClearBean(BeanDescriptor<?> descriptor)
Add an entry to clear a bean cache.
-
addManyClear
public <T> void addManyClear(BeanDescriptor<T> desc, String manyProperty)
Add many property clear.
-
addManyRemove
public <T> void addManyRemove(BeanDescriptor<T> desc, String manyProperty, Object parentId)
Add many property remove.
-
addManyPut
public <T> void addManyPut(BeanDescriptor<T> desc, String manyProperty, Object parentId, CachedManyIds entry)
Add many property put.
-
addBeanInsert
public void addBeanInsert(String baseTable)
On bean insert register table for view based entity invalidation.
-
addBeanRemove
public <T> void addBeanRemove(BeanDescriptor<T> desc, Object id)
Remove a bean from the cache.
-
addBeanRemoveMany
public <T> void addBeanRemoveMany(BeanDescriptor<T> desc, Collection<Object> ids)
Remove a bean from the cache.
-
addBeanUpdate
public <T> void addBeanUpdate(BeanDescriptor<T> desc, String key, Map<String,Object> changes, boolean updateNaturalKey, long version)
Update a bean entry.
-
addNaturalKeyPut
public <T> void addNaturalKeyPut(BeanDescriptor<T> desc, String key, String val)
Update a natural key.
-
-