Class SilentHistoryMode

java.lang.Object
ch.tocco.nice2.persist.core.spi.exec.AbstractModeWrapper
ch.tocco.nice2.persist.history.impl.SilentHistoryMode
All Implemented Interfaces:
ModeWrapper

@Component public class SilentHistoryMode extends AbstractModeWrapper
  • Constructor Details

    • SilentHistoryMode

      public SilentHistoryMode()
  • Method Details

    • wrap

      public <A, T> PersistTask<A,T> wrap(PersistTask<A,T> task, Mode<?> mode)
      Description copied from interface: ModeWrapper
      Returns a task conforming to the given mode. Gives the opportunity to wrap the given task (or create a complete new one) before executing it.

      The usual use case is this: If some condition holds inside the given mode, a new task is returned wrapping the given task with additional behaviour. If the condition does not hold, the task argument is returned.

    • getKey

      protected Mode.Key<?> getKey()
      Description copied from class: AbstractModeWrapper
      Override this to return the Mode.Key that this wrapper applies to. If null is returned, this mode is contributed with Priority.NORMAL.
      Overrides:
      getKey in class AbstractModeWrapper