Package com.google.code.hs4j

Examples of com.google.code.hs4j.Command


  /**
   * put command which have been sent to queue
   */
  @Override
  public final void onMessageSent(Session session, Object msg) {
    Command command = (Command) msg;
    ((HandlerSocketSession) session).addCommand(command);

  }
View Full Code Here


   * (non-Javadoc)
   *
   * @see com.google.code.hs4j.network.hs.HandlerSocket#destroy()
   */
  public void destroy() {
    Command command = this.currentCommand.get();
    if (command != null) {
      command.setExceptionMessage("Connection has been closed");
      command.countDown();
    }
    while ((command = this.commandAlreadySent.poll()) != null) {
      command.setExceptionMessage("Connection has been closed");
      command.countDown();
    }

  }
View Full Code Here

        Map<Integer, IndexRecord> indexMap = HandlerSocketConnectorImpl.this.hsClient
            .getIndexMap();
        if (!indexMap.isEmpty()) {
          for (IndexRecord record : indexMap.values()) {
            try {
              Command cmd = commandFactory
                  .createOpenIndexCommand(String
                      .valueOf(record.id), record.db,
                      record.tableName, record.indexName,
                      record.fieldList, record.filterFieldList);
              session.write(cmd);
              cmd.await(3000, TimeUnit.MILLISECONDS);
            } catch (InterruptedException e) {
              Thread.currentThread().interrupt();
            } catch (Exception e) {
              log
                  .error(
View Full Code Here

TOP

Related Classes of com.google.code.hs4j.Command

Copyright © 2018 www.massapicom. 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.