Interface Flushable

All Superinterfaces:
Flushable
All Known Subinterfaces:
ComponentComposite, ComponentComposite.ExtendedComponentComposite<CTX,CON>, Flushable.FlushBuilder<B>
All Known Implementing Classes:
AbstractComponentComposite, AbstractComponentComposite.ExtendedCompositeComponentImpl

public interface Flushable extends Flushable
This mixin might be implemented by a component in order to provide flush facilities. A dedicated interface has been created just extending Java's Flushable interface to lift it onto the component's layer.

ATTENTION: When implementing flush functionality, use this Flushable, though when testing for reset functionality, use Flushable (instanceof)!

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    The Interface FlushBuilder.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    default void
    Flushes the component by calling flush() without you to require catching a IOException.
    default boolean
    Determines whether the implementing instance can safely be flushed.
  • Method Details

    • flush

      void flush() throws IOException
      Specified by:
      flush in interface Flushable
      Throws:
      IOException
    • flushUnchecked

      default void flushUnchecked()
      Flushes the component by calling flush() without you to require catching a IOException.
      Throws:
      org.refcodes.exception.IORuntimeException - encapsulates the aCause and is thrown upon encountering a IOException exception
    • isFlushable

      default boolean isFlushable()
      Determines whether the implementing instance can safely be flushed. When false is returned, then calling flush() would result in an IOException exception to be thrown.
      Returns:
      True in case flush() can be called without throwing an IOException.