Class BaseConditionAwaiter

  • All Implemented Interfaces:
    java.lang.AutoCloseable
    Direct Known Subclasses:
    TaskCommentsAwaiter

    public abstract class BaseConditionAwaiter
    extends java.lang.Object
    implements java.lang.AutoCloseable
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static long DEFAULT_TIMEOUT  
      protected boolean failed  
      protected java.util.concurrent.CountDownLatch latch  
      protected long timeout  
    • Constructor Summary

      Constructors 
      Constructor Description
      BaseConditionAwaiter​(com.xebialabs.xlrelease.events.XLReleaseEventBus eventBus, long timeout)  
      BaseConditionAwaiter​(com.xebialabs.xlrelease.events.XLReleaseEventBus eventBus, long timeout, int latchCount)  
    • Field Detail

      • failed

        protected boolean failed
      • latch

        protected java.util.concurrent.CountDownLatch latch
      • timeout

        protected long timeout
    • Constructor Detail

      • BaseConditionAwaiter

        public BaseConditionAwaiter​(com.xebialabs.xlrelease.events.XLReleaseEventBus eventBus,
                                    long timeout)
      • BaseConditionAwaiter

        public BaseConditionAwaiter​(com.xebialabs.xlrelease.events.XLReleaseEventBus eventBus,
                                    long timeout,
                                    int latchCount)
    • Method Detail

      • startListening

        public void startListening()
      • await

        public void await()
                   throws java.lang.InterruptedException,
                          java.util.concurrent.TimeoutException
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.TimeoutException
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
      • getErrorMessage

        protected abstract java.lang.String getErrorMessage()
      • getErrorCause

        protected java.lang.Throwable getErrorCause()