-
- All Implemented Interfaces:
-
java.io.Serializable,java.util.Queue,kotlin.collections.Collection,kotlin.collections.Iterable,kotlin.collections.MutableCollection,kotlin.collections.MutableIterable
public final class CommandQueue<T extends Object> extends ConcurrentLinkedQueue<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classCommandQueue.Companion
-
Field Summary
Fields Modifier and Type Field Description private volatile TpendingOperationprivate final Integersize
-
Constructor Summary
Constructors Constructor Description CommandQueue(Handler handler, CommandQueueCallback<T> callbacks, Long operationTimeout)
-
Method Summary
Modifier and Type Method Description final TgetPendingOperation()final UnitsetPendingOperation(T pendingOperation)IntegergetSize()final UnitenqueueCommand(T operation)Adds an operation onto the queue, see the BleOperationTypeclass for more details.final UnitcompletePendingCommand()Finish a pending operation, often called in an Android callback. Unitclear()StringtoString()-
Methods inherited from class live.ditto.transports.ble.CommandQueue
add, addAll, contains, forEach, isEmpty, iterator, offer, peek, poll, remove, removeAll, removeIf, retainAll, spliterator, toArray, toArray -
Methods inherited from class java.util.concurrent.ConcurrentLinkedQueue
element, remove -
Methods inherited from class java.util.AbstractQueue
containsAll -
Methods inherited from class kotlin.collections.MutableCollection
parallelStream, stream, toArray -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
CommandQueue
CommandQueue(Handler handler, CommandQueueCallback<T> callbacks, Long operationTimeout)
-
-
Method Detail
-
getPendingOperation
final T getPendingOperation()
-
setPendingOperation
final Unit setPendingOperation(T pendingOperation)
-
enqueueCommand
@Synchronized() final Unit enqueueCommand(T operation)
Adds an operation onto the queue, see the
BleOperationTypeclass for more details.
-
completePendingCommand
@Synchronized() final Unit completePendingCommand()
Finish a pending operation, often called in an Android callback.
-
clear
@Synchronized() Unit clear()
-
-
-
-