Package com.mapr.fs

Class Rpc


  • public class Rpc
    extends RpcNative
    Class to export RPC layer functionality to Java Layers.
    • Field Detail

      • MAX_RPC_THREADS_PER_INSTANCE

        public static int MAX_RPC_THREADS_PER_INSTANCE
    • Constructor Detail

      • Rpc

        public Rpc()
    • Method Detail

      • initialize

        public static int initialize​(int port,
                                     int numThreads,
                                     java.lang.String clusterName)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • initialize

        public static int initialize​(int listenPort,
                                     int numThreads,
                                     java.lang.String clusterName,
                                     RpcExport[] rpcPrograms,
                                     ThreadPoolFinder poolFinder)
                              throws java.lang.Exception
        Spawns and starts the RPC Listener Thread.
        Parameters:
        port -
        numThreads -
        clusterName -
        exports -
        threadPoolFinder -
        Returns:
        Throws:
        java.lang.Exception
      • initializeRpcServer

        public static int initializeRpcServer​(java.lang.String processName,
                                              int listenPort,
                                              int numThreads,
                                              java.lang.String clusterName,
                                              RpcExport[] rpcPrograms,
                                              ThreadPoolFinder poolFinder,
                                              int serverIdx,
                                              long ipStatsAddr,
                                              int ipStatsMemSize)
                                       throws java.lang.Exception
        Spawns and starts the RPC Listener Thread.
        Parameters:
        port -
        numThreads -
        clusterName -
        exports -
        threadPoolFinder -
        ServerIdx -
        Returns:
        Throws:
        java.lang.Exception
      • sendRequest

        public static byte[] sendRequest​(long binding,
                                         int programId,
                                         int procedureId,
                                         com.google.protobuf.MessageLite request)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • exportProgram

        public static void exportProgram​(int programId,
                                         RpcProgram program)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • exportProgram

        public static void exportProgram​(int programId,
                                         RpcProgram program,
                                         int serverIdx)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • sendReply

        public static void sendReply​(RpcCallContext c,
                                     com.google.protobuf.MessageLite reply)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • sendReplyAsync

        public static void sendReplyAsync​(RpcCallContext c,
                                          com.google.protobuf.MessageLite reply)
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • sendReplyAsync

        public static void sendReplyAsync​(RpcCallContext c,
                                          com.google.protobuf.MessageLite reply,
                                          boolean replyWithEBusy)
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • rejectCall

        public static void rejectCall​(RpcCallContext c)
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • closeBinding

        public static void closeBinding​(RpcCallContext c)
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getAuthenticatedTicket

        public static com.mapr.fs.proto.Security.Ticket getAuthenticatedTicket​(RpcCallContext c)
      • initializeGuts

        public static int initializeGuts​(long shmAddr)