Oracle Communications Services Gatekeeper Java API Reference
7.0.0.1

E96578-01

com.bea.wlcp.wlng.api.storage
Interface Store

All Superinterfaces:
java.util.Map

public interface Store
extends java.util.Map

Map based store interface used to put, get, remove Serializable objects. The store does not allow null values as keys or values.
Note that the Store instance retrieved should not be considered thread safe, and that users should retrieve different Store instances for each transaction.
The Store instance should be released by the user at the end of the transaction.


Nested Class Summary
 
Nested classes inherited from class java.util.Map
java.util.Map.Entry
 
Method Summary
abstract  void addListener(StoreListener listener)
          The addListener/StoreListener is used for automatic expiry events only.
 StoreOperation getOperation(java.lang.String name)
          Get a new named operation.
abstract  StoreQuery getQuery(java.lang.String name)
          Get a new named query.
abstract  boolean lock(java.io.Serializable key, long timeout)
          Attempt to take a cluster wide lock.
 void putNr(java.io.Serializable key, java.io.Serializable value)
          Associates the specified value with the specified key without previous value return.
abstract  void release()
          Release this store instance.
abstract  void removeListener(StoreListener listener)
          Remove previously added store listener for store.
abstract  boolean unlock(java.io.Serializable key)
          Unlock a previously obtained lock.
 
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
 

Method Detail

addListener

public void addListener(StoreListener listener)
                 throws StorageException
The addListener/StoreListener is used for automatic expiry events only. When you configure a store, you can optionally specify an idle expiry setting, after which the storage provider should remove the entry from the store. For our DB backed stores, this is implemented with a timer that runs now and then and deletes entries that have a timestamp value that is less than (now - expiry). If a StoreListener is registered, it will get notified of entries that are removed from the store because of expiry. It would also get notified if the Coherence provider is used with a cache only store (without DB backing), and an entry gets removed because of eviction (size or time based), for example, an entryDeleted event that returns true from CacheEvent.isSynthetic().

Parameters:
listener - The store listener.
Throws:
StorageException - If the listener could not be added.

getOperation

public StoreOperation getOperation(java.lang.String name)
Get a new named operation.

Parameters:
name - The operation name.
Returns:
The operation or null if no such operation was known.

getQuery

public StoreQuery getQuery(java.lang.String name)
Get a new named query.

Parameters:
name - The query name.
Returns:
The query or null if no such query was known.

lock

public boolean lock(java.io.Serializable key,
                    long timeout)
Attempt to take a cluster wide lock. The key does not have to exist in the store.

Parameters:
key - The identifier of the lock.
timeout - The maximum time in milliseconds to wait for lock.
Returns:
True if the lock was obtained, false if unsuccessful.

putNr

public void putNr(java.io.Serializable key,
                  java.io.Serializable value)
Associates the specified value with the specified key without previous value return.

Parameters:
key - key with which the specified value is to be associated
value - value to be associated with the specified key

release

public void release()
Release this store instance.


removeListener

public void removeListener(StoreListener listener)
Remove previously added store listener for store.

Parameters:
listener - The store listener.

unlock

public boolean unlock(java.io.Serializable key)
Unlock a previously obtained lock. The key does not have to exist in the store.

Parameters:
key - The identifier of the lock.
Returns:
True if the lock was released, false if unsuccessful.

Oracle Communications Services Gatekeeper Java API Reference
7.0.0.1

E96578-01

Copyright © 2008, 2018, Oracle and/or its affiliates. All rights reserved.