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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
add
(OperationRepresentation arg0) boolean
addAll
(Collection<? extends OperationRepresentation> arg0) boolean
static OperationsQueue
Methods 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, toString
Methods inherited from class java.util.AbstractQueue
element, remove
Methods inherited from class java.util.AbstractCollection
containsAll, isEmpty
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
containsAll, equals, hashCode, isEmpty, parallelStream, stream, toArray
-
Constructor Details
-
OperationsQueue
public OperationsQueue()
-
-
Method Details
-
getInstance
-
add
- Specified by:
add
in interfaceBlockingQueue<OperationRepresentation>
- Specified by:
add
in interfaceCollection<OperationRepresentation>
- Specified by:
add
in interfaceQueue<OperationRepresentation>
- Overrides:
add
in classAbstractQueue<OperationRepresentation>
-
addAll
- Specified by:
addAll
in interfaceCollection<OperationRepresentation>
- Overrides:
addAll
in classAbstractQueue<OperationRepresentation>
-
contains
- Specified by:
contains
in interfaceBlockingQueue<OperationRepresentation>
- Specified by:
contains
in interfaceCollection<OperationRepresentation>
- Overrides:
contains
in classLinkedBlockingQueue<OperationRepresentation>
-