示例#1
0
  /**
   * @param taskNodeId Task node ID.
   * @param taskName Task name.
   * @param dep Deployment.
   * @param taskClsName Task class name.
   * @param sesId Task session ID.
   * @param startTime Task execution start time.
   * @param endTime Task execution end time.
   * @param siblings Collection of siblings.
   * @param attrs Session attributes.
   * @param ctx Grid Kernal Context.
   */
  public GridTaskSessionImpl(
      UUID taskNodeId,
      String taskName,
      @Nullable GridDeployment dep,
      String taskClsName,
      GridUuid sesId,
      long startTime,
      long endTime,
      Collection<GridJobSibling> siblings,
      Map<Object, Object> attrs,
      GridKernalContext ctx) {
    assert taskNodeId != null;
    assert taskName != null;
    assert sesId != null;
    assert attrs != null;
    assert ctx != null;

    this.taskNodeId = taskNodeId;
    this.taskName = taskName;
    this.dep = dep;

    // Note that class name might be null here if task was not explicitly
    // deployed.
    this.taskClsName = taskClsName;
    this.sesId = sesId;
    this.startTime = startTime;
    this.endTime = endTime;
    this.siblings = siblings != null ? Collections.unmodifiableCollection(siblings) : null;
    this.ctx = ctx;

    this.attrs.putAll(attrs);
  }
示例#2
0
  /** @param siblings Siblings. */
  public void addJobSiblings(Collection<GridJobSibling> siblings) {
    assert isTaskNode();

    synchronized (mux) {
      Collection<GridJobSibling> tmp = new ArrayList<GridJobSibling>(this.siblings);

      tmp.addAll(siblings);

      this.siblings = Collections.unmodifiableCollection(tmp);
    }
  }
 /** {@inheritDoc} */
 @Override
 public Collection<String> getExcludePaths() {
   return Collections.unmodifiableCollection(excludePaths);
 }
示例#4
0
 /** @param siblings Siblings. */
 public void setJobSiblings(Collection<GridJobSibling> siblings) {
   synchronized (mux) {
     this.siblings = Collections.unmodifiableCollection(siblings);
   }
 }
 /**
  * Collection of {@code 'host:port'} pairs representing remote grid servers used to establish
  * initial connection to the grid. Once connection is established, Ignite will get a full view on
  * grid topology and will be able to connect to any available remote node.
  *
  * <p>Note that only these addresses are used to perform topology updates in background and to
  * detect Grid connectivity status.
  *
  * @return Collection of {@code 'host:port'} pairs representing remote grid servers.
  * @see GridClient#connected()
  */
 public Collection<String> getServers() {
   return Collections.unmodifiableCollection(srvs);
 }