Class NoopWriteEventsListener
- All Implemented Interfaces:
FlushStrategy.WriteEventsListener
FlushStrategy.WriteEventsListener
that by default does nothing for all method. This can be used to selectively implement
relevant methods.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
itemWritten
(Object __) For each newFlushStrategy.WriteEventsListener
returned fromFlushStrategy.apply(FlushSender)
, this method will be called once after any item is written to the connection.void
For each newFlushStrategy.WriteEventsListener
returned fromFlushStrategy.apply(FlushSender)
, this method will be called at most once when writes are cancelled.void
For each newFlushStrategy.WriteEventsListener
returned fromFlushStrategy.apply(FlushSender)
, this method will be called at most once before any items are written to the connection.void
For each newFlushStrategy.WriteEventsListener
returned fromFlushStrategy.apply(FlushSender)
, this method will be called at most once when all other items are written to the connection.
-
Constructor Details
-
NoopWriteEventsListener
public NoopWriteEventsListener()
-
-
Method Details
-
writeStarted
public void writeStarted()Description copied from interface:FlushStrategy.WriteEventsListener
For each newFlushStrategy.WriteEventsListener
returned fromFlushStrategy.apply(FlushSender)
, this method will be called at most once before any items are written to the connection.This will be followed by zero or more calls to
FlushStrategy.WriteEventsListener.itemWritten(Object)
and at most one call toFlushStrategy.WriteEventsListener.writeTerminated()
andFlushStrategy.WriteEventsListener.writeCancelled()
or both.- Specified by:
writeStarted
in interfaceFlushStrategy.WriteEventsListener
-
itemWritten
Description copied from interface:FlushStrategy.WriteEventsListener
For each newFlushStrategy.WriteEventsListener
returned fromFlushStrategy.apply(FlushSender)
, this method will be called once after any item is written to the connection.This will be followed by zero or more calls to this method and at most one call to
FlushStrategy.WriteEventsListener.writeTerminated()
andFlushStrategy.WriteEventsListener.writeCancelled()
or both.FlushStrategy.WriteEventsListener.writeCancelled()
can be called concurrently with this method.- Specified by:
itemWritten
in interfaceFlushStrategy.WriteEventsListener
- Parameters:
__
- Item that was written.
-
writeTerminated
public void writeTerminated()Description copied from interface:FlushStrategy.WriteEventsListener
For each newFlushStrategy.WriteEventsListener
returned fromFlushStrategy.apply(FlushSender)
, this method will be called at most once when all other items are written to the connection.FlushStrategy.WriteEventsListener.writeCancelled()
MAY be called concurrently or after this method.- Specified by:
writeTerminated
in interfaceFlushStrategy.WriteEventsListener
-
writeCancelled
public void writeCancelled()Description copied from interface:FlushStrategy.WriteEventsListener
For each newFlushStrategy.WriteEventsListener
returned fromFlushStrategy.apply(FlushSender)
, this method will be called at most once when writes are cancelled.FlushStrategy.WriteEventsListener.itemWritten(Object)
orFlushStrategy.WriteEventsListener.writeTerminated()
MAY be called concurrently or after this method.- Specified by:
writeCancelled
in interfaceFlushStrategy.WriteEventsListener
-