public class GridCacheQueueProxy<T> extends Object implements IgniteQueue<T>, Externalizable
| Constructor and Description |
|---|
GridCacheQueueProxy()
Required by
Externalizable. |
GridCacheQueueProxy(GridCacheContext cctx,
GridCacheQueueAdapter<T> delegate) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T item) |
boolean |
addAll(Collection<? extends T> items) |
<R> R |
affinityCall(IgniteCallable<R> job)
Executes given job on collocated queue on the node where the queue is located
(a.k.a. affinity co-location).
|
void |
affinityRun(IgniteRunnable job)
Executes given job on collocated queue on the node where the queue is located
(a.k.a. affinity co-location).
|
boolean |
bounded()
Returns
true if this queue is bounded. |
int |
capacity()
Gets maximum number of elements of the queue.
|
void |
clear() |
void |
clear(int batchSize)
Removes all of the elements from this queue.
|
void |
close()
Removes this queue.
|
boolean |
collocated()
Returns
true if this queue can be kept on the one node only. |
boolean |
contains(Object item) |
boolean |
containsAll(Collection<?> items) |
GridCacheQueueAdapter<T> |
delegate() |
int |
drainTo(Collection<? super T> c) |
int |
drainTo(Collection<? super T> c,
int maxElements) |
T |
element() |
boolean |
equals(Object o) |
int |
groupId() |
String |
groupName() |
int |
hashCode() |
boolean |
isEmpty() |
Iterator<T> |
iterator() |
String |
name()
Gets queue name.
|
boolean |
offer(T item) |
boolean |
offer(T item,
long timeout,
TimeUnit unit) |
T |
peek() |
T |
poll() |
T |
poll(long timeout,
TimeUnit unit) |
void |
put(T item) |
void |
readExternal(ObjectInput in) |
protected Object |
readResolve()
Reconstructs object on unmarshalling.
|
int |
remainingCapacity() |
T |
remove() |
boolean |
remove(Object item) |
boolean |
removeAll(Collection<?> items) |
boolean |
removed()
Gets status of queue.
|
boolean |
retainAll(Collection<?> items) |
int |
size() |
T |
take() |
Object[] |
toArray() |
<T1> T1[] |
toArray(T1[] a) |
String |
toString() |
<V1> IgniteQueue<V1> |
withKeepBinary()
Returns queue that will operate with binary objects.
|
void |
writeExternal(ObjectOutput out) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitparallelStream, removeIf, spliterator, streampublic GridCacheQueueProxy()
Externalizable.public GridCacheQueueProxy(GridCacheContext cctx, GridCacheQueueAdapter<T> delegate)
cctx - Cache context.delegate - Delegate queue.public GridCacheQueueAdapter<T> delegate()
public boolean add(T item)
add in interface Collection<T>add in interface BlockingQueue<T>add in interface Queue<T>add in interface IgniteQueue<T>public boolean offer(T item)
offer in interface BlockingQueue<T>offer in interface Queue<T>offer in interface IgniteQueue<T>public boolean addAll(Collection<? extends T> items)
addAll in interface Collection<T>addAll in interface IgniteQueue<T>public boolean contains(Object item)
contains in interface Collection<T>contains in interface BlockingQueue<T>contains in interface IgniteQueue<T>public boolean containsAll(Collection<?> items)
containsAll in interface Collection<T>containsAll in interface IgniteQueue<T>public void clear()
clear in interface Collection<T>clear in interface IgniteQueue<T>public boolean remove(Object item)
remove in interface Collection<T>remove in interface BlockingQueue<T>remove in interface IgniteQueue<T>public boolean removeAll(Collection<?> items)
removeAll in interface Collection<T>removeAll in interface IgniteQueue<T>public boolean isEmpty()
isEmpty in interface Collection<T>isEmpty in interface IgniteQueue<T>public Iterator<T> iterator()
iterator in interface Iterable<T>iterator in interface Collection<T>iterator in interface IgniteQueue<T>public Object[] toArray()
toArray in interface Collection<T>toArray in interface IgniteQueue<T>public <T1> T1[] toArray(T1[] a)
toArray in interface Collection<T>toArray in interface IgniteQueue<T>public boolean retainAll(Collection<?> items)
retainAll in interface Collection<T>retainAll in interface IgniteQueue<T>public int size()
size in interface Collection<T>size in interface IgniteQueue<T>@Nullable public T poll()
@Nullable public T peek()
public void clear(int batchSize)
clear in interface IgniteQueue<T>batchSize - Batch size.public int remainingCapacity()
remainingCapacity in interface BlockingQueue<T>public int drainTo(Collection<? super T> c)
drainTo in interface BlockingQueue<T>public int drainTo(Collection<? super T> c, int maxElements)
drainTo in interface BlockingQueue<T>public void put(T item)
put in interface BlockingQueue<T>put in interface IgniteQueue<T>public boolean offer(T item, long timeout, TimeUnit unit)
offer in interface BlockingQueue<T>offer in interface IgniteQueue<T>@Nullable public T take()
take in interface BlockingQueue<T>take in interface IgniteQueue<T>@Nullable public T poll(long timeout, TimeUnit unit)
poll in interface BlockingQueue<T>poll in interface IgniteQueue<T>public void close()
close in interface Closeableclose in interface AutoCloseableclose in interface IgniteQueue<T>public String name()
name in interface IgniteQueue<T>public String groupName()
public int groupId()
public int capacity()
capacity in interface IgniteQueue<T>Integer.MAX_SIZE will return.public boolean bounded()
true if this queue is bounded.bounded in interface IgniteQueue<T>true if this queue is bounded.public boolean collocated()
true if this queue can be kept on the one node only.
Returns false if this queue can be kept on the many nodes.collocated in interface IgniteQueue<T>true if this queue is in collocated mode false otherwise.public boolean removed()
removed in interface IgniteQueue<T>true if queue was removed from cache false otherwise.public void affinityRun(IgniteRunnable job)
This is not supported for non-collocated queues.
affinityRun in interface IgniteQueue<T>job - Job which will be co-located with the queue.public <R> R affinityCall(IgniteCallable<R> job)
This is not supported for non-collocated queues.
affinityCall in interface IgniteQueue<T>job - Job which will be co-located with the queue.public <V1> IgniteQueue<V1> withKeepBinary()
IgniteCache.withKeepBinary() but
for queues.withKeepBinary in interface IgniteQueue<T>public int hashCode()
hashCode in interface Collection<T>hashCode in class Objectpublic boolean equals(Object o)
equals in interface Collection<T>equals in class Objectpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionprotected Object readResolve() throws ObjectStreamException
ObjectStreamException - Thrown in case of unmarshalling error.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.11.0 Release Date : September 11 2021