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>
public class OperationsQueue extends LinkedBlockingQueue<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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OperationsQueue()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(OperationRepresentation arg0)booleanaddAll(Collection<? extends OperationRepresentation> arg0)booleancontains(Object arg0)static OperationsQueuegetInstance()-
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
-
-
-
-
Method Detail
-
getInstance
public static OperationsQueue getInstance()
-
add
public boolean add(OperationRepresentation arg0)
- Specified by:
addin interfaceBlockingQueue<OperationRepresentation>- Specified by:
addin interfaceCollection<OperationRepresentation>- Specified by:
addin interfaceQueue<OperationRepresentation>- Overrides:
addin classAbstractQueue<OperationRepresentation>
-
addAll
public boolean addAll(Collection<? extends OperationRepresentation> arg0)
- Specified by:
addAllin interfaceCollection<OperationRepresentation>- Overrides:
addAllin classAbstractQueue<OperationRepresentation>
-
contains
public boolean contains(Object arg0)
- Specified by:
containsin interfaceBlockingQueue<OperationRepresentation>- Specified by:
containsin interfaceCollection<OperationRepresentation>- Overrides:
containsin classLinkedBlockingQueue<OperationRepresentation>
-
-