Class EntityConsumer<P,​E extends IEntity,​C extends org.symphonyoss.s2.fugue.pipeline.IThreadSafeConsumer<E>>

  • 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 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)
        Specified by:
        consume in interface org.symphonyoss.s2.fugue.pipeline.IConsumer<P>
        Specified by:
        consume in interface org.symphonyoss.s2.fugue.pipeline.IRetryableConsumer<P>
        Specified by:
        consume in interface org.symphonyoss.s2.fugue.pipeline.IThreadSafeConsumer<P>
      • getReader

        protected abstract Reader getReader​(P item)
      • close

        public void close()
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface org.symphonyoss.s2.fugue.pipeline.IRetryableConsumer<P>