Class NoOpExecutor

  • All Implemented Interfaces:
    java.util.concurrent.Executor

    public class NoOpExecutor
    extends java.lang.Object
    implements java.util.concurrent.Executor
    Simple executor implementation that ignores any requests to execute a task. This can be used in the case where an executor should be returned or provided but the state of the application or object is such that it will not process any new work and the result of ignoring the request does not impact the application.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.concurrent.Executor INSTANCE  
    • Constructor Summary

      Constructors 
      Constructor Description
      NoOpExecutor()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute​(java.lang.Runnable command)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • INSTANCE

        public static final java.util.concurrent.Executor INSTANCE
    • Constructor Detail

      • NoOpExecutor

        public NoOpExecutor()
    • Method Detail

      • execute

        public void execute​(java.lang.Runnable command)
        Specified by:
        execute in interface java.util.concurrent.Executor