com.cumulocity.sdk.client.devicecontrol.autopoll
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
| Methods inherited from class java.util.concurrent.LinkedBlockingQueue |
clear, drainTo, drainTo, iterator, offer, offer, peek, poll, poll, put, remainingCapacity, remove, size, take, toArray, toArray, toString |
OperationsQueue
public OperationsQueue()
getInstance
public static OperationsQueue getInstance()
add
public boolean add(OperationRepresentation arg0)
- Specified by:
add in interface Collection<OperationRepresentation>- Specified by:
add in interface BlockingQueue<OperationRepresentation>- Specified by:
add in interface Queue<OperationRepresentation>- Overrides:
add in class AbstractQueue<OperationRepresentation>
addAll
public boolean addAll(Collection<? extends OperationRepresentation> arg0)
- Specified by:
addAll in interface Collection<OperationRepresentation>- Overrides:
addAll in class AbstractQueue<OperationRepresentation>
contains
public boolean contains(Object arg0)
- Specified by:
contains in interface Collection<OperationRepresentation>- Specified by:
contains in interface BlockingQueue<OperationRepresentation>- Overrides:
contains in class AbstractCollection<OperationRepresentation>
Copyright © 2013 (C) Cumulocity GmbH. All Rights Reserved.