public class SFuture
extends java.lang.Object
Constructor and Description |
---|
SFuture() |
Modifier and Type | Method and Description |
---|---|
static void |
avoidCallTimeouts(Future<?> ret,
IExternalAccess ea)
Automatically update the timer of a long running service call future.
|
static void |
avoidCallTimeouts(Future<?> ret,
IExternalAccess ea,
long to,
boolean realtime)
Automatically update the timer of a long running service call future.
|
static void |
avoidCallTimeouts(Future<?> ret,
IExternalAccess ea,
long to,
double factor,
boolean realtime)
Automatically update the timer of a long running service call future.
|
static void |
avoidCallTimeouts(Future<?> ret,
IInternalAccess ia)
Automatically update the timer of a long running service call future.
|
static void |
avoidCallTimeouts(Future<?> ret,
IInternalAccess ia,
boolean realtime)
Automatically update the timer of a long running service call future.
|
static void |
avoidCallTimeouts(Future<?> ret,
IInternalAccess ia,
long to,
boolean realtime)
Automatically update the timer of a long running service call future.
|
static void |
avoidCallTimeouts(Future<?> ret,
IInternalAccess ia,
long to,
double factor,
boolean realtime)
Automatically update the timer of a long running service call future.
|
static <T,E> ISubscriptionIntermediateFuture<T> |
combineSubscriptionFutures(IInternalAccess ia,
ISubscriptionIntermediateFuture<E> f1,
ISubscriptionIntermediateFuture<E> f2,
IResultCommand<T,E> cmd)
Combine results of two subscription futures and exclude duplicates
(uses sliding cuckoo filter with toString() on results).
|
static <T> ISubscriptionIntermediateFuture<T> |
combineSubscriptionFutures(IInternalAccess ia,
ISubscriptionIntermediateFuture<T> f1,
ISubscriptionIntermediateFuture<T> f2)
Combine results of two subscription futures and exclude duplicates
(uses sliding cuckoo filter with toString() on results).
|
static <T> T |
getFirstResultAndTerminate(ITerminableIntermediateFuture<T> fut)
Blocking wait for first result.
|
static <T> Future<?> |
getFuture(boolean timeouts,
IInternalAccess ia)
Convenience method for creating a future (possibly with timeout avoidance).
|
static Future<?> |
getFuture(java.lang.Class<?> clazz)
Get the matching future object to a future (interface) type.
|
static <T> Future<?> |
getFuture(java.lang.Class<T> type,
boolean timeouts,
IExternalAccess ea)
Convenience method for creating a future (possibly with timeout avoidance).
|
static <T> Future<?> |
getFuture(java.lang.Class<T> type,
boolean timeouts,
IInternalAccess ia)
Convenience method for creating a future (possibly with timeout avoidance).
|
static <T> Future<?> |
getNoTimeoutFuture(java.lang.Class<T> type,
IExternalAccess ea)
Convenience method for creating a future (possibly with timeout avoidance).
|
static <T> Future<?> |
getNoTimeoutFuture(java.lang.Class<T> type,
IInternalAccess ia)
Convenience method for creating a future (possibly with timeout avoidance).
|
static <T> Future<?> |
getNoTimeoutFuture(java.lang.Class<T> type,
IInternalAccess ia,
boolean realtime)
Convenience method for creating a future with timeout avoidance.
|
static <T> Future<?> |
getNoTimeoutFuture(IInternalAccess ia)
Convenience method for creating a future (possibly with timeout avoidance).
|
public static void avoidCallTimeouts(Future<?> ret, IInternalAccess ia)
ret
- The future that is returned by the service call.ia
- The component handling the service call (on that component the periodic updates are scheduled).public static void avoidCallTimeouts(Future<?> ret, IInternalAccess ia, boolean realtime)
ret
- The future that is returned by the service call.ia
- The component handling the service call (on that component the periodic updates are scheduled).realtime
- true, for real time timeouts (simulation clock based timeouts otherwise).public static void avoidCallTimeouts(Future<?> ret, IExternalAccess ea)
ret
- The future that is returned by the service call.ea
- The component handling the service call (on that component the periodic updates are scheduled).public static void avoidCallTimeouts(Future<?> ret, IInternalAccess ia, long to, boolean realtime)
ret
- The future that is returned by the service call.ia
- The component handling the service call (on that component the periodic updates are scheduled).to
- The timeout.public static void avoidCallTimeouts(Future<?> ret, IExternalAccess ea, long to, boolean realtime)
ret
- The future that is returned by the service call.ea
- The component handling the service call (on that component the periodic updates are scheduled).to
- The timeout.public static void avoidCallTimeouts(Future<?> ret, IInternalAccess ia, long to, double factor, boolean realtime)
ret
- The future that is returned by the service call.ia
- The component handling the service call (on that component the periodic updates are scheduled).to
- The timeout.factor
- (default 0.8) Used to update the timer when factor*to has elapsed.public static void avoidCallTimeouts(Future<?> ret, IExternalAccess ea, long to, double factor, boolean realtime)
ret
- The future that is returned by the service call.ea
- The component handling the service call (on that component the periodic updates are scheduled).to
- The timeout.factor
- (default 0.8) Used to update the timer when factor*to has elapsed.public static <T> Future<?> getNoTimeoutFuture(IInternalAccess ia)
timeouts
- (default is true) False, if no timeouts should be generated when service call timeout has elapsed.ea
- The external access.public static <T> Future<?> getNoTimeoutFuture(java.lang.Class<T> type, IInternalAccess ia)
timeouts
- (default is true) False, if no timeouts should be generated when service call timeout has elapsed.ia
- The internal access.public static <T> Future<?> getNoTimeoutFuture(java.lang.Class<T> type, IInternalAccess ia, boolean realtime)
type
- The future type (e.g. IntermediateFuture.class).ia
- The internal access.realtime
- true, for real time timeouts (simulation clock based timeouts otherwise).public static <T> Future<?> getNoTimeoutFuture(java.lang.Class<T> type, IExternalAccess ea)
timeouts
- (default is true) False, if no timeouts should be generated when service call timeout has elapsed.ea
- The external access.public static <T> Future<?> getFuture(boolean timeouts, IInternalAccess ia)
timeouts
- (default is true) False, if no timeouts should be generated when service call timeout has elapsed.ia
- The external access.public static <T> Future<?> getFuture(java.lang.Class<T> type, boolean timeouts, IInternalAccess ia)
type
- The future implementation type.timeouts
- (default is true) False, if no timeouts should be generated when service call timeout has elapsed.ia
- The external access.public static <T> Future<?> getFuture(java.lang.Class<T> type, boolean timeouts, IExternalAccess ea)
type
- The future implementation type.timeouts
- (default is true) False, if no timeouts should be generated when service call timeout has elapsed.ea
- The external access.public static Future<?> getFuture(java.lang.Class<?> clazz)
public static <T> T getFirstResultAndTerminate(ITerminableIntermediateFuture<T> fut)
fut
- The future.public static <T> ISubscriptionIntermediateFuture<T> combineSubscriptionFutures(IInternalAccess ia, ISubscriptionIntermediateFuture<T> f1, ISubscriptionIntermediateFuture<T> f2)
f1
- Future 1.f2
- Future 2.public static <T,E> ISubscriptionIntermediateFuture<T> combineSubscriptionFutures(IInternalAccess ia, ISubscriptionIntermediateFuture<E> f1, ISubscriptionIntermediateFuture<E> f2, IResultCommand<T,E> cmd)
f1
- Future 1.f2
- Future 2.