com.hazelcast.client.proxy
Class ClientMultiMapProxy<K,V>

java.lang.Object
  extended by com.hazelcast.client.spi.ClientProxy
      extended by com.hazelcast.client.proxy.ClientMultiMapProxy<K,V>
All Implemented Interfaces:
BaseMultiMap<K,V>, DistributedObject, MultiMap<K,V>

public class ClientMultiMapProxy<K,V>
extends ClientProxy
implements MultiMap<K,V>

Author:
ali 5/19/13

Field Summary
protected static String NULL_KEY_IS_NOT_ALLOWED
           
protected static String NULL_VALUE_IS_NOT_ALLOWED
           
 
Constructor Summary
ClientMultiMapProxy(String serviceName, String name)
           
 
Method Summary
 String addEntryListener(EntryListener<K,V> listener, boolean includeValue)
           
 String addEntryListener(EntryListener<K,V> listener, K key, boolean includeValue)
           
 String addLocalEntryListener(EntryListener<K,V> listener)
           
<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 containsEntry(K key, V value)
           
 boolean containsKey(K key)
           
 boolean containsValue(Object value)
           
 Set<Map.Entry<K,V>> entrySet()
           
 void forceUnlock(K key)
           
 Collection<V> get(K key)
           
 LocalMultiMapStats getLocalMultiMapStats()
           
protected  long getTimeInMillis(long time, TimeUnit timeunit)
           
 boolean isLocked(K key)
           
 Set<K> keySet()
           
 Set<K> localKeySet()
           
 void lock(K key)
           
 void lock(K key, long leaseTime, TimeUnit timeUnit)
           
protected  void onDestroy()
          Called before proxy is destroyed.
 boolean put(K key, V value)
           
 Collection<V> remove(Object key)
           
 boolean remove(Object key, Object value)
           
 boolean removeEntryListener(String registrationId)
           
 int size()
           
 String toString()
           
 boolean tryLock(K key)
           
 boolean tryLock(K key, long time, TimeUnit timeunit)
           
 void unlock(K key)
           
 int valueCount(K key)
           
 Collection<V> values()
           
 
Methods inherited from class com.hazelcast.client.spi.ClientProxy
destroy, equals, getContext, getId, getName, getPartitionKey, getServiceName, hashCode, invoke, invoke, invoke, invokeInterruptibly, listen, listen, onInitialize, onShutdown, setContext, stopListening, throwExceptionIfNull, toData, toObject
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.hazelcast.core.MultiMap
getName
 
Methods inherited from interface com.hazelcast.core.DistributedObject
destroy, getId, getPartitionKey, getServiceName
 

Field Detail

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
Constructor Detail

ClientMultiMapProxy

public ClientMultiMapProxy(String serviceName,
                           String name)
Method Detail

put

public boolean put(K key,
                   V value)
Specified by:
put in interface BaseMultiMap<K,V>
Specified by:
put in interface MultiMap<K,V>

get

public Collection<V> get(K key)
Specified by:
get in interface BaseMultiMap<K,V>
Specified by:
get in interface MultiMap<K,V>

remove

public boolean remove(Object key,
                      Object value)
Specified by:
remove in interface BaseMultiMap<K,V>
Specified by:
remove in interface MultiMap<K,V>

remove

public Collection<V> remove(Object key)
Specified by:
remove in interface BaseMultiMap<K,V>
Specified by:
remove in interface MultiMap<K,V>

localKeySet

public Set<K> localKeySet()
Specified by:
localKeySet in interface MultiMap<K,V>

keySet

public Set<K> keySet()
Specified by:
keySet in interface MultiMap<K,V>

values

public Collection<V> values()
Specified by:
values in interface MultiMap<K,V>

entrySet

public Set<Map.Entry<K,V>> entrySet()
Specified by:
entrySet in interface MultiMap<K,V>

containsKey

public boolean containsKey(K key)
Specified by:
containsKey in interface MultiMap<K,V>

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface MultiMap<K,V>

containsEntry

public boolean containsEntry(K key,
                             V value)
Specified by:
containsEntry in interface MultiMap<K,V>

size

public int size()
Specified by:
size in interface BaseMultiMap<K,V>
Specified by:
size in interface MultiMap<K,V>

clear

public void clear()
Specified by:
clear in interface MultiMap<K,V>

valueCount

public int valueCount(K key)
Specified by:
valueCount in interface BaseMultiMap<K,V>
Specified by:
valueCount in interface MultiMap<K,V>

addLocalEntryListener

public String addLocalEntryListener(EntryListener<K,V> listener)
Specified by:
addLocalEntryListener in interface MultiMap<K,V>

addEntryListener

public String addEntryListener(EntryListener<K,V> listener,
                               boolean includeValue)
Specified by:
addEntryListener in interface MultiMap<K,V>

removeEntryListener

public boolean removeEntryListener(String registrationId)
Specified by:
removeEntryListener in interface MultiMap<K,V>

addEntryListener

public String addEntryListener(EntryListener<K,V> listener,
                               K key,
                               boolean includeValue)
Specified by:
addEntryListener in interface MultiMap<K,V>

lock

public void lock(K key)
Specified by:
lock in interface MultiMap<K,V>

lock

public void lock(K key,
                 long leaseTime,
                 TimeUnit timeUnit)
Specified by:
lock in interface MultiMap<K,V>

isLocked

public boolean isLocked(K key)
Specified by:
isLocked in interface MultiMap<K,V>

tryLock

public boolean tryLock(K key)
Specified by:
tryLock in interface MultiMap<K,V>

tryLock

public boolean tryLock(K key,
                       long time,
                       TimeUnit timeunit)
                throws InterruptedException
Specified by:
tryLock in interface MultiMap<K,V>
Throws:
InterruptedException

unlock

public void unlock(K key)
Specified by:
unlock in interface MultiMap<K,V>

forceUnlock

public void forceUnlock(K key)
Specified by:
forceUnlock in interface MultiMap<K,V>

getLocalMultiMapStats

public LocalMultiMapStats getLocalMultiMapStats()
Specified by:
getLocalMultiMapStats in interface MultiMap<K,V>

aggregate

public <SuppliedValue,Result> Result aggregate(Supplier<K,V,SuppliedValue> supplier,
                                               Aggregation<K,SuppliedValue,Result> aggregation)
Specified by:
aggregate in interface MultiMap<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 MultiMap<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

getTimeInMillis

protected long getTimeInMillis(long time,
                               TimeUnit timeunit)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.