org.apache.accumulo.server.util
Class TServerUtils
java.lang.Object
org.apache.accumulo.server.util.TServerUtils
public class TServerUtils
- extends Object
Method Summary |
static TServerUtils.ServerPort |
startHsHaServer(int port,
org.apache.thrift.TProcessor processor,
String serverName,
String threadName,
int numThreads,
long timeBetweenThreadChecks)
|
static TServerUtils.ServerPort |
startServer(Property portHintProperty,
org.apache.thrift.TProcessor processor,
String serverName,
String threadName,
Property portSearchProperty,
Property minThreadProperty,
Property timeBetweenThreadChecksProperty)
Start a server, at the given port, or higher, if that port is not available. |
static TServerUtils.ServerPort |
startThreadPoolServer(int port,
org.apache.thrift.TProcessor processor,
String serverName,
String threadName,
int numThreads)
|
static TServerUtils.ServerPort |
startTServer(int port,
org.apache.thrift.TProcessor processor,
String serverName,
String threadName,
int numThreads,
long timeBetweenThreadChecks)
|
static void |
stopTServer(org.apache.thrift.server.TServer s)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
clientAddress
public static ThreadLocal<String> clientAddress
TServerUtils
public TServerUtils()
startServer
public static TServerUtils.ServerPort startServer(Property portHintProperty,
org.apache.thrift.TProcessor processor,
String serverName,
String threadName,
Property portSearchProperty,
Property minThreadProperty,
Property timeBetweenThreadChecksProperty)
throws UnknownHostException
- Start a server, at the given port, or higher, if that port is not available.
- Parameters:
portHintProperty
- the port to attempt to open, can be zero, meaning "any available port"processor
- the service to be startedserverName
- the name of the class that is providing the servicethreadName
- name this service's thread for better debuggingportSearchProperty
- minThreadProperty
- timeBetweenThreadChecksProperty
-
- Returns:
- the server object created, and the port actually used
- Throws:
UnknownHostException
- when we don't know our own address
startHsHaServer
public static TServerUtils.ServerPort startHsHaServer(int port,
org.apache.thrift.TProcessor processor,
String serverName,
String threadName,
int numThreads,
long timeBetweenThreadChecks)
throws org.apache.thrift.transport.TTransportException
- Throws:
org.apache.thrift.transport.TTransportException
startThreadPoolServer
public static TServerUtils.ServerPort startThreadPoolServer(int port,
org.apache.thrift.TProcessor processor,
String serverName,
String threadName,
int numThreads)
throws org.apache.thrift.transport.TTransportException
- Throws:
org.apache.thrift.transport.TTransportException
startTServer
public static TServerUtils.ServerPort startTServer(int port,
org.apache.thrift.TProcessor processor,
String serverName,
String threadName,
int numThreads,
long timeBetweenThreadChecks)
throws org.apache.thrift.transport.TTransportException
- Throws:
org.apache.thrift.transport.TTransportException
stopTServer
public static void stopTServer(org.apache.thrift.server.TServer s)
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.