com.atlassian.confluence.cache
Class CacheOperations

java.lang.Object
  extended by com.atlassian.confluence.cache.CacheOperations

public class CacheOperations
extends java.lang.Object

A cache operation recorder. Offers the ability to record a series of cache modification operations and perform them on a target cache at a later time.

See Also:
DeferredOperationsCache

Constructor Summary
CacheOperations()
           
 
Method Summary
 void clear()
          Clear all recorded cache operations
 java.util.Set filter(java.util.Collection keys)
          Filters the supplied list of keys by adding those from any 'put' operations and removing those from any 'remove' operations.
 java.lang.Object get(java.lang.Object key)
           
 boolean isRemoved(java.lang.Object key)
           
 void perform(com.atlassian.cache.Cache cache)
          Perform all recorded operations on the provided cache
 void put(java.lang.Object key, java.lang.Object value)
           
 int putCount()
           
 void remove(java.lang.Object key)
           
 void removeAll(java.util.Collection keys)
           
 int removeCount()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheOperations

public CacheOperations()
Method Detail

get

public java.lang.Object get(java.lang.Object key)

isRemoved

public boolean isRemoved(java.lang.Object key)

put

public void put(java.lang.Object key,
                java.lang.Object value)

remove

public void remove(java.lang.Object key)

removeAll

public void removeAll(java.util.Collection keys)

clear

public void clear()
Clear all recorded cache operations


filter

public java.util.Set filter(java.util.Collection keys)
Filters the supplied list of keys by adding those from any 'put' operations and removing those from any 'remove' operations.


perform

public void perform(com.atlassian.cache.Cache cache)
Perform all recorded operations on the provided cache

Parameters:
cache - Cache to perform operations on

putCount

public int putCount()
Returns:
The number of recorded put operations

removeCount

public int removeCount()
Returns:
The number of recorded remove operations


Copyright © 2003-2010 Atlassian. All Rights Reserved.