Class GlideNativeBridge


  • public class GlideNativeBridge
    extends java.lang.Object
    Native bridge for the Valkey client. Methods expose a handle-based API for safe cross-language operations.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void closeClient​(long clientPtr)
      Close and release a native client
      static long createClient​(byte[] connectionRequestBytes)
      Create a new native client instance
      static void executeBatchAsync​(long clientPtr, byte[] batchRequestBytes, boolean expectUtf8Response, long callbackId)
      Execute batch (pipeline/transaction) asynchronously
      static void executeBinaryCommandAsync​(long clientPtr, byte[] requestBytes, long callbackId)
      Execute binary command with mixed String/byte[] arguments asynchronously
      static void executeClusterScanAsync​(long clientPtr, java.lang.String cursorId, java.lang.String matchPattern, long count, java.lang.String objectType, boolean expectUtf8Response, long callbackId)
      Execute cluster scan command asynchronously
      static void executeCommandAsync​(long clientPtr, byte[] requestBytes, long callbackId)
      Execute command asynchronously
      static void executeScriptAsync​(long clientPtr, long callbackId, java.lang.String hash, byte[][] keys, byte[][] args, boolean hasRoute, int routeType, java.lang.String routeParam, boolean expectUtf8Response)
      Execute script asynchronously using glide-core's invoke_script
      static java.lang.String getClientInfo​(long clientPtr)
      Get client information from native layer
      static long getGlideCoreDefaultConnectionTimeoutMs()
      Get glide-core default connection timeout in milliseconds
      static int getGlideCoreDefaultMaxInflightRequests()
      Get glide-core default maximum inflight requests limit
      static long getGlideCoreDefaultRequestTimeoutMs()
      Get glide-core default request timeout in milliseconds
      static boolean isConnected​(long clientPtr)
      Check if the native client is connected
      static void refreshIamToken​(long clientPtr, long callbackId)
      Refresh the IAM authentication token.
      static void updateConnectionPassword​(long clientPtr, java.lang.String password, boolean immediateAuth, long callbackId)
      Update the connection password with optional immediate authentication.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GlideNativeBridge

        public GlideNativeBridge()
    • Method Detail

      • createClient

        public static long createClient​(byte[] connectionRequestBytes)
        Create a new native client instance
      • executeCommandAsync

        public static void executeCommandAsync​(long clientPtr,
                                               byte[] requestBytes,
                                               long callbackId)
        Execute command asynchronously
      • executeBinaryCommandAsync

        public static void executeBinaryCommandAsync​(long clientPtr,
                                                     byte[] requestBytes,
                                                     long callbackId)
        Execute binary command with mixed String/byte[] arguments asynchronously
      • executeBatchAsync

        public static void executeBatchAsync​(long clientPtr,
                                             byte[] batchRequestBytes,
                                             boolean expectUtf8Response,
                                             long callbackId)
        Execute batch (pipeline/transaction) asynchronously
      • updateConnectionPassword

        public static void updateConnectionPassword​(long clientPtr,
                                                    java.lang.String password,
                                                    boolean immediateAuth,
                                                    long callbackId)
        Update the connection password with optional immediate authentication.
      • refreshIamToken

        public static void refreshIamToken​(long clientPtr,
                                           long callbackId)
        Refresh the IAM authentication token.
      • isConnected

        public static boolean isConnected​(long clientPtr)
        Check if the native client is connected
      • getClientInfo

        public static java.lang.String getClientInfo​(long clientPtr)
        Get client information from native layer
      • closeClient

        public static void closeClient​(long clientPtr)
        Close and release a native client
      • executeScriptAsync

        public static void executeScriptAsync​(long clientPtr,
                                              long callbackId,
                                              java.lang.String hash,
                                              byte[][] keys,
                                              byte[][] args,
                                              boolean hasRoute,
                                              int routeType,
                                              java.lang.String routeParam,
                                              boolean expectUtf8Response)
        Execute script asynchronously using glide-core's invoke_script
      • getGlideCoreDefaultConnectionTimeoutMs

        public static long getGlideCoreDefaultConnectionTimeoutMs()
        Get glide-core default connection timeout in milliseconds
      • getGlideCoreDefaultRequestTimeoutMs

        public static long getGlideCoreDefaultRequestTimeoutMs()
        Get glide-core default request timeout in milliseconds
      • getGlideCoreDefaultMaxInflightRequests

        public static int getGlideCoreDefaultMaxInflightRequests()
        Get glide-core default maximum inflight requests limit
      • executeClusterScanAsync

        public static void executeClusterScanAsync​(long clientPtr,
                                                   java.lang.String cursorId,
                                                   java.lang.String matchPattern,
                                                   long count,
                                                   java.lang.String objectType,
                                                   boolean expectUtf8Response,
                                                   long callbackId)
        Execute cluster scan command asynchronously