eXo Kernel :: Cache Extension :: JBoss Cache Implementation 2.4.6-GA

org.exoplatform.services.cache.impl.jboss.util
Class PrivilegedCacheHelper

java.lang.Object
  extended by org.exoplatform.services.cache.impl.jboss.util.PrivilegedCacheHelper

public class PrivilegedCacheHelper
extends Object

Version:
$Id: PrivilegedCacheHelper.java 111 2010-11-11 11:11:11Z tolusha $
Author:
Anatoliy Bazko

Constructor Summary
PrivilegedCacheHelper()
           
 
Method Summary
static
<K,V> void
create(org.jboss.cache.Cache<K,V> cache)
          Create cache in privileged mode.
static
<K,V> org.jboss.cache.Cache<K,V>
createCache(org.jboss.cache.CacheFactory<K,V> factory, InputStream is, boolean start)
          Create cache in privileged mode.
static
<K,V> org.jboss.cache.DefaultCacheFactory<K,V>
createCacheFactory()
          Create cache factory in privileged mode.
static
<K,V> void
endBatch(org.jboss.cache.Cache<K,V> cache, boolean successful)
          End batch in privileged mode.
static
<K,V> V
put(org.jboss.cache.Cache<K,V> cache, org.jboss.cache.Fqn fqn, K key, V value)
          Put in cache in privileged mode.
static
<K,V> V
put(org.jboss.cache.Cache<K,V> cache, String fqn, K key, V value)
          Put in cache in privileged mode.
static
<K,V> boolean
removeNode(org.jboss.cache.Cache<K,V> cache, org.jboss.cache.Fqn fqn)
          Remove fomr cache in privileged mode.
static
<K,V> void
start(org.jboss.cache.Cache<K,V> cache)
          Start cache in privileged mode.
static
<K,V> void
stop(org.jboss.cache.Cache<K,V> cache)
          Stop cache in privileged mode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrivilegedCacheHelper

public PrivilegedCacheHelper()
Method Detail

start

public static <K,V> void start(org.jboss.cache.Cache<K,V> cache)
Start cache in privileged mode.

Parameters:
cache -

stop

public static <K,V> void stop(org.jboss.cache.Cache<K,V> cache)
Stop cache in privileged mode.

Parameters:
cache -

create

public static <K,V> void create(org.jboss.cache.Cache<K,V> cache)
Create cache in privileged mode.

Parameters:
cache -

endBatch

public static <K,V> void endBatch(org.jboss.cache.Cache<K,V> cache,
                                  boolean successful)
End batch in privileged mode.

Parameters:
cache -

createCache

public static <K,V> org.jboss.cache.Cache<K,V> createCache(org.jboss.cache.CacheFactory<K,V> factory,
                                                           InputStream is,
                                                           boolean start)
Create cache in privileged mode.

Parameters:
cache -

put

public static <K,V> V put(org.jboss.cache.Cache<K,V> cache,
                          String fqn,
                          K key,
                          V value)
             throws org.jboss.cache.CacheException
Put in cache in privileged mode.

Parameters:
cache -
Throws:
org.jboss.cache.CacheException

removeNode

public static <K,V> boolean removeNode(org.jboss.cache.Cache<K,V> cache,
                                       org.jboss.cache.Fqn fqn)
                          throws org.jboss.cache.CacheException
Remove fomr cache in privileged mode.

Parameters:
cache -
Throws:
org.jboss.cache.CacheException

put

public static <K,V> V put(org.jboss.cache.Cache<K,V> cache,
                          org.jboss.cache.Fqn fqn,
                          K key,
                          V value)
             throws org.jboss.cache.CacheException
Put in cache in privileged mode.

Parameters:
cache -
Throws:
org.jboss.cache.CacheException

createCacheFactory

public static <K,V> org.jboss.cache.DefaultCacheFactory<K,V> createCacheFactory()
                                                                   throws org.jboss.cache.CacheException
Create cache factory in privileged mode.

Parameters:
cache -
Throws:
org.jboss.cache.CacheException

eXo Kernel :: Cache Extension :: JBoss Cache Implementation 2.4.6-GA

Copyright © 2013 eXo Platform SAS. All Rights Reserved.