Infinispan Distribution 5.2.6.Final-redhat-2

org.infinispan.cli.interpreter.session
Interface Session

All Known Implementing Classes:
SessionImpl

public interface Session


Method Summary
 void createCache(String cacheName, String baseCacheName)
          Creates a new cache
<K,V> Cache<K,V>
getCache(String cacheName)
          Returns a named cache.
 EmbeddedCacheManager getCacheManager()
          Obtains the CacheManager to which this session is attached
 Codec getCodec()
          Returns the currently active codec used to encode/decode keys/values
 Codec getCodec(String parameter)
          Returns a specific codec
 Collection<Codec> getCodecs()
          Returns the list of available key/value codecs
<K,V> Cache<K,V>
getCurrentCache()
          Obtains the currently selected cache.
 String getCurrentCacheName()
          Returns the name of the currently selected cache.
 String getId()
          Returns the unique id of this session
 long getTimestamp()
          Returns the time the session was last accessed
 void reset()
          Resets the session, by aborting any dangling batches and transactions and updating the timestamp
 void setCodec(String encoding)
          Sets the codec to use for encoding/decoding keys/values
 void setCurrentCache(String cacheName)
          Sets the current cache.
 

Method Detail

getCacheManager

EmbeddedCacheManager getCacheManager()
Obtains the CacheManager to which this session is attached


getCurrentCache

<K,V> Cache<K,V> getCurrentCache()
Obtains the currently selected cache. If none has been selected, the default cache is returned


getCurrentCacheName

String getCurrentCacheName()
Returns the name of the currently selected cache. If none has been selected, the default cache is returned


getCache

<K,V> Cache<K,V> getCache(String cacheName)
Returns a named cache. If the cacheName parameter is null, the current cache is returned

Parameters:
cacheName -
Returns:
the cache identified by cacheName

setCurrentCache

void setCurrentCache(String cacheName)
Sets the current cache.

Parameters:
cacheName -

createCache

void createCache(String cacheName,
                 String baseCacheName)
Creates a new cache

Parameters:
cacheName - the name of the new cache
baseCacheName - the existing named cache to use for defaults

reset

void reset()
Resets the session, by aborting any dangling batches and transactions and updating the timestamp


getTimestamp

long getTimestamp()
Returns the time the session was last accessed


getId

String getId()
Returns the unique id of this session


setCodec

void setCodec(String encoding)
              throws CodecException
Sets the codec to use for encoding/decoding keys/values

Parameters:
encoding - the name of the codec to use
Throws:
CodecException

getCodecs

Collection<Codec> getCodecs()
Returns the list of available key/value codecs


getCodec

Codec getCodec()
Returns the currently active codec used to encode/decode keys/values


getCodec

Codec getCodec(String parameter)
               throws CodecException
Returns a specific codec

Throws:
CodecException

Infinispan Distribution 5.2.6.Final-redhat-2

Copyright © 2013 JBoss, a division of Red Hat. All Rights Reserved.