Class OperationsQueue
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractQueue<E>
java.util.concurrent.LinkedBlockingQueue<OperationRepresentation>
com.cumulocity.sdk.client.devicecontrol.autopoll.OperationsQueue
- All Implemented Interfaces:
Serializable,Iterable<OperationRepresentation>,Collection<OperationRepresentation>,BlockingQueue<OperationRepresentation>,Queue<OperationRepresentation>
This queue is handling operations to be processed. It's based on LinkedBlockingQueue implementation, but
it assures that all operations are unique (unique means all operations in queue have unique ids). Every
time new operation is added to queue, it is checked that operation with the same id doesn't exists in queue
(if it does, new item is not queued).
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(OperationRepresentation arg0) booleanaddAll(Collection<? extends OperationRepresentation> arg0) booleanstatic OperationsQueueMethods inherited from class java.util.concurrent.LinkedBlockingQueue
clear, drainTo, drainTo, forEach, iterator, offer, offer, peek, poll, poll, put, remainingCapacity, remove, removeAll, removeIf, retainAll, size, spliterator, take, toArray, toArray, toStringMethods inherited from class java.util.AbstractQueue
element, removeMethods inherited from class java.util.AbstractCollection
containsAll, isEmptyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
containsAll, equals, hashCode, isEmpty, parallelStream, stream, toArray
-
Constructor Details
-
OperationsQueue
public OperationsQueue()
-
-
Method Details
-
getInstance
-
add
- Specified by:
addin interfaceBlockingQueue<OperationRepresentation>- Specified by:
addin interfaceCollection<OperationRepresentation>- Specified by:
addin interfaceQueue<OperationRepresentation>- Overrides:
addin classAbstractQueue<OperationRepresentation>
-
addAll
- Specified by:
addAllin interfaceCollection<OperationRepresentation>- Overrides:
addAllin classAbstractQueue<OperationRepresentation>
-
contains
- Specified by:
containsin interfaceBlockingQueue<OperationRepresentation>- Specified by:
containsin interfaceCollection<OperationRepresentation>- Overrides:
containsin classLinkedBlockingQueue<OperationRepresentation>
-