Package org.redisson.api
Interface RBoundedBlockingQueueAsync<V>
- Type Parameters:
V- the type of elements held in this collection
- All Superinterfaces:
RBlockingQueueAsync<V>,RCollectionAsync<V>,RExpirableAsync,RObjectAsync,RQueueAsync<V>
- All Known Subinterfaces:
RBoundedBlockingQueue<V>
- All Known Implementing Classes:
RedissonBoundedBlockingQueue
Distributed async implementation of bounded
BlockingQueue- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionofferAsync(V e, long timeout, TimeUnit unit) Inserts the specified element into this queue, waiting up to the specified wait time if necessary for space to become available.trySetCapacityAsync(int capacity) Sets queue capacity only if it is not set before.Methods inherited from interface org.redisson.api.RBlockingQueueAsync
drainToAsync, drainToAsync, pollAsync, pollFirstFromAnyAsync, pollFromAnyAsync, pollFromAnyWithNameAsync, pollLastAndOfferFirstToAsync, pollLastFromAnyAsync, putAsync, takeAsync, takeLastAndOfferFirstToAsyncMethods inherited from interface org.redisson.api.RCollectionAsync
addAllAsync, addAsync, containsAllAsync, containsAsync, removeAllAsync, removeAsync, retainAllAsync, sizeAsyncMethods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, expireIfGreaterAsync, expireIfGreaterAsync, expireIfLessAsync, expireIfLessAsync, expireIfNotSetAsync, expireIfNotSetAsync, expireIfSetAsync, expireIfSetAsync, getExpireTimeAsync, remainTimeToLiveAsyncMethods inherited from interface org.redisson.api.RObjectAsync
copyAndReplaceAsync, copyAndReplaceAsync, copyAsync, copyAsync, copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsyncMethods inherited from interface org.redisson.api.RQueueAsync
addListenerAsync, offerAsync, peekAsync, pollAsync, pollAsync, pollLastAndOfferFirstToAsync, readAllAsync
-
Method Details
-
trySetCapacityAsync
Sets queue capacity only if it is not set before.- Parameters:
capacity- - queue capacity- Returns:
trueif capacity set successfullyfalseif capacity already set
-
offerAsync
Inserts the specified element into this queue, waiting up to the specified wait time if necessary for space to become available.- Parameters:
e- the element to addtimeout- how long to wait before giving up, in units ofunitunit- aTimeUnitdetermining how to interpret thetimeoutparameter- Returns:
trueif successful, orfalseif the specified waiting time elapses before space is available- Throws:
ClassCastException- if the class of the specified element prevents it from being added to this queueNullPointerException- if the specified element is null
-