com.hazelcast.map.impl.proxy
Class MapProxyImpl<K,V>

java.lang.Object
  extended by com.hazelcast.spi.AbstractDistributedObject<MapService>
      extended by com.hazelcast.map.impl.proxy.MapProxyImpl<K,V>
Type Parameters:
K - the key type of map.
V - the value type of map.
All Implemented Interfaces:
BaseMap<K,V>, DistributedObject, IMap<K,V>, InitializingObject, ConcurrentMap<K,V>, Map<K,V>

public class MapProxyImpl<K,V>
extends AbstractDistributedObject<MapService>
implements IMap<K,V>, InitializingObject

Proxy implementation of IMap interface.


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
protected  LocalMapStatsImpl localMapStats
           
protected  LockProxySupport lockSupport
           
protected  String name
           
protected static String NULL_KEY_IS_NOT_ALLOWED
           
protected static String NULL_VALUE_IS_NOT_ALLOWED
           
protected  PartitioningStrategy partitionStrategy
           
 
Fields inherited from class com.hazelcast.spi.AbstractDistributedObject
PARTITIONING_STRATEGY
 
Constructor Summary
MapProxyImpl(String name, MapService mapService, NodeEngine nodeEngine)
           
 
Method Summary
 String addEntryListener(EntryListener<K,V> listener, K key, boolean includeValue)
          Adds the specified entry listener for the specified key.
 String addEntryListener(EntryListener<K,V> listener, Predicate<K,V> predicate, boolean includeValue)
          Adds an continuous entry listener for this map.
 String addEntryListener(EntryListener<K,V> listener, Predicate<K,V> predicate, K key, boolean includeValue)
          Adds an continuous entry listener for this map.
 String addEntryListener(EntryListener listener, boolean includeValue)
          Adds an entry listener for this map.
protected  String addEntryListenerInternal(EntryListener listener, Data key, boolean includeValue)
           
protected  String addEntryListenerInternal(EntryListener listener, Predicate predicate, Data key, boolean includeValue)
           
 void addIndex(String attribute, boolean ordered)
           
 String addInterceptor(MapInterceptor interceptor)
          Adds an interceptor for this map.
 String addLocalEntryListener(EntryListener listener)
           
 String addLocalEntryListener(EntryListener<K,V> listener, Predicate<K,V> predicate, boolean includeValue)
          Adds a local entry listener for this map.
 String addLocalEntryListener(EntryListener<K,V> listener, Predicate<K,V> predicate, K key, boolean includeValue)
          Adds a local entry listener for this map.
 String addLocalEntryListenerInternal(EntryListener listener, Predicate predicate, Data key, boolean includeValue)
           
 String addMapInterceptorInternal(MapInterceptor interceptor)
           
<SuppliedValue,Result>
Result
aggregate(Supplier<K,V,SuppliedValue> supplier, Aggregation<K,SuppliedValue,Result> aggregation)
          Executes a predefined aggregation on the maps data set.
<SuppliedValue,Result>
Result
aggregate(Supplier<K,V,SuppliedValue> supplier, Aggregation<K,SuppliedValue,Result> aggregation, JobTracker jobTracker)
          Executes a predefined aggregation on the maps data set.
 void clear()
          This method clears the map and deletaAll on MapStore which if connected to a database, will delete the records from that database.
 void clearInternal()
           
 void clearMapOnly()
          This method clears the map.It does not invoke deleteAll on any associated MapStore.
 boolean containsKey(Object k)
          Returns true if this map contains an entry for the specified key.
protected  boolean containsKeyInternal(Data key)
           
 boolean containsValue(Object v)
          
 boolean containsValueInternal(Data dataValue)
           
 void delete(Object k)
          Removes the mapping for a key from this map if it is present (optional operation).
protected  void deleteInternal(Data key)
           
 Set entrySet()
          Returns a Set clone of the mappings contained in this map.
 Set entrySet(Predicate predicate)
          Queries the map based on the specified predicate and returns the matching entries.
 boolean evict(Object key)
          Evicts the specified key from this map.
 void evictAll()
          Evicts all keys from this map except locked ones.
protected  void evictAllInternal()
           
protected  boolean evictInternal(Data key)
           
 Map executeOnEntries(EntryProcessor entryProcessor)
          IMap.executeOnEntries(EntryProcessor)
 Map executeOnEntries(EntryProcessor entryProcessor, Predicate predicate)
          IMap.executeOnEntries(EntryProcessor, Predicate)
 Object executeOnKey(K key, EntryProcessor entryProcessor)
          Applies the user defined EntryProcessor to the entry mapped by the key.
 Data executeOnKeyInternal(Data key, EntryProcessor entryProcessor)
           
 ICompletableFuture executeOnKeyInternal(Data key, EntryProcessor entryProcessor, ExecutionCallback callback)
           
 Map<K,Object> executeOnKeys(Set<K> keys, EntryProcessor entryProcessor)
          Applies the user defined EntryProcessor to the entries mapped by the collection of keys.
 Map executeOnKeysInternal(Set<Data> keys, EntryProcessor entryProcessor)
           
 void flush()
           
 void forceUnlock(K key)
          Releases the lock for the specified key regardless of the lock owner.
 V get(Object k)
          Returns the value for the specified key, or null if this map does not contain this key.
 Map<K,V> getAll(Set<K> keys)
          Returns the entries for the given keys.
protected  Map<Object,Object> getAllObjectInternal(Set<Data> keys)
           
 Future<V> getAsync(K k)
          Asynchronously gets the given key.
protected  ICompletableFuture<Data> getAsyncInternal(Data key)
           
 EntryView<K,V> getEntryView(K key)
          Returns the EntryView for the specified key.
protected  EntryView getEntryViewInternal(Data key)
           
protected  Object getInternal(Data key)
           
 LocalMapStats getLocalMapStats()
           
protected  MapStore getMapStore()
           
 String getName()
          Returns the unique name for this DistributedObject.
 String getServiceName()
          Returns the service name for this object.
protected  long getTimeInMillis(long time, TimeUnit timeunit)
           
 void initialize()
           
protected  Object invoke(Operation operation, int partitionId)
           
 boolean isEmpty()
           
 boolean isLocked(K k)
          Checks the lock for the specified key.
 Set<K> keySet()
          Returns a set clone of the keys contained in this map.
 Set<K> keySet(Predicate predicate)
          Queries the map based on the specified predicate and returns the keys of matching entries.
 void loadAll(boolean replaceExistingValues)
          Loads all keys into the store.
 void loadAll(Set<K> keys, boolean replaceExistingValues)
          Loads given keys.
protected  void loadAllInternal(List<Data> keys, boolean replaceExistingValues)
          Maps keys to corresponding partitions and sends operations to them.
 Set<K> localKeySet()
          Returns the locally owned set of keys.
 Set<K> localKeySet(Predicate predicate)
          Returns the keys of matching locally owned entries.
 void lock(K key)
          Acquires the lock for the specified key.
 void lock(Object key, long leaseTime, TimeUnit timeUnit)
          Acquires the lock for the specified key for the specified lease time.
 V put(K k, V v)
          Associates the specified value with the specified key in this map.
 V put(K k, V v, long ttl, TimeUnit timeunit)
          Puts an entry into this map with a given ttl (time to live) value.
 void putAll(Map<? extends K,? extends V> m)
           
protected  void putAllInternal(Map<? extends Object,? extends Object> entries)
           
 Future putAsync(K key, V value)
          Asynchronously puts the given key and value.
 ICompletableFuture putAsync(K key, V value, long ttl, TimeUnit timeunit)
          Asynchronously puts the given key and value into this map with a given ttl (time to live) value.
protected  ICompletableFuture<Data> putAsyncInternal(Data key, Data value, long ttl, TimeUnit timeunit)
           
 V putIfAbsent(K k, V v)
          If the specified key is not already associated with a value, associate it with the given value.
 V putIfAbsent(K k, V v, long ttl, TimeUnit timeunit)
          Puts an entry into this map with a given ttl (time to live) value if the specified key is not already associated with a value.
protected  Data putIfAbsentInternal(Data key, Data value, long ttl, TimeUnit timeunit)
           
protected  Data putInternal(Data key, Data value, long ttl, TimeUnit timeunit)
           
 void putTransient(K k, V v, long ttl, TimeUnit timeunit)
          Same as #put(K, V, long, java.util.concurrent.TimeUnit) but MapStore, if defined, will not be called to store/persist the entry.
protected  void putTransientInternal(Data key, Data value, long ttl, TimeUnit timeunit)
           
protected  Set query(Predicate predicate, IterationType iterationType, boolean dataResult)
           
protected  Set queryLocal(Predicate predicate, IterationType iterationType, boolean dataResult)
           
 V remove(Object k)
          Removes the mapping for a key from this map if it is present.
 boolean remove(Object k, Object v)
          Removes the entry for a key only if currently mapped to a given value.
 ICompletableFuture removeAsync(K key)
          Asynchronously removes the given key.
protected  ICompletableFuture<Data> removeAsyncInternal(Data key)
           
 boolean removeEntryListener(String id)
          Removes the specified entry listener Returns silently if there is no such listener added before.
protected  boolean removeEntryListenerInternal(String id)
           
 void removeInterceptor(String id)
          Removes the given interceptor for this map.
protected  Data removeInternal(Data key)
           
protected  boolean removeInternal(Data key, Data value)
           
 void removeMapInterceptorInternal(String id)
           
 V replace(K k, V v)
          Replaces the entry for a key only if it is currently mapped to some value.
 boolean replace(K k, V o, V v)
          Replaces the entry for a key only if currently mapped to a given value.
protected  Data replaceInternal(Data key, Data value)
           
protected  boolean replaceInternal(Data key, Data expect, Data update)
           
 void set(K key, V value)
          Puts an entry into this map.
 void set(K k, V v, long ttl, TimeUnit timeunit)
          Puts an entry into this map with a given ttl (time to live) value.
protected  void setInternal(Data key, Data value, long ttl, TimeUnit timeunit)
           
 int size()
           
 ICompletableFuture submitToKey(K key, EntryProcessor entryProcessor)
          Applies the user defined EntryProcessor to the entry mapped by the key.
 void submitToKey(K key, EntryProcessor entryProcessor, ExecutionCallback callback)
          Applies the user defined EntryProcessor to the entry mapped by the key with specified ExecutionCallback to listen event status and returns immediately.
protected  Data toData(Object obj)
           
protected  Data toData(Object o, PartitioningStrategy partitioningStrategy)
           
protected  Object toObject(Object obj)
           
 String toString()
           
 boolean tryLock(K key)
          Tries to acquire the lock for the specified key.
 boolean tryLock(K key, long time, TimeUnit timeunit)
          Tries to acquire the lock for the specified key.
 boolean tryPut(K k, V v, long timeout, TimeUnit timeunit)
          Tries to put the given key and value into this map within a specified timeout value.
protected  boolean tryPutInternal(Data key, Data value, long timeout, TimeUnit timeunit)
           
 boolean tryRemove(K key, long timeout, TimeUnit timeunit)
          Tries to remove the entry with the given key from this map within specified timeout value.
protected  boolean tryRemoveInternal(Data key, long timeout, TimeUnit timeunit)
           
 void unlock(K key)
          Releases the lock for the specified key.
 Collection<V> values()
          Returns a collection clone of the values contained in this map.
 Collection<V> values(Predicate predicate)
          Queries the map based on the specified predicate and returns the values of matching entries.
 void waitUntilLoaded()
           
 
Methods inherited from class com.hazelcast.spi.AbstractDistributedObject
destroy, equals, getId, getNameAsPartitionAwareData, getNodeEngine, getPartitionKey, getService, hashCode, invalidate, postDestroy, throwNotActiveException
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.hazelcast.core.IMap
addIndex, addLocalEntryListener, executeOnEntries, executeOnEntries, flush, getLocalMapStats
 
Methods inherited from interface java.util.Map
equals, hashCode, isEmpty, size
 
Methods inherited from interface com.hazelcast.core.BaseMap
isEmpty, size
 
Methods inherited from interface com.hazelcast.core.DistributedObject
destroy, getId, getName, getPartitionKey, getServiceName
 
Methods inherited from interface com.hazelcast.spi.InitializingObject
initialize
 

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

name

protected final String name

localMapStats

protected final LocalMapStatsImpl localMapStats

lockSupport

protected final LockProxySupport lockSupport

partitionStrategy

protected final PartitioningStrategy partitionStrategy
Constructor Detail

MapProxyImpl

public MapProxyImpl(String name,
                    MapService mapService,
                    NodeEngine nodeEngine)
Method Detail

get

public V get(Object k)
Description copied from interface: IMap
Returns the value for the specified key, or null if this map does not contain this key.

Warning:

This method returns a clone of original value, modifying the returned value does not change the actual value in the map. One should put modified value back to make changes visible to all nodes.

      V value = map.get(key);
      value.updateSomeProperty();
      map.put(key, value);
 

Warning-2:

This method uses hashCode and equals of binary form of the key, not the actual implementations of hashCode and equals defined in key's class.

Specified by:
get in interface BaseMap<K,V>
Specified by:
get in interface IMap<K,V>
Specified by:
get in interface Map<K,V>
Parameters:
k - The specified key.
Returns:
The value for the specified key.

put

public V put(K k,
             V v)
Description copied from interface: IMap
Associates the specified value with the specified key in this map. If the map previously contained a mapping for the key, the old value is replaced by the specified value.

Warning:

This method returns a clone of previous value, not the original (identically equal) value previously put into map.

Warning-2:

This method uses hashCode and equals of binary form of the key, not the actual implementations of hashCode and equals defined in key's class.

Specified by:
put in interface BaseMap<K,V>
Specified by:
put in interface IMap<K,V>
Specified by:
put in interface Map<K,V>
Parameters:
k - The specified key.
v - The value to associate with the key.
Returns:
Previous value associated with key or null if there was no mapping for key.

put

public V put(K k,
             V v,
             long ttl,
             TimeUnit timeunit)
Description copied from interface: IMap
Puts an entry into this map with a given ttl (time to live) value. Entry will expire and get evicted after the ttl. If ttl is 0, then the entry lives forever.

Warning:

This method uses hashCode and equals of binary form of the key, not the actual implementations of hashCode and equals defined in key's class.

Warning-2:

This method returns a clone of previous value, not the original (identically equal) value previously put into map.

Warning 3:

Time resolution for TTL is seconds. Given TTL value is rounded to the next closest second value.

Specified by:
put in interface IMap<K,V>
Parameters:
k - key of the entry
v - value of the entry
ttl - maximum time for this entry to stay in the map 0 means infinite.
timeunit - time unit for the ttl
Returns:
old value of the entry

tryPut

public boolean tryPut(K k,
                      V v,
                      long timeout,
                      TimeUnit timeunit)
Description copied from interface: IMap
Tries to put the given key and value into this map within a specified timeout value. If this method returns false, it means that the caller thread could not acquire the lock for the key within the timeout duration, thus the put operation is not successful.

Warning:

This method uses hashCode and equals of binary form of the key, not the actual implementations of hashCode and equals defined in key's class.

Specified by:
tryPut in interface IMap<K,V>
Parameters:
k - key of the entry
v - value of the entry
timeout - maximum time to wait
timeunit - time unit for the timeout
Returns:
true if the put is successful, false otherwise.

putIfAbsent

public V putIfAbsent(K k,
                     V v)
Description copied from interface: IMap
If the specified key is not already associated with a value, associate it with the given value. This is equivalent to
   if (!map.containsKey(key))
       return map.put(key, value);
   else
       return map.get(key);
except that the action is performed atomically.

Note:

This method uses hashCode and equals of the binary form of the key, not the actual implementations of hashCode and equals defined in key's class.

Also, this method returns a clone of the previous value, not the original (identically equal) value previously put into the map.

Specified by:
putIfAbsent in interface BaseMap<K,V>
Specified by:
putIfAbsent in interface IMap<K,V>
Specified by:
putIfAbsent in interface ConcurrentMap<K,V>
Parameters:
k - The specified key.
v - The value to associate with the key when there is no previous value.
Returns:
a clone of the previous value

putIfAbsent

public V putIfAbsent(K k,
                     V v,
                     long ttl,
                     TimeUnit timeunit)
Description copied from interface: IMap
Puts an entry into this map with a given ttl (time to live) value if the specified key is not already associated with a value. Entry will expire and get evicted after the ttl.

Warning:

This method uses hashCode and equals of binary form of the key, not the actual implementations of hashCode and equals defined in key's class.

Warning-2:

This method returns a clone of previous value, not the original (identically equal) value previously put into map.

Warning 3:

Time resolution for TTL is seconds. Given TTL value is rounded to next closest second value.

Specified by:
putIfAbsent in interface IMap<K,V>
Parameters:
k - key of the entry
v - value of the entry
ttl - maximum time for this entry to stay in the map
timeunit - time unit for the ttl
Returns:
old value of the entry

putTransient

public void putTransient(K k,
                         V v,
                         long ttl,
                         TimeUnit timeunit)
Description copied from interface: IMap
Same as #put(K, V, long, java.util.concurrent.TimeUnit) but MapStore, if defined, will not be called to store/persist the entry. If ttl is 0, then the entry lives forever.

Warning 1:

This method uses hashCode and equals of binary form of the key, not the actual implementations of hashCode and equals defined in key's class.

Warning 2:

Time resolution for TTL is seconds. Given TTL value is rounded to next closest second value.

Specified by:
putTransient in interface IMap<K,V>
Parameters:
k - key of the entry
v - value of the entry
ttl - maximum time for this entry to stay in the map. 0 means infinite.
timeunit - time unit for the ttl

replace

public boolean replace(K k,
                       V o,
                       V v)
Description copied from interface: IMap
Replaces the entry for a key only if currently mapped to a given value. This is equivalent to
   if (map.containsKey(key) && map.get(key).equals(oldValue)) {
       map.put(key, newValue);
       return true;
   } else return false;
except that the action is performed atomically.

Warning:

This method uses hashCode and equals of binary form of the key, not the actual implementations of hashCode and equals defined in key's class.

Specified by:
replace in interface BaseMap<K,V>
Specified by:
replace in interface IMap<K,V>
Specified by:
replace in interface ConcurrentMap<K,V>
Parameters:
k - The specified key.
o - Replace the key value if it is the old value.
v - The new value to replace the old value.
Returns:
true if the value was replaced.

replace

public V replace(K k,
                 V v)
Description copied from interface: IMap
Replaces the entry for a key only if it is currently mapped to some value. This is equivalent to
   if (map.containsKey(key)) {
       return map.put(key, value);
   } else return null;
except that the action is performed atomically.

Warning:

This method uses hashCode and equals of binary form of the key, not the actual implementations of hashCode and equals defined in key's class.

Warning-2:

This method returns a clone of previous value, not the original (identically equal) value previously put into map.

Specified by:
replace in interface BaseMap<K,V>
Specified by:
replace in interface IMap<K,V>
Specified by:
replace in interface ConcurrentMap<K,V>
Parameters:
k - The specified key.
v - The value to replace the previous value.
Returns:
The previous value associated with key, or null if there was no mapping for key.

set

public void set(K key,
                V value)
Description copied from interface: IMap
Puts an entry into this map. Similar to put operation except that set doesn't return the old value which is more efficient.

Warning:

This method breaks the contract of EntryListener. When an entry is updated by set(), it fires an EntryEvent with a null oldValue.

Warning-2:

This method uses hashCode and equals of binary form of the key, not the actual implementations of hashCode and equals defined in key's class.

Specified by:
set in interface BaseMap<K,V>
Specified by:
set in interface IMap<K,V>
Parameters:
key - key of the entry
value - value of the entry

set

public void set(K k,
                V v,
                long ttl,
                TimeUnit timeunit)
Description copied from interface: IMap
Puts an entry into this map with a given ttl (time to live) value. Entry will expire and get evicted after the ttl. If ttl is 0, then the entry lives forever. Similar to put operation except that set doesn't return the old value which is more efficient.

Warning 1:

This method uses hashCode and equals of binary form of the key, not the actual implementations of hashCode and equals defined in key's class.

Warning 2:

Time resolution for TTL is seconds. Given TTL value is rounded to next closest second value.

Specified by:
set in interface IMap<K,V>
Parameters:
k - key of the entry
v - value of the entry
ttl - maximum time for this entry to stay in the map 0 means infinite.
timeunit - time unit for the ttl

remove

public V remove(Object k)
Description copied from interface: IMap
Removes the mapping for a key from this map if it is present.

The map will not contain a mapping for the specified key once the call returns.

Warning:

This method uses hashCode and equals of binary form of the key, not the actual implementations of hashCode and equals defined in key's class.

Warning-2:

This method returns a clone of the previous value, not the original (identically equal) value previously put into map.

Specified by:
remove in interface BaseMap<K,V>
Specified by:
remove in interface IMap<K,V>
Specified by:
remove in interface Map<K,V>
Parameters:
k - Remove the mapping for this key.
Returns:
The previous value associated with key, or null if there was no mapping for key.

remove

public boolean remove(Object k,
                      Object v)
Description copied from interface: IMap
Removes the entry for a key only if currently mapped to a given value. This is equivalent to
   if (map.containsKey(key) && map.get(key).equals(value)) {
       map.remove(key);
       return true;
   } else return false;
except that the action is performed atomically.

Warning:

This method uses hashCode and equals of binary form of the key, not the actual implementations of hashCode and equals defined in key's class.

Specified by:
remove in interface BaseMap<K,V>
Specified by:
remove in interface IMap<K,V>
Specified by:
remove in interface ConcurrentMap<K,V>
Parameters:
k - The specified key.
v - Remove the key if it has this value.
Returns:
true if the value was removed.

delete

public void delete(Object k)
Description copied from interface: IMap
Removes the mapping for a key from this map if it is present (optional operation).

Differently from IMap.remove(Object); this operation does not return removed value to avoid serialization cost of returned value.

If the removed value will not be used, delete operation should be preferred over remove operation for a better performance.

The map will not contain a mapping for the specified key once the call returns.

Warning:

This method breaks the contract of EntryListener. When an entry is removed by delete(), it fires an EntryEvent with a null oldValue.

Also listener with predicates, will have null values, so only keys can be queried via predicates.

Specified by:
delete in interface BaseMap<K,V>
Specified by:
delete in interface IMap<K,V>
Parameters:
k - key whose mapping is to be removed from the map

containsKey

public boolean containsKey(Object k)
Description copied from interface: IMap
Returns true if this map contains an entry for the specified key.

Warning:

ˆ This method uses hashCode and equals of binary form of the key, not the actual implementations of hashCode and equals defined in key's class. The key will be searched for first in memory and if not found, and if one is attributed, will then attempt to load the key via a MapLoader.

Specified by:
containsKey in interface BaseMap<K,V>
Specified by:
containsKey in interface IMap<K,V>
Specified by:
containsKey in interface Map<K,V>
Parameters:
k - The specified key.
Returns:
true if this map contains an entry for the specified key.

containsValue

public boolean containsValue(Object v)
Description copied from interface: IMap

Specified by:
containsValue in interface IMap<K,V>
Specified by:
containsValue in interface Map<K,V>

lock

public void lock(K key)
Description copied from interface: IMap
Acquires the lock for the specified key.

If the lock is not available, then the current thread becomes disabled for thread scheduling purposes and lies dormant until the lock has been acquired.

You get a lock whether the value is present in the map or not. Other threads (possibly on other systems) would block on their invoke of lock() until the non-existent key is unlocked. If the lock holder introduces the key to the map, the put() operation is not blocked. If a thread not holding a lock on the non-existent key tries to introduce the key while a lock exists on the non-existent key, the put() operation blocks until it is unlocked.

Scope of the lock is this map only. Acquired lock is only for the key in this map.

Locks are re-entrant so if the key is locked N times then it should be unlocked N times before another thread can acquire it.

There is no lock timeout on this method. Locks will be held infinitely.

Warning:

This method uses hashCode and equals of binary form of the key, not the actual implementations of hashCode and equals defined in key's class.

Specified by:
lock in interface IMap<K,V>
Parameters:
key - key to lock.

lock

public void lock(Object key,
                 long leaseTime,
                 TimeUnit timeUnit)
Description copied from interface: IMap
Acquires the lock for the specified key for the specified lease time.

After lease time, lock will be released..

If the lock is not available then the current thread becomes disabled for thread scheduling purposes and lies dormant until the lock has been acquired.

Scope of the lock is this map only. Acquired lock is only for the key in this map.

Locks are re-entrant so if the key is locked N times then it should be unlocked N times before another thread can acquire it.

Warning:

This method uses hashCode and equals of binary form of the key, not the actual implementations of hashCode and equals defined in key's class.

Specified by:
lock in interface IMap<K,V>
Parameters:
key - the key to lock
leaseTime - time to wait before releasing the lock
timeUnit - unit of time to specify lease time

unlock

public void unlock(K key)
Description copied from interface: IMap
Releases the lock for the specified key. It never blocks and returns immediately.

If the current thread is the holder of this lock then the hold count is decremented. If the hold count is now zero then the lock is released. If the current thread is not the holder of this lock then IllegalMonitorStateException is thrown.

Warning:

This method uses hashCode and equals of binary form of the key, not the actual implementations of hashCode and equals defined in key's class.

Specified by:
unlock in interface IMap<K,V>
Parameters:
key - the key to lock.

tryRemove

public boolean tryRemove(K key,
                         long timeout,
                         TimeUnit timeunit)
Description copied from interface: IMap
Tries to remove the entry with the given key from this map within specified timeout value. If the key is already locked by another thread and/or member, then this operation will wait timeout amount for acquiring the lock.

Warning:

This method uses hashCode and equals of binary form of the key, not the actual implementations of hashCode and equals defined in key's class.

Warning-2:

This method returns a clone of the previous value, not the original (identically equal) value previously put into the map.

Specified by:
tryRemove in interface IMap<K,V>
Parameters:
key - key of the entry
timeout - maximum time to wait for acquiring the lock for the key
timeunit - time unit for the timeout
Returns:
true if the remove is successful, false otherwise.

getAsync

public Future<V> getAsync(K k)
Description copied from interface: IMap
Asynchronously gets the given key. Future future = map.getAsync(key); // do some other stuff, when ready get the result Object value = future.get(); Future.get() will block until the actual map.get() completes. If the application requires timely response, then Future.get(timeout, timeunit) can be used. try{ Future future = map.getAsync(key); Object value = future.get(40, TimeUnit.MILLISECOND); }catch (TimeoutException t) { // time wasn't enough } ExecutionException is never thrown.

Warning:

This method uses hashCode and equals of binary form of the key, not the actual implementations of hashCode and equals defined in key's class.

Specified by:
getAsync in interface IMap<K,V>
Parameters:
k - the key of the map entry
Returns:
Future from which the value of the key can be retrieved.
See Also:
Future

isLocked

public boolean isLocked(K k)
Description copied from interface: IMap
Checks the lock for the specified key.

If the lock is acquired then returns true, else false.

Warning:

This method uses hashCode and equals of binary form of the key, not the actual implementations of hashCode and equals defined in key's class.

Specified by:
isLocked in interface IMap<K,V>
Parameters:
k - the key that is checked for lock.
Returns:
true if lock is acquired, false otherwise.

putAsync

public Future putAsync(K key,
                       V value)
Description copied from interface: IMap
Asynchronously puts the given key and value. Future future = map.putAsync(key, value); // do some other stuff, when ready get the result Object oldValue = future.get(); Future.get() will block until the actual map.put() completes. If the application requires a timely response, then you can use Future.get(timeout, timeunit). try{ Future future = map.putAsync(key, newValue); Object oldValue = future.get(40, TimeUnit.MILLISECOND); }catch (TimeoutException t) { // time wasn't enough } ExecutionException is never thrown.

Warning:

This method uses hashCode and equals of binary form of the key, not the actual implementations of hashCode and equals defined in key's class.

Specified by:
putAsync in interface IMap<K,V>
Parameters:
key - the key of the map entry
value - the new value of the map entry
Returns:
Future from which the old value of the key can be retrieved.
See Also:
Future

putAsync

public ICompletableFuture putAsync(K key,
                                   V value,
                                   long ttl,
                                   TimeUnit timeunit)
Description copied from interface: IMap
Asynchronously puts the given key and value into this map with a given ttl (time to live) value. Entry will expire and get evicted after the ttl. If ttl is 0, then the entry lives forever. Future future = map.putAsync(key, value, ttl, timeunit); // do some other stuff, when ready get the result Object oldValue = future.get(); Future.get() will block until the actual map.get() completes. If the application requires timely response, then Future.get(timeout, timeunit) can be used. try{ Future future = map.putAsync(key, newValue, ttl, timeunit); Object oldValue = future.get(40, TimeUnit.MILLISECOND); }catch (TimeoutException t) { // time wasn't enough } ExecutionException is never thrown.

Warning 1:

This method uses hashCode and equals of binary form of the key, not the actual implementations of hashCode and equals defined in key's class.

Warning 2:

Time resolution for TTL is seconds. Given TTL value is rounded to next closest second value.

Specified by:
putAsync in interface IMap<K,V>
Parameters:
key - the key of the map entry
value - the new value of the map entry
ttl - maximum time for this entry to stay in the map 0 means infinite.
timeunit - time unit for the ttl
Returns:
Future from which the old value of the key can be retrieved.
See Also:
Future

removeAsync

public ICompletableFuture removeAsync(K key)
Description copied from interface: IMap
Asynchronously removes the given key.

Warning:

This method uses hashCode and equals of binary form of the key, not the actual implementations of hashCode and equals defined in key's class.

Specified by:
removeAsync in interface IMap<K,V>
Parameters:
key - The key of the map entry to remove.
Returns:
A Future from which the value removed from the map can be retrieved.

getAll

public Map<K,V> getAll(Set<K> keys)
Description copied from interface: IMap
Returns the entries for the given keys. If any keys are not present in the Map, it will call MapLoader.loadAll(java.util.Collection).

Warning:

The returned map is NOT backed by the original map, so changes to the original map are NOT reflected in the returned map, and vice-versa.

Warning-2:

This method uses hashCode and equals of binary form of the keys, not the actual implementations of hashCode and equals defined in key's class.

Specified by:
getAll in interface IMap<K,V>
Parameters:
keys - keys to get
Returns:
map of entries

putAll

public void putAll(Map<? extends K,? extends V> m)
Specified by:
putAll in interface Map<K,V>

tryLock

public boolean tryLock(K key)
Description copied from interface: IMap
Tries to acquire the lock for the specified key.

If the lock is not available then the current thread doesn't wait and returns false immediately.

Warning:

This method uses hashCode and equals of binary form of the key, not the actual implementations of hashCode and equals defined in key's class.

Specified by:
tryLock in interface IMap<K,V>
Parameters:
key - the key to lock.
Returns:
true if lock is acquired, false otherwise.

tryLock

public boolean tryLock(K key,
                       long time,
                       TimeUnit timeunit)
                throws InterruptedException
Description copied from interface: IMap
Tries to acquire the lock for the specified key.

If the lock is not available then the current thread becomes disabled for thread scheduling purposes and lies dormant until one of two things happens:

Warning:

This method uses hashCode and equals of binary form of the key, not the actual implementations of hashCode and equals defined in key's class.

Specified by:
tryLock in interface IMap<K,V>
Parameters:
key - key to lock in this map
time - maximum time to wait for the lock
timeunit - time unit of the time argument.
Returns:
true if the lock was acquired and false if the waiting time elapsed before the lock was acquired.
Throws:
InterruptedException

forceUnlock

public void forceUnlock(K key)
Description copied from interface: IMap
Releases the lock for the specified key regardless of the lock owner. It always successfully unlocks the key, never blocks, and returns immediately.

Warning:

This method uses hashCode and equals of binary form of the key, not the actual implementations of hashCode and equals defined in key's class.

Specified by:
forceUnlock in interface IMap<K,V>
Parameters:
key - the key to lock.

addInterceptor

public String addInterceptor(MapInterceptor interceptor)
Description copied from interface: IMap
Adds an interceptor for this map. Added interceptor will intercept operations and execute user defined methods and will cancel operations if user defined method throw exception.

Specified by:
addInterceptor in interface IMap<K,V>
Parameters:
interceptor - map interceptor
Returns:
id of registered interceptor

removeInterceptor

public void removeInterceptor(String id)
Description copied from interface: IMap
Removes the given interceptor for this map. So it will not intercept operations anymore.

Specified by:
removeInterceptor in interface IMap<K,V>
Parameters:
id - registration id of the map interceptor

addLocalEntryListener

public String addLocalEntryListener(EntryListener<K,V> listener,
                                    Predicate<K,V> predicate,
                                    boolean includeValue)
Description copied from interface: IMap
Adds a local entry listener for this map. The added listener will be only listening for the events (add/remove/update/evict) of the locally owned entries. Listener will get notified for map add/remove/update/evict events filtered by given predicate.

Specified by:
addLocalEntryListener in interface IMap<K,V>
Parameters:
listener - entry listener
predicate - predicate for filtering entries
includeValue - true if EntryEvent should contain the value.
Returns:
A UUID.randomUUID().toString() which is used as a key to remove the listener.

addLocalEntryListener

public String addLocalEntryListener(EntryListener<K,V> listener,
                                    Predicate<K,V> predicate,
                                    K key,
                                    boolean includeValue)
Description copied from interface: IMap
Adds a local entry listener for this map. The added listener will be only listening for the events (add/remove/update/evict) of the locally owned entries. Listener will get notified for map add/remove/update/evict events filtered by given predicate.

Specified by:
addLocalEntryListener in interface IMap<K,V>
Parameters:
listener - entry listener
predicate - predicate for filtering entries
key - key to listen
includeValue - true if EntryEvent should contain the value.
Returns:
A UUID.randomUUID().toString() which is used as a key to remove the listener.

addEntryListener

public String addEntryListener(EntryListener listener,
                               boolean includeValue)
Description copied from interface: IMap
Adds an entry listener for this map. Listener will get notified for all map add/remove/update/evict events.

Specified by:
addEntryListener in interface IMap<K,V>
Parameters:
listener - the added entry listener for this map
includeValue - true if EntryEvent should contain the value.
Returns:
A UUID.randomUUID().toString() which is used as a key to remove the listener.

addEntryListener

public String addEntryListener(EntryListener<K,V> listener,
                               K key,
                               boolean includeValue)
Description copied from interface: IMap
Adds the specified entry listener for the specified key. The listener will get notified for all add/remove/update/evict events of the specified key only.

Warning:

This method uses hashCode and equals of binary form of the key, not the actual implementations of hashCode and equals defined in key's class.

Specified by:
addEntryListener in interface IMap<K,V>
Parameters:
listener - specified entry listener
key - key to listen
includeValue - true if EntryEvent should contain the value.
Returns:
A UUID.randomUUID().toString() which is used as a key to remove the listener.

addEntryListener

public String addEntryListener(EntryListener<K,V> listener,
                               Predicate<K,V> predicate,
                               K key,
                               boolean includeValue)
Description copied from interface: IMap
Adds an continuous entry listener for this map. Listener will get notified for map add/remove/update/evict events filtered by given predicate.

Specified by:
addEntryListener in interface IMap<K,V>
Parameters:
listener - the continuous entry listener for this map
predicate - predicate for filtering entries
key - key to listen
includeValue - true if EntryEvent should contain the value.
Returns:
A UUID.randomUUID().toString() which is used as a key to remove the listener.

addEntryListener

public String addEntryListener(EntryListener<K,V> listener,
                               Predicate<K,V> predicate,
                               boolean includeValue)
Description copied from interface: IMap
Adds an continuous entry listener for this map. Listener will get notified for map add/remove/update/evict events filtered by given predicate.

Specified by:
addEntryListener in interface IMap<K,V>
Parameters:
listener - the added continuous entry listener for this map
predicate - predicate for filtering entries
includeValue - true if EntryEvent should contain the value.
Returns:
A UUID.randomUUID().toString() which is used as a key to remove the listener.

removeEntryListener

public boolean removeEntryListener(String id)
Description copied from interface: IMap
Removes the specified entry listener Returns silently if there is no such listener added before.

Specified by:
removeEntryListener in interface IMap<K,V>
Parameters:
id - id of registered listener
Returns:
true if registration is removed, false otherwise

getEntryView

public EntryView<K,V> getEntryView(K key)
Description copied from interface: IMap
Returns the EntryView for the specified key.

Warning:

This method returns a clone of original mapping, modifying the returned value does not change the actual value in the map. One should put modified value back to make changes visible to all nodes.

Warning-2:

This method uses hashCode and equals of binary form of the key, not the actual implementations of hashCode and equals defined in key's class.

Specified by:
getEntryView in interface IMap<K,V>
Parameters:
key - the key of the entry
Returns:
EntryView of the specified key
See Also:
EntryView

evict

public boolean evict(Object key)
Description copied from interface: IMap
Evicts the specified key from this map. If a MapStore is defined for this map, then the entry is not deleted from the underlying MapStore, evict only removes the entry from the memory.

Warning:

This method uses hashCode and equals of binary form of the key, not the actual implementations of hashCode and equals defined in key's class.

Specified by:
evict in interface IMap<K,V>
Parameters:
key - the specified key to evict from this map
Returns:
true if the key is evicted, false otherwise.

evictAll

public void evictAll()
Description copied from interface: IMap
Evicts all keys from this map except locked ones.

If a MapStore is defined for this map, deleteAll is not called by this method. If you do want to deleteAll to be called use the IMap.clear() method.

The EVICT_ALL event is fired for any registered listeners. See EntryListener.mapEvicted(MapEvent) .

Specified by:
evictAll in interface IMap<K,V>
See Also:
IMap.clear()

loadAll

public void loadAll(boolean replaceExistingValues)
Description copied from interface: IMap
Loads all keys into the store. This is a batch load operation so that an implementation can optimize the multiple loads.

Specified by:
loadAll in interface IMap<K,V>
Parameters:
replaceExistingValues - when true existing values in the Map will be replaced by those loaded from the MapLoader void loadAll(boolean replaceExistingValues));

loadAll

public void loadAll(Set<K> keys,
                    boolean replaceExistingValues)
Description copied from interface: IMap
Loads given keys. This is a batch load operation so that an implementation can optimize the multiple loads.

Specified by:
loadAll in interface IMap<K,V>
Parameters:
keys - keys of the values entries to load
replaceExistingValues - when true existing values in the Map will be replaced by those loaded from the MapLoader

clear

public void clear()
This method clears the map and deletaAll on MapStore which if connected to a database, will delete the records from that database.

If you wish to clear the map only without calling deleteAll, use

Specified by:
clear in interface IMap<K,V>
Specified by:
clear in interface Map<K,V>
See Also:
clearMapOnly()

clearMapOnly

public void clearMapOnly()
This method clears the map.It does not invoke deleteAll on any associated MapStore.

See Also:
clear()

keySet

public Set<K> keySet()
Description copied from interface: IMap
Returns a set clone of the keys contained in this map. The set is NOT backed by the map, so changes to the map are NOT reflected in the set, and vice-versa.

Specified by:
keySet in interface IMap<K,V>
Specified by:
keySet in interface Map<K,V>
Returns:
a set clone of the keys contained in this map

values

public Collection<V> values()
Description copied from interface: IMap
Returns a collection clone of the values contained in this map. The collection is NOT backed by the map, so changes to the map are NOT reflected in the collection, and vice-versa.

Specified by:
values in interface IMap<K,V>
Specified by:
values in interface Map<K,V>
Returns:
a collection clone of the values contained in this map

entrySet

public Set entrySet()
Description copied from interface: IMap
Returns a Set clone of the mappings contained in this map. The set is NOT backed by the map, so changes to the map are NOT reflected in the set, and vice-versa.

Specified by:
entrySet in interface IMap<K,V>
Specified by:
entrySet in interface Map<K,V>
Returns:
a set clone of the keys mappings in this map

keySet

public Set<K> keySet(Predicate predicate)
Description copied from interface: IMap
Queries the map based on the specified predicate and returns the keys of matching entries.

Specified predicate runs on all members in parallel.

Warning:

The set is NOT backed by the map, so changes to the map are NOT reflected in the set, and vice-versa.

Specified by:
keySet in interface IMap<K,V>
Parameters:
predicate - specified query criteria
Returns:
result key set of the query

entrySet

public Set entrySet(Predicate predicate)
Description copied from interface: IMap
Queries the map based on the specified predicate and returns the matching entries.

Specified predicate runs on all members in parallel.

Warning:

The set is NOT backed by the map, so changes to the map are NOT reflected in the set, and vice-versa.

Specified by:
entrySet in interface IMap<K,V>
Parameters:
predicate - specified query criteria
Returns:
result entry set of the query

values

public Collection<V> values(Predicate predicate)
Description copied from interface: IMap
Queries the map based on the specified predicate and returns the values of matching entries.

Specified predicate runs on all members in parallel.

Warning:

The collection is NOT backed by the map, so changes to the map are NOT reflected in the collection, and vice-versa.

Specified by:
values in interface IMap<K,V>
Parameters:
predicate - specified query criteria
Returns:
result value collection of the query

localKeySet

public Set<K> localKeySet()
Description copied from interface: IMap
Returns the locally owned set of keys.

Each key in this map is owned and managed by a specific member in the cluster.

Note that ownership of these keys might change over time so that key ownerships can be almost evenly distributed in the cluster.

Warning:

The set is NOT backed by the map, so changes to the map are NOT reflected in the set, and vice-versa.

Specified by:
localKeySet in interface IMap<K,V>
Returns:
locally owned keys.

localKeySet

public Set<K> localKeySet(Predicate predicate)
Description copied from interface: IMap
Returns the keys of matching locally owned entries.

Each key in this map is owned and managed by a specific member in the cluster.

Note that ownership of these keys might change over time so that key ownerships can be almost evenly distributed in the cluster.

Warning:

The set is NOT backed by the map, so changes to the map are NOT reflected in the set, and vice-versa.

Specified by:
localKeySet in interface IMap<K,V>
Parameters:
predicate - specified query criteria
Returns:
keys of matching locally owned entries.

executeOnKey

public Object executeOnKey(K key,
                           EntryProcessor entryProcessor)
Description copied from interface: IMap
Applies the user defined EntryProcessor to the entry mapped by the key. Returns the the object which is result of the process() method of EntryProcessor.

Specified by:
executeOnKey in interface IMap<K,V>
Returns:
result of entry process.

executeOnKeys

public Map<K,Object> executeOnKeys(Set<K> keys,
                                   EntryProcessor entryProcessor)
Description copied from interface: IMap
Applies the user defined EntryProcessor to the entries mapped by the collection of keys. the results mapped by each key in the collection.

Specified by:
executeOnKeys in interface IMap<K,V>
Returns:
result of entry process.

submitToKey

public void submitToKey(K key,
                        EntryProcessor entryProcessor,
                        ExecutionCallback callback)
Description copied from interface: IMap
Applies the user defined EntryProcessor to the entry mapped by the key with specified ExecutionCallback to listen event status and returns immediately.

Specified by:
submitToKey in interface IMap<K,V>
Parameters:
key - key to be processed
entryProcessor - processor to process the key
callback - to listen whether operation is finished or not

submitToKey

public ICompletableFuture submitToKey(K key,
                                      EntryProcessor entryProcessor)
Description copied from interface: IMap
Applies the user defined EntryProcessor to the entry mapped by the key. Returns immediately with a Future representing that task.

EntryProcessor is not cancellable, so calling Future.cancel() method won't cancel the operation of EntryProcessor.

Specified by:
submitToKey in interface IMap<K,V>
Parameters:
key - key to be processed
entryProcessor - processor to process the key
Returns:
Future from which the result of the operation can be retrieved.
See Also:
Future

aggregate

public <SuppliedValue,Result> Result aggregate(Supplier<K,V,SuppliedValue> supplier,
                                               Aggregation<K,SuppliedValue,Result> aggregation)
Description copied from interface: IMap
Executes a predefined aggregation on the maps data set. The Supplier is used to either select or to select and extract a (sub-)value. A predefined set of aggregations can be found in Aggregations.

Specified by:
aggregate in interface IMap<K,V>
Type Parameters:
SuppliedValue - the final type emitted from the supplier
Result - the resulting aggregation value type
Parameters:
supplier - the supplier to select and / or extract a (sub-)value from the map
aggregation - the aggregation that is being executed against the map
Returns:
the aggregated value

aggregate

public <SuppliedValue,Result> Result aggregate(Supplier<K,V,SuppliedValue> supplier,
                                               Aggregation<K,SuppliedValue,Result> aggregation,
                                               JobTracker jobTracker)
Description copied from interface: IMap
Executes a predefined aggregation on the maps data set. The Supplier is used to either select or to select and extract a (sub-)value. A predefined set of aggregations can be found in Aggregations.

Specified by:
aggregate in interface IMap<K,V>
Type Parameters:
SuppliedValue - the final type emitted from the supplier
Result - the resulting aggregation value type
Parameters:
supplier - the supplier to select and / or extract a (sub-)value from the map
aggregation - the aggregation that is being executed against the map
jobTracker - the JobTracker instance to execute the aggregation
Returns:
the aggregated value

invoke

protected Object invoke(Operation operation,
                        int partitionId)
                 throws Throwable
Throws:
Throwable

toString

public String toString()
Overrides:
toString in class AbstractDistributedObject<MapService>

initialize

public void initialize()
Specified by:
initialize in interface InitializingObject

getInternal

protected Object getInternal(Data key)

getAsyncInternal

protected ICompletableFuture<Data> getAsyncInternal(Data key)

putInternal

protected Data putInternal(Data key,
                           Data value,
                           long ttl,
                           TimeUnit timeunit)

tryPutInternal

protected boolean tryPutInternal(Data key,
                                 Data value,
                                 long timeout,
                                 TimeUnit timeunit)

putIfAbsentInternal

protected Data putIfAbsentInternal(Data key,
                                   Data value,
                                   long ttl,
                                   TimeUnit timeunit)

putTransientInternal

protected void putTransientInternal(Data key,
                                    Data value,
                                    long ttl,
                                    TimeUnit timeunit)

putAsyncInternal

protected ICompletableFuture<Data> putAsyncInternal(Data key,
                                                    Data value,
                                                    long ttl,
                                                    TimeUnit timeunit)

replaceInternal

protected boolean replaceInternal(Data key,
                                  Data expect,
                                  Data update)

replaceInternal

protected Data replaceInternal(Data key,
                               Data value)

setInternal

protected void setInternal(Data key,
                           Data value,
                           long ttl,
                           TimeUnit timeunit)

evictInternal

protected boolean evictInternal(Data key)

evictAllInternal

protected void evictAllInternal()

loadAllInternal

protected void loadAllInternal(List<Data> keys,
                               boolean replaceExistingValues)
Maps keys to corresponding partitions and sends operations to them.

Parameters:
keys -
replaceExistingValues -

removeInternal

protected Data removeInternal(Data key)

deleteInternal

protected void deleteInternal(Data key)

removeInternal

protected boolean removeInternal(Data key,
                                 Data value)

tryRemoveInternal

protected boolean tryRemoveInternal(Data key,
                                    long timeout,
                                    TimeUnit timeunit)

removeAsyncInternal

protected ICompletableFuture<Data> removeAsyncInternal(Data key)

containsKeyInternal

protected boolean containsKeyInternal(Data key)

waitUntilLoaded

public void waitUntilLoaded()

size

public int size()

containsValueInternal

public boolean containsValueInternal(Data dataValue)

isEmpty

public boolean isEmpty()

getAllObjectInternal

protected Map<Object,Object> getAllObjectInternal(Set<Data> keys)

putAllInternal

protected void putAllInternal(Map<? extends Object,? extends Object> entries)

flush

public void flush()

clearInternal

public void clearInternal()

addMapInterceptorInternal

public String addMapInterceptorInternal(MapInterceptor interceptor)

removeMapInterceptorInternal

public void removeMapInterceptorInternal(String id)

addLocalEntryListener

public String addLocalEntryListener(EntryListener listener)

addLocalEntryListenerInternal

public String addLocalEntryListenerInternal(EntryListener listener,
                                            Predicate predicate,
                                            Data key,
                                            boolean includeValue)

addEntryListenerInternal

protected String addEntryListenerInternal(EntryListener listener,
                                          Data key,
                                          boolean includeValue)

addEntryListenerInternal

protected String addEntryListenerInternal(EntryListener listener,
                                          Predicate predicate,
                                          Data key,
                                          boolean includeValue)

removeEntryListenerInternal

protected boolean removeEntryListenerInternal(String id)

getEntryViewInternal

protected EntryView getEntryViewInternal(Data key)

executeOnKeyInternal

public Data executeOnKeyInternal(Data key,
                                 EntryProcessor entryProcessor)

executeOnKeysInternal

public Map executeOnKeysInternal(Set<Data> keys,
                                 EntryProcessor entryProcessor)

executeOnKeyInternal

public ICompletableFuture executeOnKeyInternal(Data key,
                                               EntryProcessor entryProcessor,
                                               ExecutionCallback callback)

executeOnEntries

public Map executeOnEntries(EntryProcessor entryProcessor)
IMap.executeOnEntries(EntryProcessor)


executeOnEntries

public Map executeOnEntries(EntryProcessor entryProcessor,
                            Predicate predicate)
IMap.executeOnEntries(EntryProcessor, Predicate)


toObject

protected Object toObject(Object obj)

toData

protected Data toData(Object obj)

toData

protected Data toData(Object o,
                      PartitioningStrategy partitioningStrategy)

queryLocal

protected Set queryLocal(Predicate predicate,
                         IterationType iterationType,
                         boolean dataResult)

query

protected Set query(Predicate predicate,
                    IterationType iterationType,
                    boolean dataResult)

addIndex

public void addIndex(String attribute,
                     boolean ordered)

getLocalMapStats

public LocalMapStats getLocalMapStats()

getTimeInMillis

protected long getTimeInMillis(long time,
                               TimeUnit timeunit)

getMapStore

protected MapStore getMapStore()

getName

public final String getName()
Description copied from interface: DistributedObject
Returns the unique name for this DistributedObject. The returned value will never be null.

Specified by:
getName in interface DistributedObject
Returns:
the unique name for this object.

getServiceName

public final String getServiceName()
Description copied from interface: DistributedObject
Returns the service name for this object.

Specified by:
getServiceName in interface DistributedObject
Specified by:
getServiceName in class AbstractDistributedObject<MapService>
Returns:
the service name for this object.


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