/** {@inheritDoc} */
    @Override
    public void onDeployed(Class<?> cls) {
      assert !Thread.holdsLock(mux);

      boolean isTask = isTask(cls);

      String msg =
          (isTask ? "Task" : "Class") + " was deployed in SHARED or CONTINUOUS mode: " + cls;

      int type = isTask ? EVT_TASK_DEPLOYED : EVT_CLASS_DEPLOYED;

      if (ctx.event().isRecordable(type)) {
        GridDeploymentEvent evt = new GridDeploymentEvent();

        evt.nodeId(ctx.localNodeId());
        evt.message(msg);
        evt.type(type);
        evt.alias(cls.getName());

        ctx.event().record(evt);
      }

      if (log.isInfoEnabled()) log.info(msg);
    }
コード例 #2
0
 /**
  * Sets type.
  *
  * @param cls Type class.
  */
 public void setType(Class<?> cls) {
   setType(cls.getName());
 }