Examples of THsHaServer


Examples of org.apache.thrift.server.THsHaServer

    THsHaServer.Args args = new THsHaServer.Args(serverTransport);
    args.executorService(Executors.newFixedThreadPool(config.getInt(DNodeProperties.SERVING_THREADS)));
    args.processor(processor);
   
    server = new THsHaServer(args);
    // We instantiate a long-living serving thread that will use the Thrift server.
    servingThread = new Thread("Serving Thread") {
      public void run() {
        try {
          server.serve();
View Full Code Here

Examples of org.apache.thrift7.server.THsHaServer

    THsHaServer.Args args = new THsHaServer.Args(socket);
    args.workerThreads(64);
    args.protocolFactory(new TBinaryProtocol.Factory());
    final ServiceHandler service_handler = new ServiceHandler(data);
    args.processor(new Nimbus.Processor<Iface>(service_handler));
    final THsHaServer server = new THsHaServer(args);
   
    Runtime.getRuntime().addShutdownHook(new Thread() {
      public void run() {
        service_handler.shutdown();
        scheduExec.shutdown();
        server.stop();
      }

    });
    LOG.info("Starting BlueWhale server...");
    server.serve();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.