com.dotmarketing.cache
Class LiveCache

java.lang.Object
  extended by com.dotmarketing.cache.LiveCache

public class LiveCache
extends java.lang.Object

This cache is used to know when an asset is live, it doesn't store real valuable info in the cache

Author:
David, Jason Tesser

Constructor Summary
LiveCache()
           
 
Method Summary
static java.lang.String addToLiveAssetToCache(Versionable asset)
          This method adds the given asset uri to the cache using the host id + identifier uri as the key This method also send a signal to the cluster to invalidate key cluster wide
static void clearCache(java.lang.String hostId)
           
static java.lang.String[] getGroups()
           
static java.lang.String getPathFromCache(java.lang.String URI, Host host)
          This method return the asset uri when the asset exists in the cache
static java.lang.String getPathFromCache(java.lang.String URI, java.lang.String hostId)
          This method return the asset uri when the asset exists in the cache
static java.lang.String getPrimaryGroup()
           
static void removeAssetFromCache(Versionable asset)
          This method removes the asset key from the cache and send an invalidation message to the cluster when the cms is in cluster
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LiveCache

public LiveCache()
Method Detail

addToLiveAssetToCache

public static java.lang.String addToLiveAssetToCache(Versionable asset)
This method adds the given asset uri to the cache using the host id + identifier uri as the key This method also send a signal to the cluster to invalidate key cluster wide


getPathFromCache

public static java.lang.String getPathFromCache(java.lang.String URI,
                                                Host host)
                                         throws DotStateException,
                                                DotDataException,
                                                DotSecurityException
This method return the asset uri when the asset exists in the cache

Parameters:
URI -
host -
Returns:
null if the asset is not in the cache, the asset uri if the asset is in the cache
Throws:
DotSecurityException
DotDataException
DotStateException

getPathFromCache

public static java.lang.String getPathFromCache(java.lang.String URI,
                                                java.lang.String hostId)
                                         throws DotStateException,
                                                DotDataException,
                                                DotSecurityException
This method return the asset uri when the asset exists in the cache

Parameters:
URI -
hostId -
Returns:
null if the asset is not in the cache, the asset uri if the asset is in the cache
Throws:
DotSecurityException
DotDataException
DotStateException

removeAssetFromCache

public static void removeAssetFromCache(Versionable asset)
This method removes the asset key from the cache and send an invalidation message to the cluster when the cms is in cluster

Parameters:
asset -

clearCache

public static void clearCache(java.lang.String hostId)

getGroups

public static java.lang.String[] getGroups()

getPrimaryGroup

public static java.lang.String getPrimaryGroup()


Copyright © 2013 dotCMS Inc. All Rights Reserved.