Class SimpleMapServiceImpl<K,V>
- java.lang.Object
-
- org.apache.ignite.examples.servicegrid.SimpleMapServiceImpl<K,V>
-
- All Implemented Interfaces:
java.io.Serializable,SimpleMapService<K,V>,Service
public class SimpleMapServiceImpl<K,V> extends java.lang.Object implements Service, SimpleMapService<K,V>
Simple service which utilizes Ignite cache as a mechanism to provide distributedSimpleMapServicefunctionality.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SimpleMapServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancel()voidclear()Clears map.voidexecute()Vget(K key)Gets value based on key.voidinit()voidput(K key, V val)Puts key-value pair into map.intsize()
-
-
-
Method Detail
-
put
public void put(K key, V val)
Puts key-value pair into map.- Specified by:
putin interfaceSimpleMapService<K,V>- Parameters:
key- Key.val- Value.
-
get
public V get(K key)
Gets value based on key.- Specified by:
getin interfaceSimpleMapService<K,V>- Parameters:
key- Key.- Returns:
- Value.
-
clear
public void clear()
Clears map.- Specified by:
clearin interfaceSimpleMapService<K,V>
-
size
public int size()
- Specified by:
sizein interfaceSimpleMapService<K,V>- Returns:
- Map size.
-
-