Class ThreadWatcher
- java.lang.Object
-
- org.jets3t.service.multi.ThreadWatcher
-
- org.jets3t.service.multithread.ThreadWatcher
-
@Deprecated public class ThreadWatcher extends ThreadWatcher
Deprecated.0.8.0 useThreadWatcher
instead.A thread watcher is associated with a multi-threaded S3 operation and contains information about the progress of the operation.As a minimum, this object will contain a count of the total number of threads involved in the operation (via
ThreadWatcher.getThreadCount()
) and the count of threads that have already finished (viaThreadWatcher.getCompletedThreads()
).For operations involving data transfer, such as uploads or downloads, this object may also include a count of the total bytes being transferred (via
ThreadWatcher.getBytesTotal()
) and a count of how many bytes have already been transferred (viaThreadWatcher.getBytesTransferred()
). The availability of this information is indicated by the result ofThreadWatcher.isBytesTransferredInfoAvailable()
.Further data tranfer information may be also available, such as the current transfer rate (via
ThreadWatcher.getBytesPerSecond()
) and an estimate of the time remaining until the transfer is completed (viaThreadWatcher.getTimeRemaining()
). The availability of this information is indicated by the result ofThreadWatcher.isTimeRemainingAvailable()
.It is possible to cancel some S3 operations. If an operation may be cancelled, this object will include a
CancelEventTrigger
(available fromgetCancelEventListener()
) which can be used to trigger a cancellation. Whether the operation can be cancelled is indicated byThreadWatcher.isCancelTaskSupported()
.- Author:
- James Murty
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description CancelEventTrigger
getCancelEventListener()
Deprecated.void
updateThreadsCompletedCount(long completedThreads, CancelEventTrigger cancelEventListener)
Deprecated.-
Methods inherited from class org.jets3t.service.multi.ThreadWatcher
cancelTask, getBytesPerSecond, getBytesTotal, getBytesTransferred, getCompletedThreads, getThreadCount, getTimeRemaining, isBytesTransferredInfoAvailable, isCancelTaskSupported, isTimeRemainingAvailable, updateThreadsCompletedCount, updateThreadsCompletedCount
-
-
-
-
Method Detail
-
updateThreadsCompletedCount
public void updateThreadsCompletedCount(long completedThreads, CancelEventTrigger cancelEventListener)
Deprecated.
-
getCancelEventListener
public CancelEventTrigger getCancelEventListener()
Deprecated.- Overrides:
getCancelEventListener
in classThreadWatcher
- Returns:
- the cancel event trigger associated with an operation, if any.
-
-