NodeType.valueOf
Code IndexAdd Codota to your IDE (free)

Best code snippets using com.github.ltsopensource.core.cluster.NodeType.valueOf(Showing top 9 results out of 315)

origin: ltsopensource/light-task-scheduler

  public static NodeType convert(String value) {
    if (StringUtils.isEmpty(value)) {
      return null;
    }
    return NodeType.valueOf(value);
  }
}
origin: ltsopensource/light-task-scheduler

/**
 * 1. 将 channel 纳入管理中(不存在就加入)
 * 2. 更新 TaskTracker 节点信息(可用线程数)
 */
private void offerHandler(Channel channel, RemotingCommand request) {
  AbstractRemotingCommandBody commandBody = request.getBody();
  String nodeGroup = commandBody.getNodeGroup();
  String identity = commandBody.getIdentity();
  NodeType nodeType = NodeType.valueOf(commandBody.getNodeType());
  // 1. 将 channel 纳入管理中(不存在就加入)
  appContext.getChannelManager().offerChannel(new ChannelWrapper(channel, nodeType, nodeGroup, identity));
}
origin: ltsopensource/light-task-scheduler

  @Override
  public List<NodeGroupPo> handle(ResultSet rs) throws SQLException {
    List<NodeGroupPo> list = new ArrayList<NodeGroupPo>();
    while (rs.next()) {
      NodeGroupPo nodeGroupPo = new NodeGroupPo();
      nodeGroupPo.setNodeType(NodeType.valueOf(rs.getString("node_type")));
      nodeGroupPo.setName(rs.getString("name"));
      nodeGroupPo.setGmtCreated(rs.getLong("gmt_created"));
      list.add(nodeGroupPo);
    }
    return list;
  }
};
origin: ltsopensource/light-task-scheduler

private static Node getNodeByRs(final ResultSet rs) throws SQLException {
  Node node = new Node();
  node.setIdentity(rs.getString("identity"));
  node.setClusterName(rs.getString("cluster_name"));
  node.setNodeType(NodeType.valueOf(rs.getString("node_type")));
  node.setIp(rs.getString("ip"));
  node.setPort(rs.getInt("port"));
  node.setGroup(rs.getString("node_group"));
  node.setCreateTime(rs.getLong("create_time"));
  node.setThreads(rs.getInt("threads"));
  node.setAvailable(rs.getInt("available") == 1);
  node.setHostName(rs.getString("host_name"));
  node.setHttpCmdPort(rs.getInt("http_cmd_port"));
  return node;
}
origin: ltsopensource/light-task-scheduler

Node node = new Node();
String[] nodeDir = fullPath.split("/");
NodeType nodeType = NodeType.valueOf(nodeDir[4]);
node.setNodeType(nodeType);
String url = nodeDir[5];
origin: ltsopensource/light-task-scheduler

  public static NodeType convert(String value) {
    if (StringUtils.isEmpty(value)) {
      return null;
    }
    return NodeType.valueOf(value);
  }
}
origin: ltsopensource/light-task-scheduler

/**
 * 1. 将 channel 纳入管理中(不存在就加入)
 * 2. 更新 TaskTracker 节点信息(可用线程数)
 */
private void offerHandler(Channel channel, RemotingCommand request) {
  AbstractRemotingCommandBody commandBody = request.getBody();
  String nodeGroup = commandBody.getNodeGroup();
  String identity = commandBody.getIdentity();
  NodeType nodeType = NodeType.valueOf(commandBody.getNodeType());
  // 1. 将 channel 纳入管理中(不存在就加入)
  appContext.getChannelManager().offerChannel(new ChannelWrapper(channel, nodeType, nodeGroup, identity));
}
origin: ltsopensource/light-task-scheduler

  @Override
  public List<NodeGroupPo> handle(ResultSet rs) throws SQLException {
    List<NodeGroupPo> list = new ArrayList<NodeGroupPo>();
    while (rs.next()) {
      NodeGroupPo nodeGroupPo = new NodeGroupPo();
      nodeGroupPo.setNodeType(NodeType.valueOf(rs.getString("node_type")));
      nodeGroupPo.setName(rs.getString("name"));
      nodeGroupPo.setGmtCreated(rs.getLong("gmt_created"));
      list.add(nodeGroupPo);
    }
    return list;
  }
};
origin: ltsopensource/light-task-scheduler

Node node = new Node();
String[] nodeDir = fullPath.split("/");
NodeType nodeType = NodeType.valueOf(nodeDir[4]);
node.setNodeType(nodeType);
String url = nodeDir[5];
com.github.ltsopensource.core.clusterNodeTypevalueOf

Popular methods of NodeType

  • equals
  • name
  • hashCode
  • convert

Popular classes and methods

  • getApplicationContext (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • getContentResolver (Context)
  • Rectangle (java.awt)
  • File (java.io)
    LocalStorage based File implementation for GWT. Should probably have used Harmony as a starting poin
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • JList (javax.swing)

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)