Class PlatformFutureUtils
- java.lang.Object
-
- org.apache.ignite.internal.processors.platform.utils.PlatformFutureUtils
-
public class PlatformFutureUtils extends Object
Interop future utils.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfacePlatformFutureUtils.WriterWriter allowing special future result handling.
-
Field Summary
Fields Modifier and Type Field Description static intTYP_BOOLFuture type: boolean.static intTYP_BYTEFuture type: byte.static intTYP_CHARFuture type: char.static intTYP_DOUBLEFuture type: double.static intTYP_FLOATFuture type: float.static intTYP_INTFuture type: int.static intTYP_LONGFuture type: long.static intTYP_OBJFuture type: object.static intTYP_SHORTFuture type: short.
-
Constructor Summary
Constructors Constructor Description PlatformFutureUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PlatformListenablegetListenable(IgniteInternalFuture fut)Gets the listenable.static PlatformListenablegetListenable(IgniteFuture fut)Gets the listenable.static <T> TgetResult(IgniteInternalFuture<T> fut)Awaits and returns the result of the specified future.static PlatformListenablelisten(PlatformContext ctx, IgniteInternalFuture fut, long futPtr, int typ, PlatformTarget target)Listen future.static PlatformListenablelisten(PlatformContext ctx, IgniteInternalFuture fut, long futPtr, int typ, PlatformFutureUtils.Writer writer, PlatformTarget target)Listen future.static PlatformListenablelisten(PlatformContext ctx, IgniteInternalFuture fut, long futPtr, PlatformFutureUtils.Writer writer, PlatformTarget target)Listen future.static voidlisten(PlatformContext ctx, PlatformListenable listenable, long futPtr, int typ, @Nullable PlatformFutureUtils.Writer writer, PlatformTarget target)Listen future.static PlatformListenablelisten(PlatformContext ctx, IgniteFuture fut, long futPtr, int typ, PlatformTarget target)Listen future.static PlatformListenablelisten(PlatformContext ctx, IgniteFuture fut, long futPtr, int typ, PlatformFutureUtils.Writer writer, PlatformTarget target)Listen future.
-
-
-
Field Detail
-
TYP_BYTE
public static final int TYP_BYTE
Future type: byte.- See Also:
- Constant Field Values
-
TYP_BOOL
public static final int TYP_BOOL
Future type: boolean.- See Also:
- Constant Field Values
-
TYP_SHORT
public static final int TYP_SHORT
Future type: short.- See Also:
- Constant Field Values
-
TYP_CHAR
public static final int TYP_CHAR
Future type: char.- See Also:
- Constant Field Values
-
TYP_INT
public static final int TYP_INT
Future type: int.- See Also:
- Constant Field Values
-
TYP_FLOAT
public static final int TYP_FLOAT
Future type: float.- See Also:
- Constant Field Values
-
TYP_LONG
public static final int TYP_LONG
Future type: long.- See Also:
- Constant Field Values
-
TYP_DOUBLE
public static final int TYP_DOUBLE
Future type: double.- See Also:
- Constant Field Values
-
TYP_OBJ
public static final int TYP_OBJ
Future type: object.- See Also:
- Constant Field Values
-
-
Method Detail
-
listen
public static PlatformListenable listen(PlatformContext ctx, IgniteInternalFuture fut, long futPtr, int typ, PlatformTarget target)
Listen future.- Parameters:
ctx- Context.fut- Java future.futPtr- Native future pointer.typ- Expected return type.- Returns:
- Resulting listenable.
-
listen
public static PlatformListenable listen(PlatformContext ctx, IgniteFuture fut, long futPtr, int typ, PlatformTarget target)
Listen future.- Parameters:
ctx- Context.fut- Java future.futPtr- Native future pointer.typ- Expected return type.- Returns:
- Resulting listenable.
-
listen
public static PlatformListenable listen(PlatformContext ctx, IgniteInternalFuture fut, long futPtr, int typ, PlatformFutureUtils.Writer writer, PlatformTarget target)
Listen future.- Parameters:
ctx- Context.fut- Java future.futPtr- Native future pointer.typ- Expected return type.writer- Writer.- Returns:
- Resulting listenable.
-
listen
public static PlatformListenable listen(PlatformContext ctx, IgniteFuture fut, long futPtr, int typ, PlatformFutureUtils.Writer writer, PlatformTarget target)
Listen future.- Parameters:
ctx- Context.fut- Java future.futPtr- Native future pointer.typ- Expected return type.writer- Writer.- Returns:
- Resulting listenable.
-
listen
public static PlatformListenable listen(PlatformContext ctx, IgniteInternalFuture fut, long futPtr, PlatformFutureUtils.Writer writer, PlatformTarget target)
Listen future.- Parameters:
ctx- Context.fut- Java future.futPtr- Native future pointer.writer- Writer.- Returns:
- Resulting listenable.
-
getListenable
public static PlatformListenable getListenable(IgniteInternalFuture fut)
Gets the listenable.- Parameters:
fut- Future.- Returns:
- Platform listenable.
-
getListenable
public static PlatformListenable getListenable(IgniteFuture fut)
Gets the listenable.- Parameters:
fut- Future.- Returns:
- Platform listenable.
-
listen
public static void listen(PlatformContext ctx, PlatformListenable listenable, long futPtr, int typ, @Nullable @Nullable PlatformFutureUtils.Writer writer, PlatformTarget target)
Listen future.- Parameters:
ctx- Context.listenable- Listenable entry.futPtr- Native future pointer.typ- Expected return type.writer- Optional writer.
-
getResult
public static <T> T getResult(IgniteInternalFuture<T> fut)
Awaits and returns the result of the specified future.
-
-