Package org.symphonyoss.s2.canon.runtime
Class EntityConsumer<P,E extends IEntity,C extends org.symphonyoss.s2.fugue.pipeline.IThreadSafeConsumer<E>>
- java.lang.Object
-
- org.symphonyoss.s2.canon.runtime.EntityConsumer<P,E,C>
-
- All Implemented Interfaces:
AutoCloseable,org.symphonyoss.s2.fugue.pipeline.IConsumer<P>,org.symphonyoss.s2.fugue.pipeline.IRetryableConsumer<P>,org.symphonyoss.s2.fugue.pipeline.IThreadSafeConsumer<P>,org.symphonyoss.s2.fugue.pipeline.IThreadSafeRetryableConsumer<P>
- Direct Known Subclasses:
ImmutableByteArrayEntityConsumer,StringEntityConsumer
public abstract class EntityConsumer<P,E extends IEntity,C extends org.symphonyoss.s2.fugue.pipeline.IThreadSafeConsumer<E>> extends Object implements org.symphonyoss.s2.fugue.pipeline.IThreadSafeConsumer<P>
-
-
Constructor Summary
Constructors Constructor Description EntityConsumer(IModelRegistry modelRegistry, Class<E> entityType, C consumer, org.symphonyoss.s2.fugue.pipeline.IThreadSafeErrorConsumer<P> invalidMessageConsumer)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclose()voidconsume(P item, org.symphonyoss.s2.fugue.core.trace.ITraceContext trace)protected abstract ReadergetReader(P item)
-
-
-
Constructor Detail
-
EntityConsumer
public EntityConsumer(IModelRegistry modelRegistry, Class<E> entityType, C consumer, org.symphonyoss.s2.fugue.pipeline.IThreadSafeErrorConsumer<P> invalidMessageConsumer)
-
-
Method Detail
-
consume
public void consume(P item, org.symphonyoss.s2.fugue.core.trace.ITraceContext trace)
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceorg.symphonyoss.s2.fugue.pipeline.IRetryableConsumer<P>
-
-