Constructor
# new DistributedQueue(key, cache, options, cls)
Name | Type | Description |
---|---|---|
key |
String | key |
cache |
Cache | cache instance |
options |
WriteThruOptions | indicates options for writethruoptions |
cls |
Number | indicates type of json data |
Methods
# (async) add(item) → {boolean}
Adds an object to the end of the Queue.
Name | Type | Description |
---|---|---|
item |
Object | the element to add |
true
- Type
- boolean
# (async) addChangeListener(dataTypeDataChangeListener, eventType, dataFilter)
Name | Type | Description |
---|---|---|
dataTypeDataChangeListener |
DataStructureDataChangeListener | callback method to be called |
eventType |
Array.<EventType> | indicates eventtype on which callback method will be called |
dataFilter |
DataTypeEventDataFilter | indicates type of data that will be recieved |
# (async) clear()
Removes all objects from the Queue.
# (async) contains(value) → {Boolean}
Determines whether the element exists in Queue.
Name | Type | Description |
---|---|---|
value |
Object | value to be found |
- Type
- Boolean
# (async) copyTo(array, arrayIndex)
Copies the Queue elements to the specified array, starting at the specified index.
Name | Type | Description |
---|---|---|
array |
Array | indicates the list of elements that need to be copied |
arrayIndex |
Number | indicates starting point of array from where copying will get start. |
# (async) element() → {Object}
Retrieves, but does not remove, the head of this queue. This method differs from peek only in that it throws an exception if this queue is empty.
the head of this queue
- Type
- Object
# isEmpty()
checks if the queue is empty
boolean
# (async) iterator() → {Iterator.<T>}
returns iterator over Queue
- Type
- Iterator.<T>
# (async) offer(item) → {boolean}
Inserts the specified element into this queue if it is possible to do so immediately without violating capacity restrictions. When using a capacity-restricted queue, this method is generally preferable to add, which can fail to insert an element only by throwing an exception.
Name | Type | Description |
---|---|---|
item |
Object | the element to add |
true
- Type
- boolean
# (async) peek() → {Object}
Retrieves, but does not remove, the head of this queue, or returns null if this queue is empty.
the head of this queue, or null if this queue is empty
- Type
- Object
# (async) poll()
the head of this queue, or null if this queue is empty
# (async) remove() → {Object}
Removes and returns the object at the beginning of the Queue.
the head of this queue
- Type
- Object
# (async) removeChangeListener(dataTypeDataChangeListener, eventType)
Name | Type | Description |
---|---|---|
dataTypeDataChangeListener |
DataStructureDataChangeListener | callback method to be called |
eventType |
Array.<EventType> | indicates eventtype on which callback method will be called |
# size()
returns the number of elements present in queue
number
# (async) toArray(a)
Name | Type | Default | Description |
---|---|---|---|
a |
Array | null | the array into which the elements of this collection are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose. |
an array containing all of the elements in this collection
# toString()
returns the stringified version of class name
string