Package com.clickhouse.data
Class ClickHouseDeferredValue<T>
java.lang.Object
com.clickhouse.data.ClickHouseDeferredValue<T>
- All Implemented Interfaces:
Supplier<T>
Deprecated.
This class represents a deferred value. It holds a reference to a
Supplier or Future to retrieve value only when get()
or getOptional() was called.-
Method Summary
Modifier and TypeMethodDescriptionget()Deprecated.Deprecated.Gets optional value, which may or may not be null.static <T> ClickHouseDeferredValue<T>of(CompletableFuture<T> future) Deprecated.Wraps a future object.static <T> ClickHouseDeferredValue<T>of(CompletableFuture<T> future, long timeout) Deprecated.Wraps a future object.static <T> ClickHouseDeferredValue<T>Deprecated.Wraps return value from a supplier function.static <T> ClickHouseDeferredValue<T>Deprecated.Wraps given value as a deferred value.
-
Method Details
-
of
Deprecated.Wraps a future object.- Type Parameters:
T- type of the value- Parameters:
future- future object, could be null- Returns:
- deferred value of a future object
-
of
Deprecated.Wraps a future object.- Type Parameters:
T- type of the value- Parameters:
future- future object, could be nulltimeout- timeout in milliseconds, zero or negative number means no timeout- Returns:
- deferred vaue of a future object
-
of
Deprecated.Wraps return value from a supplier function.- Type Parameters:
T- type of the value- Parameters:
supplier- supplier function, could be null- Returns:
- deferred value of return value from supplier function
-
of
Deprecated.Wraps given value as a deferred value.- Type Parameters:
T- type of the value- Parameters:
value- value to wrapclazz- class of the value- Returns:
- deferred value
-
get
Deprecated. -
getOptional
Deprecated.Gets optional value, which may or may not be null.- Returns:
- optional value
-