Package backtype.storm.messaging

Examples of backtype.storm.messaging.IConnection


    /**
     * establish a connection to a remote server
     */
    public IConnection connect(String storm_id, String host, int port) {       
        IConnection client =  new Client(storm_conf, clientChannelFactory,
                clientScheduleService, host, port);
        connections.add(client);
        return client;
    }
View Full Code Here


    /**
     * establish a server with a binding port
     */
    public IConnection bind(String storm_id, int port) {
        IConnection server = new Server(storm_conf, port);
        connections.add(server);
        return server;
    }
View Full Code Here

    }
  }
 
  public void send(HashMap<String, IConnection> connections) {
    for (String hostPort : bundles.keySet()) {
      IConnection connection = connections.get(hostPort);
      if (null != connection) {
        ArrayList<ArrayList<TaskMessage>> bundle = bundles.get(hostPort);
        Iterator<TaskMessage> iter = getBundleIterator(bundle);
        if (null != iter && iter.hasNext()) {
          connection.send(iter);
        }
      }
    }
  }
View Full Code Here

    /**
     * establish a server with a binding port
     */
    public IConnection bind(String storm_id, int port) {
        IConnection server = new Server(storm_conf, port);
        connections.add(server);
        return server;
    }
View Full Code Here

    /**
     * establish a connection to a remote server
     */
    public IConnection connect(String storm_id, String host, int port) {       
        IConnection client =  new Client(storm_conf, host, port);
        connections.add(client);
        return client;
    }
View Full Code Here

    /**
     * establish a server with a binding port
     */
    public IConnection bind(String storm_id, int port) {
        IConnection server = new Server(storm_conf, port);
        connections.add(server);
        return server;
    }
View Full Code Here

    /**
     * establish a connection to a remote server
     */
    public IConnection connect(String storm_id, String host, int port) {       
        IConnection client =  new Client(storm_conf, host, port);
        connections.add(client);
        return client;
    }
View Full Code Here

          String host = node.get(nodePort.getNodeId());

          int port = nodePort.getPort();

          IConnection conn = context.connect(topologyId, host, port);

          nodeportSocket.put(nodePort, conn);

          LOG.info("Add connection to " + nodePort);
        }
View Full Code Here

    //recvQueue.consumerStarted();

    IContext context = workerData.getContext();
    String topologyId = workerData.getTopologyId();

    IConnection recvConnection = context.bind(topologyId,
        workerData.getPort());
    recvConnection.registerQueue(recvQueue);

    RunnableCallback recvDispather = new VirtualPortDispatch(workerData,
        recvConnection, recvQueue);

    AsyncLoopThread vthread = new AsyncLoopThread(recvDispather, false,
View Full Code Here

        isSyncMode = ConfigExtension.isNettySyncMode(storm_conf);
  }

  @Override
  public IConnection bind(String topology_id, int port) {
    IConnection retConnection = null;
    try {

      retConnection = new NettyServer(storm_conf, port, isSyncMode);
    } catch (Throwable e) {
      LOG.error("Failed to instance NettyServer", e.getCause());
View Full Code Here

TOP

Related Classes of backtype.storm.messaging.IConnection

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.