Platform SDK Java 8.5 API Reference

com.genesyslab.platform.applicationblocks.com.cache
Class DefaultConfCacheStorage

java.lang.Object
  extended by com.genesyslab.platform.applicationblocks.com.cache.DefaultConfCacheStorage
All Implemented Interfaces:
IConfCacheStorage

public final class DefaultConfCacheStorage
extends java.lang.Object
implements IConfCacheStorage

The default implementation of the configuration cache storage. This storage implementation is thread safe.


Constructor Summary
DefaultConfCacheStorage()
           
 
Method Summary
 void add(ICfgObject obj)
          Adds the specified object into the cache.
 void clear()
          Removes all items in storage.
 boolean remove(ICfgObject obj)
          Removes the specified configuration object from the storage.
<T extends ICfgObject>
java.lang.Iterable<T>
retrieve(java.lang.Class<T> cls)
          Retrieves a list of all objects in the storage.
<T extends ICfgObject>
java.lang.Iterable<T>
retrieve(java.lang.Class<T> cls, java.lang.Object helper)
          Retrieves a list of objects in storage utilizing a "helper" parameter.
 void update(ICfgObject obj)
          Updates an existing configuration object in the storage with the passed copy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultConfCacheStorage

public DefaultConfCacheStorage()
Method Detail

add

public void add(ICfgObject obj)
Adds the specified object into the cache.

Specified by:
add in interface IConfCacheStorage
Parameters:
obj - object to add
Throws:
java.lang.IllegalArgumentException - The object being added has not been saved in the configuration server or the object being added is already in the cache (dbid and type are used for the purposes of determining equality)

update

public void update(ICfgObject obj)
Updates an existing configuration object in the storage with the passed copy. If the passed object does not already exist in the cache, it is added to the cache. The object's dbid and type are used to determine equality.

Specified by:
update in interface IConfCacheStorage
Parameters:
obj - The new version of a cached configuration object

remove

public boolean remove(ICfgObject obj)
Removes the specified configuration object from the storage. The object is located using its dbid and type.

Specified by:
remove in interface IConfCacheStorage
Parameters:
obj - The configuration object to remove
Returns:
true if object successfully deleted, false otherwise

clear

public void clear()
Removes all items in storage.

Specified by:
clear in interface IConfCacheStorage

retrieve

public <T extends ICfgObject> java.lang.Iterable<T> retrieve(java.lang.Class<T> cls)
Retrieves a list of all objects in the storage.

Specified by:
retrieve in interface IConfCacheStorage
Type Parameters:
T - The type of object in the resulting list
Parameters:
cls - class of objects to be retrieved
Returns:
An enumerable list of the requested objects

retrieve

public <T extends ICfgObject> java.lang.Iterable<T> retrieve(java.lang.Class<T> cls,
                                                             java.lang.Object helper)
Retrieves a list of objects in storage utilizing a "helper" parameter.

Specified by:
retrieve in interface IConfCacheStorage
Type Parameters:
T - The type of object in the resulting list
Parameters:
cls - class of objects to be retrieved
helper - can be either "null" to retrieve all objects, or CfgObjectType to retrieve by type
Returns:
An enumerable list of the requested objects

Platform SDK Java 8.5 API Reference

Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.