Package org.refcodes.component
Interface Flushable
-
- All Superinterfaces:
java.io.Flushable
- All Known Subinterfaces:
CompositeComponent,CompositeComponent.ExtendedCompositeComponent<CTX,CON>,Flushable.FlushBuilder<B>
- All Known Implementing Classes:
CompositeComponentImpl,CompositeComponentImpl.ExtendedCompositeComponentImpl
public interface Flushable extends java.io.FlushableThis mixin might be implemented by a component in order to provide flush facilities. A dedicated interface has been created just extending Java'sFlushableinterface to lift it onto the component's layer.ATTENTION: When implementing flush functionality, use this
Flushable, though when testing for reset functionality, useFlushable(instanceof)!
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceFlushable.FlushBuilder<B extends Flushable.FlushBuilder<B>>The Interface FlushBuilder.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidflush()default voidflushUnchecked()Flushes the component by callingflush()without you to require catching aOpenException.default booleanisFlushable()Determines whether the implementing instance can safely be flushed.
-
-
-
Method Detail
-
flush
void flush() throws OpenException- Specified by:
flushin interfacejava.io.Flushable- Throws:
OpenException
-
flushUnchecked
default void flushUnchecked()
Flushes the component by callingflush()without you to require catching aOpenException.- Throws:
OpenException.OpenRuntimeException- encapsulates the cause and is thrown upon encountering aOpenExceptionexception
-
isFlushable
default boolean isFlushable()
Determines whether the implementing instance can safely be flushed. When false is returned, then callingflush()would result in anOpenExceptionexception to be thrown.- Returns:
- True in case
flush()can be called without throwing anOpenException.
-
-