public void GetData() {

    if (cd.isConnectingToInternet()) {

      ResponseThread iResponseThread = new ResponseThread(location.getText().toString().trim());
      iResponseThread.start();
    } else {
      pbar.setVisibility(View.GONE);

      display_location.setText("Check your internet");
    }
  }
 public ClientInvocationServiceSupport(HazelcastClientInstanceImpl client) {
   this.client = client;
   this.connectionManager = client.getConnectionManager();
   this.executionService = client.getClientExecutionService();
   connectionManager.addConnectionListener(this);
   connectionManager.addConnectionHeartbeatListener(this);
   this.partitionService = client.getClientPartitionService();
   responseThread =
       new ResponseThread(
           client.getThreadGroup(),
           client.getName() + ".response-",
           client.getClientConfig().getClassLoader());
   responseThread.start();
 }
  public BasicOperationScheduler(
      Node node, ExecutionService executionService, BasicOperationProcessor processor) {
    this.executionService = executionService;
    this.logger = node.getLogger(BasicOperationScheduler.class);
    this.node = node;
    this.processor = processor;

    this.genericOperationThreads = new OperationThread[getGenericOperationThreadCount()];
    initOperationThreads(genericOperationThreads, new GenericOperationThreadFactory());

    this.partitionOperationThreads = new OperationThread[getPartitionOperationThreadCount()];
    initOperationThreads(partitionOperationThreads, new PartitionOperationThreadFactory());

    this.responseThread = new ResponseThread();
    responseThread.start();

    logger.info(
        "Starting with "
            + genericOperationThreads.length
            + "generic operation threads and "
            + partitionOperationThreads.length
            + " partition operation threads.");
  }
 public void shutdown() {
   isShutdown = true;
   responseThread.interrupt();
 }