com.hazelcast.client.proxy
Class ClientMapProxy<K,V>
java.lang.Object
com.hazelcast.client.spi.ClientProxy
com.hazelcast.client.proxy.ClientMapProxy<K,V>
- All Implemented Interfaces:
- BaseMap<K,V>, DistributedObject, IMap<K,V>, ConcurrentMap<K,V>, Map<K,V>
public final class ClientMapProxy<K,V>
- extends ClientProxy
- implements IMap<K,V>
| Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
|
Method Summary |
String |
addEntryListener(EntryListener<K,V> listener,
boolean includeValue)
|
String |
addEntryListener(EntryListener<K,V> listener,
K key,
boolean includeValue)
|
String |
addEntryListener(EntryListener<K,V> listener,
Predicate<K,V> predicate,
boolean includeValue)
|
String |
addEntryListener(EntryListener<K,V> listener,
Predicate<K,V> predicate,
K key,
boolean includeValue)
|
void |
addIndex(String attribute,
boolean ordered)
|
String |
addInterceptor(MapInterceptor interceptor)
|
String |
addLocalEntryListener(EntryListener<K,V> listener)
|
String |
addLocalEntryListener(EntryListener<K,V> listener,
Predicate<K,V> predicate,
boolean includeValue)
|
String |
addLocalEntryListener(EntryListener<K,V> listener,
Predicate<K,V> predicate,
K key,
boolean includeValue)
|
<SuppliedValue,Result>
Result |
|
aggregate(Supplier<K,V,SuppliedValue> supplier,
Aggregation<K,SuppliedValue,Result> aggregation)
|
<SuppliedValue,Result>
Result |
|
aggregate(Supplier<K,V,SuppliedValue> supplier,
Aggregation<K,SuppliedValue,Result> aggregation,
JobTracker jobTracker)
|
void |
clear()
|
boolean |
containsKey(Object key)
|
boolean |
containsValue(Object value)
|
void |
delete(Object key)
|
Set<Map.Entry<K,V>> |
entrySet()
|
Set<Map.Entry<K,V>> |
entrySet(Predicate predicate)
|
boolean |
evict(K key)
|
void |
evictAll()
|
Map<K,Object> |
executeOnEntries(EntryProcessor entryProcessor)
|
Map<K,Object> |
executeOnEntries(EntryProcessor entryProcessor,
Predicate predicate)
|
Object |
executeOnKey(K key,
EntryProcessor entryProcessor)
|
Map<K,Object> |
executeOnKeys(Set<K> keys,
EntryProcessor entryProcessor)
|
void |
flush()
|
void |
forceUnlock(K key)
|
V |
get(Object key)
|
Map<K,V> |
getAll(Set<K> keys)
|
Future<V> |
getAsync(K key)
|
EntryView<K,V> |
getEntryView(K key)
|
LocalMapStats |
getLocalMapStats()
|
protected long |
getTimeInMillis(long time,
TimeUnit timeunit)
|
boolean |
isEmpty()
|
boolean |
isLocked(K key)
|
Set<K> |
keySet()
|
Set<K> |
keySet(Predicate predicate)
|
void |
loadAll(boolean replaceExistingValues)
|
void |
loadAll(Set<K> keys,
boolean replaceExistingValues)
|
Set<K> |
localKeySet()
|
Set<K> |
localKeySet(Predicate predicate)
|
void |
lock(K key)
|
void |
lock(K key,
long leaseTime,
TimeUnit timeUnit)
|
protected void |
onDestroy()
Called before proxy is destroyed. |
protected void |
onShutdown()
Called before client shutdown. |
V |
put(K key,
V value)
|
V |
put(K key,
V value,
long ttl,
TimeUnit timeunit)
|
void |
putAll(Map<? extends K,? extends V> m)
|
Future<V> |
putAsync(K key,
V value)
|
Future<V> |
putAsync(K key,
V value,
long ttl,
TimeUnit timeunit)
|
V |
putIfAbsent(K key,
V value)
|
V |
putIfAbsent(K key,
V value,
long ttl,
TimeUnit timeunit)
|
void |
putTransient(K key,
V value,
long ttl,
TimeUnit timeunit)
|
V |
remove(Object key)
|
boolean |
remove(Object key,
Object value)
|
Future<V> |
removeAsync(K key)
|
boolean |
removeEntryListener(String id)
|
void |
removeInterceptor(String id)
|
V |
replace(K key,
V value)
|
boolean |
replace(K key,
V oldValue,
V newValue)
|
void |
set(K key,
V value)
|
void |
set(K key,
V value,
long ttl,
TimeUnit timeunit)
|
int |
size()
|
Future |
submitToKey(K key,
EntryProcessor entryProcessor)
|
void |
submitToKey(K key,
EntryProcessor entryProcessor,
ExecutionCallback callback)
|
String |
toString()
|
boolean |
tryLock(K key)
|
boolean |
tryLock(K key,
long time,
TimeUnit timeunit)
|
boolean |
tryPut(K key,
V value,
long timeout,
TimeUnit timeunit)
|
boolean |
tryRemove(K key,
long timeout,
TimeUnit timeunit)
|
void |
unlock(K key)
|
Collection<V> |
values()
|
Collection<V> |
values(Predicate predicate)
|
| Methods inherited from class com.hazelcast.client.spi.ClientProxy |
destroy, equals, getContext, getId, getName, getPartitionKey, getServiceName, hashCode, invoke, invoke, invoke, invokeInterruptibly, listen, listen, onInitialize, setContext, stopListening, throwExceptionIfNull, toData, toObject |
NULL_KEY_IS_NOT_ALLOWED
protected static final String NULL_KEY_IS_NOT_ALLOWED
- See Also:
- Constant Field Values
NULL_VALUE_IS_NOT_ALLOWED
protected static final String NULL_VALUE_IS_NOT_ALLOWED
- See Also:
- Constant Field Values
ClientMapProxy
public ClientMapProxy(String serviceName,
String name)
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey in interface BaseMap<K,V>- Specified by:
containsKey in interface IMap<K,V>- Specified by:
containsKey in interface Map<K,V>
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue in interface IMap<K,V>- Specified by:
containsValue in interface Map<K,V>
get
public V get(Object key)
- Specified by:
get in interface BaseMap<K,V>- Specified by:
get in interface IMap<K,V>- Specified by:
get in interface Map<K,V>
put
public V put(K key,
V value)
- Specified by:
put in interface BaseMap<K,V>- Specified by:
put in interface IMap<K,V>- Specified by:
put in interface Map<K,V>
remove
public V remove(Object key)
- Specified by:
remove in interface BaseMap<K,V>- Specified by:
remove in interface IMap<K,V>- Specified by:
remove in interface Map<K,V>
remove
public boolean remove(Object key,
Object value)
- Specified by:
remove in interface BaseMap<K,V>- Specified by:
remove in interface IMap<K,V>- Specified by:
remove in interface ConcurrentMap<K,V>
delete
public void delete(Object key)
- Specified by:
delete in interface BaseMap<K,V>- Specified by:
delete in interface IMap<K,V>
flush
public void flush()
- Specified by:
flush in interface IMap<K,V>
getAsync
public Future<V> getAsync(K key)
- Specified by:
getAsync in interface IMap<K,V>
putAsync
public Future<V> putAsync(K key,
V value)
- Specified by:
putAsync in interface IMap<K,V>
putAsync
public Future<V> putAsync(K key,
V value,
long ttl,
TimeUnit timeunit)
- Specified by:
putAsync in interface IMap<K,V>
removeAsync
public Future<V> removeAsync(K key)
- Specified by:
removeAsync in interface IMap<K,V>
tryRemove
public boolean tryRemove(K key,
long timeout,
TimeUnit timeunit)
- Specified by:
tryRemove in interface IMap<K,V>
tryPut
public boolean tryPut(K key,
V value,
long timeout,
TimeUnit timeunit)
- Specified by:
tryPut in interface IMap<K,V>
put
public V put(K key,
V value,
long ttl,
TimeUnit timeunit)
- Specified by:
put in interface IMap<K,V>
putTransient
public void putTransient(K key,
V value,
long ttl,
TimeUnit timeunit)
- Specified by:
putTransient in interface IMap<K,V>
putIfAbsent
public V putIfAbsent(K key,
V value)
- Specified by:
putIfAbsent in interface BaseMap<K,V>- Specified by:
putIfAbsent in interface IMap<K,V>- Specified by:
putIfAbsent in interface ConcurrentMap<K,V>
putIfAbsent
public V putIfAbsent(K key,
V value,
long ttl,
TimeUnit timeunit)
- Specified by:
putIfAbsent in interface IMap<K,V>
replace
public boolean replace(K key,
V oldValue,
V newValue)
- Specified by:
replace in interface BaseMap<K,V>- Specified by:
replace in interface IMap<K,V>- Specified by:
replace in interface ConcurrentMap<K,V>
replace
public V replace(K key,
V value)
- Specified by:
replace in interface BaseMap<K,V>- Specified by:
replace in interface IMap<K,V>- Specified by:
replace in interface ConcurrentMap<K,V>
set
public void set(K key,
V value,
long ttl,
TimeUnit timeunit)
- Specified by:
set in interface IMap<K,V>
lock
public void lock(K key)
- Specified by:
lock in interface IMap<K,V>
lock
public void lock(K key,
long leaseTime,
TimeUnit timeUnit)
- Specified by:
lock in interface IMap<K,V>
isLocked
public boolean isLocked(K key)
- Specified by:
isLocked in interface IMap<K,V>
tryLock
public boolean tryLock(K key)
- Specified by:
tryLock in interface IMap<K,V>
tryLock
public boolean tryLock(K key,
long time,
TimeUnit timeunit)
throws InterruptedException
- Specified by:
tryLock in interface IMap<K,V>
- Throws:
InterruptedException
unlock
public void unlock(K key)
- Specified by:
unlock in interface IMap<K,V>
forceUnlock
public void forceUnlock(K key)
- Specified by:
forceUnlock in interface IMap<K,V>
addLocalEntryListener
public String addLocalEntryListener(EntryListener<K,V> listener)
- Specified by:
addLocalEntryListener in interface IMap<K,V>
addLocalEntryListener
public String addLocalEntryListener(EntryListener<K,V> listener,
Predicate<K,V> predicate,
boolean includeValue)
- Specified by:
addLocalEntryListener in interface IMap<K,V>
addLocalEntryListener
public String addLocalEntryListener(EntryListener<K,V> listener,
Predicate<K,V> predicate,
K key,
boolean includeValue)
- Specified by:
addLocalEntryListener in interface IMap<K,V>
addInterceptor
public String addInterceptor(MapInterceptor interceptor)
- Specified by:
addInterceptor in interface IMap<K,V>
removeInterceptor
public void removeInterceptor(String id)
- Specified by:
removeInterceptor in interface IMap<K,V>
addEntryListener
public String addEntryListener(EntryListener<K,V> listener,
boolean includeValue)
- Specified by:
addEntryListener in interface IMap<K,V>
removeEntryListener
public boolean removeEntryListener(String id)
- Specified by:
removeEntryListener in interface IMap<K,V>
addEntryListener
public String addEntryListener(EntryListener<K,V> listener,
K key,
boolean includeValue)
- Specified by:
addEntryListener in interface IMap<K,V>
addEntryListener
public String addEntryListener(EntryListener<K,V> listener,
Predicate<K,V> predicate,
K key,
boolean includeValue)
- Specified by:
addEntryListener in interface IMap<K,V>
addEntryListener
public String addEntryListener(EntryListener<K,V> listener,
Predicate<K,V> predicate,
boolean includeValue)
- Specified by:
addEntryListener in interface IMap<K,V>
getEntryView
public EntryView<K,V> getEntryView(K key)
- Specified by:
getEntryView in interface IMap<K,V>
evict
public boolean evict(K key)
- Specified by:
evict in interface IMap<K,V>
evictAll
public void evictAll()
- Specified by:
evictAll in interface IMap<K,V>
loadAll
public void loadAll(boolean replaceExistingValues)
- Specified by:
loadAll in interface IMap<K,V>
loadAll
public void loadAll(Set<K> keys,
boolean replaceExistingValues)
- Specified by:
loadAll in interface IMap<K,V>
keySet
public Set<K> keySet()
- Specified by:
keySet in interface IMap<K,V>- Specified by:
keySet in interface Map<K,V>
getAll
public Map<K,V> getAll(Set<K> keys)
- Specified by:
getAll in interface IMap<K,V>
values
public Collection<V> values()
- Specified by:
values in interface IMap<K,V>- Specified by:
values in interface Map<K,V>
entrySet
public Set<Map.Entry<K,V>> entrySet()
- Specified by:
entrySet in interface IMap<K,V>- Specified by:
entrySet in interface Map<K,V>
keySet
public Set<K> keySet(Predicate predicate)
- Specified by:
keySet in interface IMap<K,V>
entrySet
public Set<Map.Entry<K,V>> entrySet(Predicate predicate)
- Specified by:
entrySet in interface IMap<K,V>
values
public Collection<V> values(Predicate predicate)
- Specified by:
values in interface IMap<K,V>
localKeySet
public Set<K> localKeySet()
- Specified by:
localKeySet in interface IMap<K,V>
localKeySet
public Set<K> localKeySet(Predicate predicate)
- Specified by:
localKeySet in interface IMap<K,V>
addIndex
public void addIndex(String attribute,
boolean ordered)
- Specified by:
addIndex in interface IMap<K,V>
getLocalMapStats
public LocalMapStats getLocalMapStats()
- Specified by:
getLocalMapStats in interface IMap<K,V>
executeOnKey
public Object executeOnKey(K key,
EntryProcessor entryProcessor)
- Specified by:
executeOnKey in interface IMap<K,V>
submitToKey
public void submitToKey(K key,
EntryProcessor entryProcessor,
ExecutionCallback callback)
- Specified by:
submitToKey in interface IMap<K,V>
submitToKey
public Future submitToKey(K key,
EntryProcessor entryProcessor)
- Specified by:
submitToKey in interface IMap<K,V>
executeOnEntries
public Map<K,Object> executeOnEntries(EntryProcessor entryProcessor)
- Specified by:
executeOnEntries in interface IMap<K,V>
executeOnEntries
public Map<K,Object> executeOnEntries(EntryProcessor entryProcessor,
Predicate predicate)
- Specified by:
executeOnEntries in interface IMap<K,V>
aggregate
public <SuppliedValue,Result> Result aggregate(Supplier<K,V,SuppliedValue> supplier,
Aggregation<K,SuppliedValue,Result> aggregation)
- Specified by:
aggregate in interface IMap<K,V>
aggregate
public <SuppliedValue,Result> Result aggregate(Supplier<K,V,SuppliedValue> supplier,
Aggregation<K,SuppliedValue,Result> aggregation,
JobTracker jobTracker)
- Specified by:
aggregate in interface IMap<K,V>
executeOnKeys
public Map<K,Object> executeOnKeys(Set<K> keys,
EntryProcessor entryProcessor)
- Specified by:
executeOnKeys in interface IMap<K,V>
set
public void set(K key,
V value)
- Specified by:
set in interface BaseMap<K,V>- Specified by:
set in interface IMap<K,V>
size
public int size()
- Specified by:
size in interface BaseMap<K,V>- Specified by:
size in interface Map<K,V>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface BaseMap<K,V>- Specified by:
isEmpty in interface Map<K,V>
putAll
public void putAll(Map<? extends K,? extends V> m)
- Specified by:
putAll in interface Map<K,V>
clear
public void clear()
- Specified by:
clear in interface IMap<K,V>- Specified by:
clear in interface Map<K,V>
onDestroy
protected void onDestroy()
- Description copied from class:
ClientProxy
- Called before proxy is destroyed.
Overriding implementations should clean/release resources created during initialization.
- Overrides:
onDestroy in class ClientProxy
onShutdown
protected void onShutdown()
- Description copied from class:
ClientProxy
- Called before client shutdown.
Overriding implementations can add shutdown specific logic here.
- Overrides:
onShutdown in class ClientProxy
getTimeInMillis
protected long getTimeInMillis(long time,
TimeUnit timeunit)
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.