| Package | Description |
|---|---|
| com.cloudhopper.commons.util.windowing |
| Modifier and Type | Class and Description |
|---|---|
class |
DefaultWindowFuture<K,R,P>
Default implementation of a WindowFuture.
|
| Modifier and Type | Method and Description |
|---|---|
WindowFuture<K,R,P> |
Window.cancel(K key)
Cancels (completes) a request.
|
WindowFuture<K,R,P> |
Window.complete(K key,
P response)
Successfully completes a request by setting the response on the associated future.
|
WindowFuture<K,R,P> |
Window.fail(K key,
Throwable t)
Fails (completes) a request by setting the cause of the failure on the associated future.
|
WindowFuture<K,R,P> |
Window.get(K key)
Gets the a future by its key.
|
WindowFuture |
Window.offer(K key,
R request,
long offerTimeoutMillis)
Offers a request for acceptance, waiting for the specified amount of time
in case it could not immediately accepted.
|
WindowFuture |
Window.offer(K key,
R request,
long offerTimeoutMillis,
long expireTimeoutMillis)
Offers a request for acceptance, waiting for the specified amount of time
in case it could not immediately accepted.
|
WindowFuture |
Window.offer(K key,
R request,
long offerTimeoutMillis,
long expireTimeoutMillis,
boolean callerWaitingHint)
Offers a request for acceptance, waiting for the specified amount of time
in case it could not immediately accepted.
|
| Modifier and Type | Method and Description |
|---|---|
List<WindowFuture<K,R,P>> |
Window.cancelAll()
Cancels (completes) all requests.
|
List<WindowFuture<K,R,P>> |
Window.cancelAllExpired()
Cancels (completes) all expired requests.
|
Map<K,WindowFuture<K,R,P>> |
Window.createSortedSnapshot()
Creates an ordered snapshot of the requests in this window.
|
List<WindowFuture<K,R,P>> |
Window.failAll(Throwable t)
Fails (completes) all requests by setting the same cause of the failure
on all associated futures.
|
| Modifier and Type | Method and Description |
|---|---|
void |
WindowListener.expired(WindowFuture<K,R,P> future)
Called when a future has been automatically expired by a window in its
internal monitoring task.
|
Copyright © 2012-2015 Cloudhopper by Twitter. All Rights Reserved.