org.apache.accumulo.core.util
Class ThriftUtil

java.lang.Object
  extended by org.apache.accumulo.core.util.ThriftUtil

public class ThriftUtil
extends Object


Constructor Summary
ThriftUtil()
           
 
Method Summary
static
<T extends org.apache.thrift.TServiceClient>
T
createClient(org.apache.thrift.TServiceClientFactory<T> factory, org.apache.thrift.transport.TTransport transport)
           
static void execute(String address, AccumuloConfiguration conf, ClientExec<TabletClientService.Iface> exec)
           
static
<T> T
execute(String address, AccumuloConfiguration conf, ClientExecReturn<T,TabletClientService.Iface> exec)
           
static
<T extends org.apache.thrift.TServiceClient>
T
getClient(org.apache.thrift.TServiceClientFactory<T> factory, InetSocketAddress address, AccumuloConfiguration conf)
           
static
<T extends org.apache.thrift.TServiceClient>
T
getClient(org.apache.thrift.TServiceClientFactory<T> factory, String address, Property property, AccumuloConfiguration configuration)
           
static
<T extends org.apache.thrift.TServiceClient>
T
getClient(org.apache.thrift.TServiceClientFactory<T> factory, String address, Property property, Property timeoutProperty, AccumuloConfiguration configuration)
           
static TabletClientService.Iface getTServerClient(String address, AccumuloConfiguration conf)
           
static TabletClientService.Iface getTServerClient(String address, AccumuloConfiguration conf, Property port, Property timeout)
           
static org.apache.thrift.protocol.TProtocolFactory protocolFactory()
           
static void returnClient(Object iface)
           
static org.apache.thrift.transport.TTransportFactory transportFactory()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThriftUtil

public ThriftUtil()
Method Detail

createClient

public static <T extends org.apache.thrift.TServiceClient> T createClient(org.apache.thrift.TServiceClientFactory<T> factory,
                                                                          org.apache.thrift.transport.TTransport transport)

getClient

public static <T extends org.apache.thrift.TServiceClient> T getClient(org.apache.thrift.TServiceClientFactory<T> factory,
                                                                       InetSocketAddress address,
                                                                       AccumuloConfiguration conf)
                                                            throws org.apache.thrift.transport.TTransportException
Throws:
org.apache.thrift.transport.TTransportException

getClient

public static <T extends org.apache.thrift.TServiceClient> T getClient(org.apache.thrift.TServiceClientFactory<T> factory,
                                                                       String address,
                                                                       Property property,
                                                                       AccumuloConfiguration configuration)
                                                            throws org.apache.thrift.transport.TTransportException
Throws:
org.apache.thrift.transport.TTransportException

getClient

public static <T extends org.apache.thrift.TServiceClient> T getClient(org.apache.thrift.TServiceClientFactory<T> factory,
                                                                       String address,
                                                                       Property property,
                                                                       Property timeoutProperty,
                                                                       AccumuloConfiguration configuration)
                                                            throws org.apache.thrift.transport.TTransportException
Throws:
org.apache.thrift.transport.TTransportException

returnClient

public static void returnClient(Object iface)

getTServerClient

public static TabletClientService.Iface getTServerClient(String address,
                                                         AccumuloConfiguration conf)
                                                  throws org.apache.thrift.transport.TTransportException
Throws:
org.apache.thrift.transport.TTransportException

getTServerClient

public static TabletClientService.Iface getTServerClient(String address,
                                                         AccumuloConfiguration conf,
                                                         Property port,
                                                         Property timeout)
                                                  throws org.apache.thrift.transport.TTransportException
Throws:
org.apache.thrift.transport.TTransportException

execute

public static void execute(String address,
                           AccumuloConfiguration conf,
                           ClientExec<TabletClientService.Iface> exec)
                    throws AccumuloException,
                           AccumuloSecurityException
Throws:
AccumuloException
AccumuloSecurityException

execute

public static <T> T execute(String address,
                            AccumuloConfiguration conf,
                            ClientExecReturn<T,TabletClientService.Iface> exec)
                 throws AccumuloException,
                        AccumuloSecurityException
Throws:
AccumuloException
AccumuloSecurityException

transportFactory

public static org.apache.thrift.transport.TTransportFactory transportFactory()

protocolFactory

public static org.apache.thrift.protocol.TProtocolFactory protocolFactory()


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.