|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
KeyIn
- type of key used in the KeyValueSource
ValueIn
- type of value used in the KeyValueSource
KeyOut
- key type for mapped resultsValueOut
- value type for mapped results@Beta public interface LifecycleMapper<KeyIn,ValueIn,KeyOut,ValueOut>
The LifecycleMapper interface is a more sophisticated version of Mapper
normally used for complexer
algorithms with a need of initialization and finalization.
The behavior is the same as for Mapper
but initialize(Context)
is called before calling
Mapper.map(Object, Object, Context)
for the first time to prepare the mapper instance and maybe already
emit some values. After all mapping calls are finished finalized(Context)
is called and here is
also the possibility given to emit additional key-value pairs.
Method Summary | |
---|---|
void |
finalized(Context<KeyOut,ValueOut> context)
This method is called after the Mapper.map(Object, Object, Context) method is executed for every value and
can be used to finalize the internal state of the mapper or to emit a special value. |
void |
initialize(Context<KeyOut,ValueOut> context)
This method is called before the Mapper.map(Object, Object, Context) method is executed for every value and
can be used to initialize the internal state of the mapper or to emit a special value. |
Methods inherited from interface com.hazelcast.mapreduce.Mapper |
---|
map |
Method Detail |
---|
void initialize(Context<KeyOut,ValueOut> context)
Mapper.map(Object, Object, Context)
method is executed for every value and
can be used to initialize the internal state of the mapper or to emit a special value.
context
- Context to be used for emitting valuesvoid finalized(Context<KeyOut,ValueOut> context)
Mapper.map(Object, Object, Context)
method is executed for every value and
can be used to finalize the internal state of the mapper or to emit a special value.
context
- Context to be used for emitting values
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |