javax.util.jcache
Interface Cache

All Known Implementing Classes:
CacheImpl

Deprecated. will be reomved with no replacement.

public interface Cache

Contains several usefull methods for configuring, administering and monitoring the Cache.

Author:
Frank Karlstrøm

Method Summary
 void close()
          Deprecated. will mark the cache as "not ready" and shutdown the cache.
 void flush()
          Deprecated. will mark all objects in the cache, both disk and memory, as invalid, forcing objects to be reloaded.
 void flushDisk()
          Deprecated. will mark all objects in the cache as invalid, forcing objects to be reloaded.
 void flushMemory()
          Deprecated. will mark all objects in the cache as invalid, forcing objects to be reloaded.
 CacheAttributes getAttributes()
          Deprecated. returns the current attributes of the cache including the cache version number, wether the cache is local or distributed, the maximum number of objects in the cache, the disk cache location, and the disk cache size.
 float getVersion()
          Deprecated. returns the current version of the cache.
 void init(CacheAttributes attributes)
          Deprecated. initializes the cache, allocates space for metadata and starts the service threads.
 boolean isDistributed()
          Deprecated. returns true if the cache is currently in distributed mode, that it is distributing updates and invalidates within the site, false if all cache actions are local only.
 boolean isReady()
          Deprecated. returns true if the cache has been initialized and not closed, false otherwise.
 Enumeration listCacheObjects()
          Deprecated. will return an Enumeration of CacheObjectInfo objects describing the objects in all regions in the cache.
 Enumeration listCacheObjects(String region)
          Deprecated. will return an Enumeration of CacheObjectInfo objects describing the objects in the specified in the cache.
 void open()
          Deprecated. will create a CacheAttributes object based on the values in a Java properties file, then call the method init.
 void open(String configFile)
          Deprecated. will create a CacheAttributes object based on the values in a Java properties file, then call the method init.
 void setLogSeverity(int severity)
          Deprecated. sets the log severity of the cache system.
 

Method Detail

init

void init(CacheAttributes attributes)
          throws CacheNotAvailableException
Deprecated. 
initializes the cache, allocates space for metadata and starts the service threads. The cache is a process wide service, so it can only be initialized once per process. Subsequent init calls are ignored.

Parameters:
attributes - contains configuration information to initialize the cache system.
Throws:
CacheNotAvailableException - if the cache is not ready.

open

void open()
          throws CacheNotAvailableException
Deprecated. 
will create a CacheAttributes object based on the values in a Java properties file, then call the method init. The properties file opened is called jcache.properties If this method is called, the init() method is not neccessary to call.

Throws:
CacheNotAvailableException - if the cache is not ready.

open

void open(String configFile)
          throws CacheNotAvailableException
Deprecated. 
will create a CacheAttributes object based on the values in a Java properties file, then call the method init. The properties file opened is called jcache.properties If this method is called, the init() method is not neccessary to call.

Throws:
CacheNotAvailableException - if the cache is not ready.

close

void close()
Deprecated. 
will mark the cache as "not ready" and shutdown the cache. Marking the cache as "not ready" will prevent any threads from accessing the Cache during shutdown. If the cache is distributed, close will unregister with the distributed caching system. The method should be called as a part of process termination.


flush

void flush()
           throws CacheException
Deprecated. 
will mark all objects in the cache, both disk and memory, as invalid, forcing objects to be reloaded. All processes sharing the disk cache are notified when the cache is flushed.

Throws:
CacheException - if an error occurs.

flushMemory

void flushMemory()
                 throws CacheException
Deprecated. 
will mark all objects in the cache as invalid, forcing objects to be reloaded. Flushing the memory cache will also invalidate memory objects spooled to disk. Objects that are only cached on disk will not be affected.

Throws:
CacheException - if an error occurs.

flushDisk

void flushDisk()
               throws CacheException
Deprecated. 
will mark all objects in the cache as invalid, forcing objects to be reloaded. Flushing the disk cache will also invalidate memory objects spooled to disk. All processes sharing the disk cache are notified when the cache is flushed.

Throws:
CacheException - if an error occurs.

getVersion

float getVersion()
Deprecated. 
returns the current version of the cache.

Returns:
the current version of the cache.

isReady

boolean isReady()
Deprecated. 
returns true if the cache has been initialized and not closed, false otherwise.

Returns:
true if the cache has been initialized and not closed, false otherwise.

isDistributed

boolean isDistributed()
Deprecated. 
returns true if the cache is currently in distributed mode, that it is distributing updates and invalidates within the site, false if all cache actions are local only.

Returns:
true if the cache is currently in distributed mode, that it is distributing updates and invalidates within the site, false if all cache actions are local only.

listCacheObjects

Enumeration listCacheObjects()
Deprecated. 
will return an Enumeration of CacheObjectInfo objects describing the objects in all regions in the cache. CacheObjectInfo will include information such as the object name, the type, what group it is associated with, the reference count, the expiration time if any and object attributes.

Returns:
an Enumeration of CacheObjectInfo objects.

listCacheObjects

Enumeration listCacheObjects(String region)
                             throws RegionNotFoundException
Deprecated. 
will return an Enumeration of CacheObjectInfo objects describing the objects in the specified in the cache. CacheObjectInfo will include information such as the object name, the type, what group it is associated with, the reference count, the expiration time if any and object attributes.

Parameters:
region - the region to get the Enumeration for.
Returns:
an Enumeration of CacheObjectInfo objects.
Throws:
RegionNotFoundException - if an invalid or non existing region is specified.

getAttributes

CacheAttributes getAttributes()
                              throws CacheNotAvailableException
Deprecated. 
returns the current attributes of the cache including the cache version number, wether the cache is local or distributed, the maximum number of objects in the cache, the disk cache location, and the disk cache size.

Returns:
the current attributes of this cache.
Throws:
CacheNotAvailableException - if the cache is not ready.

setLogSeverity

void setLogSeverity(int severity)
Deprecated. 
sets the log severity of the cache system. This determines wich messages the cache formats and logs into the log destination. Severity's are defined in the CacheLogger class.

Parameters:
severity - the severity level to set


Copyright © 2002-2009 Hosted by SourceForge. All Rights Reserved.