org.apache.accumulo.server.util
Class TServerUtils
java.lang.Object
org.apache.accumulo.server.util.TServerUtils
public class TServerUtils
- extends java.lang.Object
Field Summary |
static java.lang.ThreadLocal<java.lang.String> |
clientAddress
|
Method Summary |
static org.apache.thrift.transport.TServerTransport |
openPort(int port)
|
static TServerUtils.ServerPort |
startServer(Property portHintProperty,
org.apache.thrift.TProcessor processor,
java.lang.String serverName,
java.lang.String threadName,
boolean portSearch)
Start a server, at the given port, or higher, if that port is not available. |
static org.apache.thrift.server.TServer |
startTServer(org.apache.thrift.TProcessor processor,
org.apache.thrift.transport.TServerTransport serverTransport,
java.lang.String serverName,
java.lang.String threadName,
int numThreads)
|
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 java.lang.ThreadLocal<java.lang.String> clientAddress
TServerUtils
public TServerUtils()
openPort
public static org.apache.thrift.transport.TServerTransport openPort(int port)
throws java.io.IOException
- Throws:
java.io.IOException
startServer
public static TServerUtils.ServerPort startServer(Property portHintProperty,
org.apache.thrift.TProcessor processor,
java.lang.String serverName,
java.lang.String threadName,
boolean portSearch)
throws java.net.UnknownHostException
- Start a server, at the given port, or higher, if that port is not available.
- Parameters:
portHint
- 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 debugging
- Returns:
- the server object created, and the port actually used
- Throws:
java.net.UnknownHostException
- when we don't know our own address
startTServer
public static org.apache.thrift.server.TServer startTServer(org.apache.thrift.TProcessor processor,
org.apache.thrift.transport.TServerTransport serverTransport,
java.lang.String serverName,
java.lang.String threadName,
int numThreads)
stopTServer
public static void stopTServer(org.apache.thrift.server.TServer s)
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.