com.gentics.cr.portlet.cache
Class NavigationCache

java.lang.Object
  extended by com.gentics.cr.portlet.cache.NavigationCache

public class NavigationCache
extends Object

The Class NavigationCache.

 

Field Summary
private  org.apache.jcs.JCS cache
          The cache.
private  Set<String> cachedKeys
          The cached keys.
static String CACHEZONE_KEY
          Key for the cache zone.
private  com.gentics.cr.CRConfig crConf
          The cr conf.
private static NavigationCache instance
          The instance.
private static org.apache.log4j.Logger log
          The Constant log.
private static int MIN_SCHEDULE_TIME
          The min schedule time.
private static String PROPERTY_FILENAME
          The Constant PROPERTY_FILENAME.
private  ScheduledExecutorService scheduler
          The scheduler.
private  Long scheduleTime
          The schedule time.
private static int SECONDS_BEFORE_CACHE
          The seconds before cache.
private static int THREADS
          The cores.
 
Constructor Summary
private NavigationCache()
          Instantiates a new navigation cache.
 
Method Summary
 com.gentics.cr.CRResolvableBean fetchAndCacheNavigationObject(String startFolder, String childfilter, com.gentics.cr.RequestProcessor rp, com.gentics.cr.CRRequest req)
          Fetch and cache navigation object.
static NavigationCache get()
          Gets the Navigation Cache instance.
private  com.gentics.cr.CRResolvableBean getCachedNavigationObject(String cacheKey)
          Gets the cached navigation object.
 com.gentics.cr.CRResolvableBean getCachedNavigationObject(String startFolder, String childFilter)
          Gets the cached navigation object.
private static String getCacheKey(String startFolder, String childFilter)
          Gets the cache key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final org.apache.log4j.Logger log
The Constant log.


MIN_SCHEDULE_TIME

private static int MIN_SCHEDULE_TIME
The min schedule time.


SECONDS_BEFORE_CACHE

private static int SECONDS_BEFORE_CACHE
The seconds before cache.


THREADS

private static int THREADS
The cores.


CACHEZONE_KEY

public static final String CACHEZONE_KEY
Key for the cache zone.

See Also:
Constant Field Values

PROPERTY_FILENAME

private static final String PROPERTY_FILENAME
The Constant PROPERTY_FILENAME.

See Also:
Constant Field Values

instance

private static NavigationCache instance
The instance.


cache

private org.apache.jcs.JCS cache
The cache.


scheduleTime

private Long scheduleTime
The schedule time.


scheduler

private ScheduledExecutorService scheduler
The scheduler.


cachedKeys

private Set<String> cachedKeys
The cached keys.


crConf

private com.gentics.cr.CRConfig crConf
The cr conf.

Constructor Detail

NavigationCache

private NavigationCache()
Instantiates a new navigation cache.

Method Detail

get

public static NavigationCache get()
Gets the Navigation Cache instance.

Returns:
the navigation cache

getCachedNavigationObject

public com.gentics.cr.CRResolvableBean getCachedNavigationObject(String startFolder,
                                                                 String childFilter)
Gets the cached navigation object.

Parameters:
startFolder - the start folder
childFilter - the child filter
Returns:
the cached navigation object

getCachedNavigationObject

private com.gentics.cr.CRResolvableBean getCachedNavigationObject(String cacheKey)
Gets the cached navigation object.

Parameters:
cacheKey - the cache key
Returns:
the cached navigation object

fetchAndCacheNavigationObject

public com.gentics.cr.CRResolvableBean fetchAndCacheNavigationObject(String startFolder,
                                                                     String childfilter,
                                                                     com.gentics.cr.RequestProcessor rp,
                                                                     com.gentics.cr.CRRequest req)
Fetch and cache navigation object.

Parameters:
startFolder - the start folder
childfilter - the childfilter
rp - the rp
req - the req
Returns:
the cR resolvable bean

getCacheKey

private static String getCacheKey(String startFolder,
                                  String childFilter)
Gets the cache key.

Parameters:
startFolder - the start folder
childFilter - the child filter
Returns:
the cache key


Copyright © 2014 Gentics Software GmbH. All Rights Reserved.