com.dotmarketing.portlets.chains.business
Class ChainCacheImpl

java.lang.Object
  extended by com.dotmarketing.portlets.chains.business.ChainCacheImpl
All Implemented Interfaces:
Cachable, ChainCache

public class ChainCacheImpl
extends java.lang.Object
implements ChainCache

Author:
davidtorresv

Constructor Summary
ChainCacheImpl()
           
 
Method Summary
 void clearCache()
           
 void flushAllCaches()
           
 void flushChainCache()
           
 void flushChainLinkCodeCache()
           
 void flushChainStateParametersCache()
           
 void flushChainStatesCache()
           
 Chain getChain(long chainId)
           
 Chain getChainByKey(java.lang.String chainKey)
           
 ChainLinkCode getChainLinkCode(long chainLinkCodeId)
           
 java.util.List<ChainStateParameter> getChainStateParameters(long chainStateId)
           
 java.util.List<ChainState> getChainStates(long chainId)
           
 java.lang.String[] getGroups()
          Use to get all groups the concrete cache belongs to
 java.lang.String getPrimaryGroup()
          Use to get the primary group/region for the concrete cache
 Chain putChain(Chain chain)
           
 ChainLinkCode putChainLinkCode(ChainLinkCode chainLinkCode)
           
 java.util.List<ChainStateParameter> putChainStateParameters(long chainStateId, java.util.List<ChainStateParameter> parameters)
           
 java.util.List<ChainState> putChainStates(long chainId, java.util.List<ChainState> states)
           
 Chain removeChain(long chainId)
           
 ChainLinkCode removeChainLinkCode(long chainLinkCodeId)
           
 java.util.List<ChainStateParameter> removeChainStateParameters(long chainStateId)
           
 java.util.List<ChainState> removeChainStates(long chainId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChainCacheImpl

public ChainCacheImpl()
Method Detail

getChain

public Chain getChain(long chainId)
               throws DotCacheException
Specified by:
getChain in interface ChainCache
Throws:
DotCacheException

getChainByKey

public Chain getChainByKey(java.lang.String chainKey)
                    throws DotCacheException
Specified by:
getChainByKey in interface ChainCache
Throws:
DotCacheException

getChainLinkCode

public ChainLinkCode getChainLinkCode(long chainLinkCodeId)
                               throws DotCacheException
Specified by:
getChainLinkCode in interface ChainCache
Throws:
DotCacheException

getChainStates

public java.util.List<ChainState> getChainStates(long chainId)
                                          throws DotCacheException
Specified by:
getChainStates in interface ChainCache
Throws:
DotCacheException

putChain

public Chain putChain(Chain chain)
               throws DotCacheException
Specified by:
putChain in interface ChainCache
Throws:
DotCacheException

putChainLinkCode

public ChainLinkCode putChainLinkCode(ChainLinkCode chainLinkCode)
                               throws DotCacheException
Specified by:
putChainLinkCode in interface ChainCache
Throws:
DotCacheException

putChainStates

public java.util.List<ChainState> putChainStates(long chainId,
                                                 java.util.List<ChainState> states)
                                          throws DotCacheException
Specified by:
putChainStates in interface ChainCache
Throws:
DotCacheException

removeChain

public Chain removeChain(long chainId)
                  throws DotCacheException
Specified by:
removeChain in interface ChainCache
Throws:
DotCacheException

removeChainLinkCode

public ChainLinkCode removeChainLinkCode(long chainLinkCodeId)
                                  throws DotCacheException
Specified by:
removeChainLinkCode in interface ChainCache
Throws:
DotCacheException

removeChainStates

public java.util.List<ChainState> removeChainStates(long chainId)
                                             throws DotCacheException
Specified by:
removeChainStates in interface ChainCache
Throws:
DotCacheException

getChainStateParameters

public java.util.List<ChainStateParameter> getChainStateParameters(long chainStateId)
                                                            throws DotCacheException
Specified by:
getChainStateParameters in interface ChainCache
Throws:
DotCacheException

putChainStateParameters

public java.util.List<ChainStateParameter> putChainStateParameters(long chainStateId,
                                                                   java.util.List<ChainStateParameter> parameters)
                                                            throws DotCacheException
Specified by:
putChainStateParameters in interface ChainCache
Throws:
DotCacheException

removeChainStateParameters

public java.util.List<ChainStateParameter> removeChainStateParameters(long chainStateId)
                                                               throws DotCacheException
Specified by:
removeChainStateParameters in interface ChainCache
Throws:
DotCacheException

flushAllCaches

public void flushAllCaches()
Specified by:
flushAllCaches in interface ChainCache

flushChainCache

public void flushChainCache()
Specified by:
flushChainCache in interface ChainCache

flushChainLinkCodeCache

public void flushChainLinkCodeCache()
Specified by:
flushChainLinkCodeCache in interface ChainCache

flushChainStatesCache

public void flushChainStatesCache()
Specified by:
flushChainStatesCache in interface ChainCache

flushChainStateParametersCache

public void flushChainStateParametersCache()
Specified by:
flushChainStateParametersCache in interface ChainCache

getPrimaryGroup

public java.lang.String getPrimaryGroup()
Description copied from interface: Cachable
Use to get the primary group/region for the concrete cache

Specified by:
getPrimaryGroup in interface Cachable
Returns:

getGroups

public java.lang.String[] getGroups()
Description copied from interface: Cachable
Use to get all groups the concrete cache belongs to

Specified by:
getGroups in interface Cachable
Returns:

clearCache

public void clearCache()
Specified by:
clearCache in interface Cachable


Copyright © 2013 dotCMS Inc. All Rights Reserved.