com.voidsearch.voidbase.apps.cache
Class VoidBaseCache

java.lang.Object
  extended by com.voidsearch.voidbase.apps.cache.VoidBaseCache
All Implemented Interfaces:
VoidBaseCacheHandler, java.lang.Cloneable
Direct Known Subclasses:
DistributedPersistenceStore, MessagePersistenceStore

public abstract class VoidBaseCache
extends java.lang.Object
implements VoidBaseCacheHandler, java.lang.Cloneable

Abstract class as an prototype for all cache handhers, handles initialization of atomicity and cache handler operation subscriptions based on configuration.


Field Summary
protected  VoidBaseConfig config
           
protected static org.slf4j.Logger logger
           
protected  java.lang.String name
           
protected  RegisteredOperations operations
           
 
Constructor Summary
VoidBaseCache()
          Creates a new instance of VoidBaseCache
 
Method Summary
 java.lang.Object clone()
          Clones a VoidBaseCache object
static VoidBaseCache getInstance()
          Not implemented for VoidBaseCache - needs to be implemented in subclasses
 CacheLockType getLockType(java.lang.String operation)
          Returns lock type for operation
 void initialize()
          Initializes cache operations and their atomicity
 java.lang.Boolean isRegistered(java.lang.String operation)
          Check if operation is registered
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.voidsearch.voidbase.apps.cache.VoidBaseCacheHandler
process, process
 

Field Detail

name

protected java.lang.String name

config

protected VoidBaseConfig config

operations

protected RegisteredOperations operations

logger

protected static final org.slf4j.Logger logger
Constructor Detail

VoidBaseCache

public VoidBaseCache()
              throws CacheException
Creates a new instance of VoidBaseCache

Throws:
CacheException
Method Detail

getInstance

public static VoidBaseCache getInstance()
                                 throws CacheException
Not implemented for VoidBaseCache - needs to be implemented in subclasses

Returns:
instance of a VoidBaseCache
Throws:
CacheException

initialize

public void initialize()
                throws CacheException
Initializes cache operations and their atomicity

Throws:
CacheException

clone

public java.lang.Object clone()
Clones a VoidBaseCache object

Overrides:
clone in class java.lang.Object
Returns:
a clone of a VoidBaseCache object

isRegistered

public java.lang.Boolean isRegistered(java.lang.String operation)
Check if operation is registered

Parameters:
operation -
Returns:
true if operation is registered and false if it's not

getLockType

public CacheLockType getLockType(java.lang.String operation)
Returns lock type for operation

Parameters:
operation -
Returns:
lock type for operation


Copyright © 2009. All Rights Reserved.