Package com.mapr.fs
Class Rpc
java.lang.Object
com.mapr.fs.jni.RpcNative
com.mapr.fs.Rpc
Class to export RPC layer functionality to Java Layers.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidexportProgram(int programId, RpcProgram program) static voidexportProgram(int programId, RpcProgram program, int serverIdx) static com.mapr.fs.proto.Security.Ticketstatic intinitialize(int port, int numThreads, String clusterName) static intinitialize(int listenPort, int numThreads, String clusterName, RpcExport[] rpcPrograms, ThreadPoolFinder poolFinder) Spawns and starts the RPC Listener Thread.static intinitializeGuts(long shmAddr) static intinitializeRpcServer(String processName, int listenPort, int numThreads, String clusterName, RpcExport[] rpcPrograms, ThreadPoolFinder poolFinder, int serverIdx, long ipStatsAddr, int ipStatsMemSize) Spawns and starts the RPC Listener Thread.static voidstatic voidsendReply(RpcCallContext c, com.google.protobuf.MessageLite reply) static voidsendReplyAsync(RpcCallContext c, com.google.protobuf.MessageLite reply) static voidsendReplyAsync(RpcCallContext c, com.google.protobuf.MessageLite reply, boolean replyWithEBusy) static byte[]sendRequest(long binding, int programId, int procedureId, com.google.protobuf.MessageLite request) Methods inherited from class com.mapr.fs.jni.RpcNative
closeBinding, copyRpcSlabInfo, createBindingFor, createBindingFor2, createBindingForIps, createBindingForIps2, createBindingForIpsWithSrcPort, createBindingForIpsWithSrcPort2, createBindingOnServerFor, doNotTimeout, getIpPortFromBinding, getIPStatSize, getTicketFromContext, init, initAndExport, initAndExportServer, initializeRpcGuts, initServer, registerProgramId, rejectCall, sendReply, sendReplyAsync, sendRequest, setAllowImpersonation, shrinkSlabs, waitForRequest
-
Field Details
-
MAX_RPC_THREADS_PER_INSTANCE
public static int MAX_RPC_THREADS_PER_INSTANCE
-
-
Constructor Details
-
Rpc
public Rpc()
-
-
Method Details
-
initialize
- Throws:
Exception
-
initialize
public static int initialize(int listenPort, int numThreads, String clusterName, RpcExport[] rpcPrograms, ThreadPoolFinder poolFinder) throws Exception Spawns and starts the RPC Listener Thread.- Throws:
Exception
-
initializeRpcServer
public static int initializeRpcServer(String processName, int listenPort, int numThreads, String clusterName, RpcExport[] rpcPrograms, ThreadPoolFinder poolFinder, int serverIdx, long ipStatsAddr, int ipStatsMemSize) throws Exception Spawns and starts the RPC Listener Thread.- Throws:
Exception
-
sendRequest
public static byte[] sendRequest(long binding, int programId, int procedureId, com.google.protobuf.MessageLite request) throws Exception - Throws:
Exception
-
exportProgram
- Throws:
Exception
-
exportProgram
- Throws:
Exception
-
sendReply
public static void sendReply(RpcCallContext c, com.google.protobuf.MessageLite reply) throws Exception - Throws:
Exception
-
sendReplyAsync
public static void sendReplyAsync(RpcCallContext c, com.google.protobuf.MessageLite reply) throws Exception - Throws:
Exception
-
sendReplyAsync
public static void sendReplyAsync(RpcCallContext c, com.google.protobuf.MessageLite reply, boolean replyWithEBusy) throws Exception - Throws:
Exception
-
rejectCall
- Throws:
Exception
-
closeBinding
- Throws:
Exception
-
getAuthenticatedTicket
-
initializeGuts
public static int initializeGuts(long shmAddr)
-