|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.tangosol.util.Base
com.tangosol.util.InvocableMapHelper
public abstract class InvocableMapHelper
Helper methods for InvocableMap implementations and Filter related evaluation.
| Nested Class Summary | |
|---|---|
static class |
InvocableMapHelper.SimpleEntry
Simple implementation of the InvocableMap.Entry interface. |
| Field Summary | |
|---|---|
static Converter |
ENTRY_TO_KEY_CONVERTER
Trivial Entry-to-Key converter. |
| Constructor Summary | |
|---|---|
InvocableMapHelper()
|
|
| Method Summary | |
|---|---|
static boolean |
evaluateEntry(Filter filter,
Map.Entry entry)
Check if the entry passes the filters evaulation. |
static boolean |
evaluateEntry(Filter filter,
Object oKey,
Object oValue)
Check if an entry, expressed as a key and value, passes the filters evaulation. |
static Object |
extractFromEntry(ValueExtractor extractor,
Map.Entry entry)
Extract a value from the specified entry using the specified extractor. |
static Map |
invokeAllLocked(ConcurrentMap map,
Set setEntries,
InvocableMap.EntryProcessor agent)
Invoke the passed EntryProcessor against the entries specified by the passed map and entries. |
static Object |
invokeLocked(ConcurrentMap map,
InvocableMap.Entry entry,
InvocableMap.EntryProcessor agent)
Invoke the passed EntryProcessor against the specified Entry. |
static List |
lockAll(ConcurrentMap map,
Collection collKeys,
long cWait)
Attempt to lock all the specified keys within a specified period of time. |
static InvocableMapHelper.SimpleEntry |
makeEntry(Map map,
Object oKey)
Create a SimpleEntry object for the specified map and the key. |
static Set |
makeEntrySet(Collection collEntries)
Create a set of read-only SimpleEntry objects for the specified collection of Map.Entry objects. |
static Set |
makeEntrySet(Map map,
Collection collKeys,
boolean fReadOnly)
Create a set of SimpleEntry objects for the specified map and the key collection. |
static Set |
query(Map map,
Filter filter,
boolean fEntries,
boolean fSort,
Comparator comparator)
Generic implementation of the QueryMap API. |
static void |
unlockAll(ConcurrentMap map,
Collection collKeys)
Unlock all the specified keys. |
| Field Detail |
|---|
public static final Converter ENTRY_TO_KEY_CONVERTER
| Constructor Detail |
|---|
public InvocableMapHelper()
| Method Detail |
|---|
public static Object invokeLocked(ConcurrentMap map,
InvocableMap.Entry entry,
InvocableMap.EntryProcessor agent)
map - the ConcurrentMap that the EntryProcessor works againstentry - the InvocableMap.Entry to process; it is not required to
exist within the Mapagent - the EntryProcessor to use to process the specified key
public static Map invokeAllLocked(ConcurrentMap map,
Set setEntries,
InvocableMap.EntryProcessor agent)
map - the ConcurrentMap that the EntryProcessor works againstsetEntries - a set of InvocableMap.Entry objects to processagent - the EntryProcessor to use to process the specified keys
public static List lockAll(ConcurrentMap map,
Collection collKeys,
long cWait)
map - the ConcurrentMap to usecollKeys - a collection of keys to lockcWait - the number of milliseconds to continue trying to obtain
locks; pass zero to return immediately; pass -1 to block
the calling thread until the lock could be obtained
public static void unlockAll(ConcurrentMap map,
Collection collKeys)
map - the ConcurrentMap to usecollKeys - a collection of keys to unlock
public static InvocableMapHelper.SimpleEntry makeEntry(Map map,
Object oKey)
map - the ConcurrentMap to create entries foroKey - the key to create an entry for; the key is not
required to exist within the Map
public static Set makeEntrySet(Map map,
Collection collKeys,
boolean fReadOnly)
map - the Map to create entries forcollKeys - collection of keys to create entries for; these keys
are not required to exist within the MapfReadOnly - if true, the returned entries will be marked as
read-only
public static Set makeEntrySet(Collection collEntries)
collEntries - collection of Map.Entry objects to create SimpleEntry
objects for
public static boolean evaluateEntry(Filter filter,
Map.Entry entry)
filter - the filter to evaulate againstentry - a key value pair to filter
public static boolean evaluateEntry(Filter filter,
Object oKey,
Object oValue)
filter - the filter to evaluate againstoKey - the key for the entryoValue - the value for the entry
public static Object extractFromEntry(ValueExtractor extractor,
Map.Entry entry)
extractor - the extractor to useentry - the entry to extract from
public static Set query(Map map,
Filter filter,
boolean fEntries,
boolean fSort,
Comparator comparator)
QueryMap API.
map - the underlying Mapfilter - the FilterfEntries - if true, return an entry-set; otherwise a key-setfSort - if true, sort the entry-set before returningcomparator - the Comparator to use for sorting (optional)
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||