public class MapProxy extends com.streamscape.ds.schema.collection.AbstractDataCollectionProxy implements Map
Title: Data Space Framework
Description: Map proxy implementation.
Copyright: Copyright (c) 2011
Company: StreamScape Technologies
Constructor and Description |
---|
MapProxy() |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(java.lang.Object value) |
void |
drainFromQueue(java.util.Queue queue)
Loads collection with data from provided Queue and
purges provided queue.
|
java.util.Set |
entrySet() |
void |
fromMap(java.util.Map map)
Loads collection with data from provided Map
|
void |
fromQueue(java.util.Queue queue)
Loads collection with data from provided Queue
|
void |
fromRowSet(RowSet rowSet)
Loads collection with data from provided RowSet
|
java.lang.Object |
get(java.lang.Object key) |
boolean |
isEmpty() |
java.util.Set |
keySet() |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value) |
void |
putAll(java.util.Map t)
If
m is instance of java.util.Collection.Map
and opened in the same accessor or belongs to the same node or any other node in the sysplex
then data transfer is performed on the server side and is more efficient because data not copied to client side. |
java.lang.Object |
remove(java.lang.Object key) |
int |
size() |
java.lang.Object |
take(java.lang.Object key)
Returns value that corresponds to given key.
|
java.util.Map |
toMap()
Converts existing collection data into Map.
|
Map |
toMapCollection()
Creates new transient map collection and loads it with the
data from current collection.
|
java.util.Queue |
toQueue()
Converts existing collection data into Map.
|
Queue |
toQueueCollection()
Creates new transient queue collection and loads it with the
data from current collection.
|
RowSet |
toRowSet()
Converts existing collection data into RowSet.
|
Table |
toTableCollection()
Creates new transient table collection and loads it with the
data from current collection.
|
java.util.Collection |
values() |
java.lang.Object |
waitToTake(java.lang.Object key)
The same as
#take(String) but blocks until key is available. |
java.lang.Object |
waitToTake(java.lang.Object key,
long timeout,
java.util.concurrent.TimeUnit unit)
The same as
#take(String) but waiting up to the
specified timeout until an key becomes available for retrieve. |
getCollectionName, getCollectionType, getMemoryModel, listTriggers
getId, setAccessor, setId
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCollectionName, getCollectionType, getMemoryModel, listTriggers
public java.lang.Object take(java.lang.Object key)
Map
public java.lang.Object waitToTake(java.lang.Object key)
Map
#take(String)
but blocks until key is available.public java.lang.Object waitToTake(java.lang.Object key, long timeout, java.util.concurrent.TimeUnit unit)
Map
#take(String)
but waiting up to the
specified timeout until an key becomes available for retrieve.
If timeout is zero blocks until key is available.public int size()
size
in interface java.util.Map
public boolean isEmpty()
isEmpty
in interface java.util.Map
public boolean containsKey(java.lang.Object key)
containsKey
in interface java.util.Map
public boolean containsValue(java.lang.Object value)
containsValue
in interface java.util.Map
public java.lang.Object get(java.lang.Object key)
get
in interface java.util.Map
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
put
in interface java.util.Map
public java.lang.Object remove(java.lang.Object key)
remove
in interface java.util.Map
public void putAll(java.util.Map t)
Map
m
is instance of java.util.Collection.Map
and opened in the same accessor or belongs to the same node or any other node in the sysplex
then data transfer is performed on the server side and is more efficient because data not copied to client side.
NOTE: If any exception occurred during reading from source collection or inserting into
target collection exception is throws. No rollback is done.
See java.util.Map#addAll(Map)
putAll
in interface java.util.Map
public void clear()
clear
in interface java.util.Map
public java.util.Set keySet()
keySet
in interface java.util.Map
public java.util.Collection values()
values
in interface java.util.Map
public java.util.Set entrySet()
entrySet
in interface java.util.Map
public RowSet toRowSet()
Map
public java.util.Map toMap()
Map
public java.util.Queue toQueue()
Map
public void fromRowSet(RowSet rowSet)
Map
rowSet
- RowSet to load data frompublic void fromQueue(java.util.Queue queue)
Map
queue
- Queue to load data frompublic void drainFromQueue(java.util.Queue queue)
Map
queue
- Queue to load data frompublic void fromMap(java.util.Map map)
Map
map
- Map to load data frompublic Table toTableCollection()
Map
public Map toMapCollection()
Map
Copyright © 2015-2024 StreamScape Technologies. All rights reserved.