Package org.microspace.event
Class MergeMap<T>
- java.lang.Object
-
- org.microspace.event.MergeMap<T>
-
public class MergeMap<T> extends Object
-
-
Constructor Summary
Constructors Constructor Description MergeMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clear all maps.TakeTask<T,?>get(Class<?> cl, Object key)Get the latest task.TakeTask<T,?>get(TakeTask<T,?> task)Get the latest task.TakeTask<T,?>put(TakeTask<T,?> task)Store the latest task.TakeTask<T,?>remove(Class<?> cl, Object key)Remove the latest task.TakeTask<T,?>remove(TakeTask<T,?> task)Remove the latest task.intsize()Query the latest images.
-
-
-
Method Detail
-
get
public TakeTask<T,?> get(TakeTask<T,?> task)
Get the latest task.- Parameters:
task- The task with a messageId.- Returns:
- The latest task.
-
get
public TakeTask<T,?> get(Class<?> cl, Object key)
Get the latest task.- Parameters:
cl- The message class.key- The messageId- Returns:
- The latest task.
-
remove
public TakeTask<T,?> remove(TakeTask<T,?> task)
Remove the latest task.- Parameters:
task- The pattern with a messageId.- Returns:
- The latest task.
-
remove
public TakeTask<T,?> remove(Class<?> cl, Object key)
Remove the latest task.- Parameters:
cl- The message class.key- The messageId- Returns:
- The latest task.
-
put
public TakeTask<T,?> put(TakeTask<T,?> task)
Store the latest task.- Parameters:
task- The task that will overwrite the latest task.- Returns:
- The old task.
-
size
public int size()
Query the latest images.- Returns:
- The full size of this map.
-
clear
public void clear()
Clear all maps.
-
-