Package org.exoplatform.services.ispn
Class AbstractMapper<KIn,VIn,KOut,VOut>
- java.lang.Object
-
- org.exoplatform.services.ispn.AbstractMapper<KIn,VIn,KOut,VOut>
-
- All Implemented Interfaces:
Serializable,org.infinispan.distexec.mapreduce.Mapper<KIn,VIn,KOut,VOut>
- Direct Known Subclasses:
DistributedExoCache.ClearCacheMapper,DistributedExoCache.GetCachedObjectsMapper,DistributedExoCache.GetEntriesMapper,DistributedExoCache.GetSizeMapper
public abstract class AbstractMapper<KIn,VIn,KOut,VOut> extends Object implements org.infinispan.distexec.mapreduce.Mapper<KIn,VIn,KOut,VOut>
The main class of all the mappers.- Version:
- $Id$
- Author:
- Nicolas Filotto
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractMapper()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void_map(KIn key, VIn value, org.infinispan.distexec.mapreduce.Collector<KOut,VOut> collector)This method is in fact an internal mapping, it will be called by the map method in case the given key matches with the contextprotected abstract booleanisValid(KIn key)Indicates if the given key matches with the current context, indeed as the cache instances are shared it is needed to check each key to know if it is part of the targeted scope or not.voidmap(KIn key, VIn value, org.infinispan.distexec.mapreduce.Collector<KOut,VOut> collector)
-
-
-
Method Detail
-
map
public void map(KIn key, VIn value, org.infinispan.distexec.mapreduce.Collector<KOut,VOut> collector)
-
_map
protected abstract void _map(KIn key, VIn value, org.infinispan.distexec.mapreduce.Collector<KOut,VOut> collector)
This method is in fact an internal mapping, it will be called by the map method in case the given key matches with the context
-
isValid
protected abstract boolean isValid(KIn key)
Indicates if the given key matches with the current context, indeed as the cache instances are shared it is needed to check each key to know if it is part of the targeted scope or not.- Parameters:
key- the key to check- Returns:
trueif the key matches with the scope,falseotherwise.
-
-