public class LocalDRPC extends Object implements ILocalDRPC
try (LocalDRPC drpc = new LocalDRPC()) { // Do tests }
Constructor and Description |
---|
LocalDRPC()
Creates a LocalDRPC with a default metrics registry.
|
LocalDRPC(StormMetricsRegistry metricsRegistry)
Creates a LocalDRPC with the specified metrics registry.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
String |
execute(String functionName,
String funcArgs) |
void |
failRequest(String id) |
void |
failRequestV2(String id,
DRPCExecutionException e) |
DRPCRequest |
fetchRequest(String functionName) |
String |
getServiceId()
Get the ID of the service.
|
void |
result(String id,
String result) |
void |
shutdown()
Shutdown.
|
public LocalDRPC()
public LocalDRPC(StormMetricsRegistry metricsRegistry)
metricsRegistry
- The registrypublic String getServiceId()
ILocalDRPC
getServiceId
in interface ILocalDRPC
public void result(String id, String result) throws AuthorizationException, org.apache.storm.thrift.TException
result
in interface DistributedRPCInvocations.Iface
AuthorizationException
org.apache.storm.thrift.TException
public String execute(String functionName, String funcArgs) throws DRPCExecutionException, AuthorizationException, org.apache.storm.thrift.TException
execute
in interface DistributedRPC.Iface
DRPCExecutionException
AuthorizationException
org.apache.storm.thrift.TException
public void failRequest(String id) throws AuthorizationException, org.apache.storm.thrift.TException
failRequest
in interface DistributedRPCInvocations.Iface
AuthorizationException
org.apache.storm.thrift.TException
public void failRequestV2(String id, DRPCExecutionException e) throws AuthorizationException, org.apache.storm.thrift.TException
failRequestV2
in interface DistributedRPCInvocations.Iface
AuthorizationException
org.apache.storm.thrift.TException
public DRPCRequest fetchRequest(String functionName) throws AuthorizationException, org.apache.storm.thrift.TException
fetchRequest
in interface DistributedRPCInvocations.Iface
AuthorizationException
org.apache.storm.thrift.TException
public void close()
close
in interface AutoCloseable
public void shutdown()
ILocalDRPC
shutdown
in interface Shutdownable
shutdown
in interface ILocalDRPC
Copyright © 2023 The Apache Software Foundation. All rights reserved.