Package glide.ffi.resolvers
Class GlideScopeResolver
- java.lang.Object
-
- glide.ffi.resolvers.GlideScopeResolver
-
public class GlideScopeResolver extends java.lang.ObjectNative method declarations for isolated execution.
-
-
Constructor Summary
Constructors Constructor Description GlideScopeResolver()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intglideScopeAcquire(long clientId, byte[] connectionRequestBytes, boolean hasRoutingSlot, int routingSlot, long timeoutMs, long callbackId)Acquire a scope, completing the future registered undercallbackIdwith the scope id as aLong, or exceptionally with the error the core classified.static intglideScopeExecute(long scopeId, byte[] commandBytes, long callbackId)static intglideScopeRelease(long scopeId, long clientId)
-
-
-
Method Detail
-
glideScopeAcquire
public static int glideScopeAcquire(long clientId, byte[] connectionRequestBytes, boolean hasRoutingSlot, int routingSlot, long timeoutMs, long callbackId)Acquire a scope, completing the future registered undercallbackIdwith the scope id as aLong, or exceptionally with the error the core classified. The core owns the wait, so one call covers the whole acquire.- Parameters:
hasRoutingSlot- whetherroutingSlotis a caller-supplied slot; when false the slot is ignored and a cluster scope is left unconstrained (any primary)- Returns:
- 0 once queued; -2 if the connection request bytes could not be read, in which case the future is never completed by the native side
-
glideScopeRelease
public static int glideScopeRelease(long scopeId, long clientId)
-
glideScopeExecute
public static int glideScopeExecute(long scopeId, byte[] commandBytes, long callbackId)
-
-