- java.lang.Object
-
- com.rabbitmq.jms.client.Completion
-
public class Completion extends java.lang.ObjectUsed to signal completion of an asynchronous operation.
-
-
Constructor Summary
Constructors Constructor Description Completion()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisComplete()Non-blocking snapshot test for completion.voidsetComplete()Signal completion.voidwaitUntilComplete()Wait (forever) until completion is signalled.voidwaitUntilComplete(long timeout, java.util.concurrent.TimeUnit unit)Wait for a time limit until completion is signalled.voidwaitUntilComplete(TimeTracker tt)Wait for a time limit until completion is signalled.
-
-
-
Method Detail
-
setComplete
public void setComplete()
Signal completion.
-
isComplete
public boolean isComplete()
Non-blocking snapshot test for completion.- Returns:
trueif this operation has completed,falseotherwise
-
waitUntilComplete
public void waitUntilComplete() throws java.lang.InterruptedExceptionWait (forever) until completion is signalled.- Throws:
java.lang.InterruptedException- if thread is interrupted while waiting.
-
waitUntilComplete
public void waitUntilComplete(long timeout, java.util.concurrent.TimeUnit unit) throws java.util.concurrent.TimeoutException, java.lang.InterruptedExceptionWait for a time limit until completion is signalled. Returns normally if completion is signalled before timeout or interruption.- Parameters:
timeout- time to wait (in units).unit- units of time for timeout.- Throws:
java.util.concurrent.TimeoutException- if timed out before completion is signalled.java.lang.InterruptedException- if thread is interrupted while waiting.
-
waitUntilComplete
public void waitUntilComplete(TimeTracker tt) throws java.util.concurrent.TimeoutException, java.lang.InterruptedException
Wait for a time limit until completion is signalled. Returns normally if completion is signalled before timeout or interruption.- Parameters:
tt- time tracker.- Throws:
java.util.concurrent.TimeoutException- if timed out before completion is signalled.java.lang.InterruptedException- if thread is interrupted while waiting.
-
-