コード例 #1
0
 /** @see {@link #newStartEffector()} */
 public Effector<Void> newStopEffector() {
   return Effectors.effector(Startable.STOP)
       .parameter(StopSoftwareParameters.STOP_PROCESS_MODE)
       .parameter(StopSoftwareParameters.STOP_MACHINE_MODE)
       .impl(newStopEffectorTask())
       .build();
 }
コード例 #2
0
 /** @see {@link #newStartEffector()} */
 public Effector<Void> newRestartEffector() {
   return Effectors.effector(Startable.RESTART)
       .parameter(RestartSoftwareParameters.RESTART_CHILDREN)
       .parameter(RestartSoftwareParameters.RESTART_MACHINE)
       .impl(newRestartEffectorTask())
       .build();
 }
コード例 #3
0
 /** @see {@link #newStartEffector()} */
 public Effector<Void> newSuspendEffector() {
   return Effectors.effector(Void.class, "suspend")
       .description("Suspend the process/service represented by an entity")
       .parameter(StopSoftwareParameters.STOP_PROCESS_MODE)
       .parameter(StopSoftwareParameters.STOP_MACHINE_MODE)
       .impl(newSuspendEffectorTask())
       .build();
 }
コード例 #4
0
 interface SelectMasterEffector {
   ConfigKey<String> NEW_MASTER_ID =
       ConfigKeys.newStringConfigKey(
           "brooklyncluster.new_master_id", "The ID of the node to become master", null);
   Effector<Void> SELECT_MASTER =
       Effectors.effector(Void.class, "selectMaster")
           .description("Select a new master in the cluster")
           .parameter(NEW_MASTER_ID)
           .buildAbstract();
 }
コード例 #5
0
  interface UpgradeClusterEffector {
    ConfigKey<String> DOWNLOAD_URL = BrooklynNode.DOWNLOAD_URL.getConfigKey();
    ConfigKey<Map<String, Object>> EXTRA_CONFIG = BrooklynNodeUpgradeEffectorBody.EXTRA_CONFIG;

    Effector<Void> UPGRADE_CLUSTER =
        Effectors.effector(Void.class, "upgradeCluster")
            .description(
                "Upgrade the cluster with new distribution version, "
                    + "by provisioning new nodes with the new version, failing over, "
                    + "and then deprovisioning the original nodes")
            .parameter(BrooklynNode.SUGGESTED_VERSION)
            .parameter(DOWNLOAD_URL)
            .parameter(EXTRA_CONFIG)
            .buildAbstract();
  }
コード例 #6
0
 /**
  * Return an effector suitable for setting in a {@code public static final} or attaching
  * dynamically.
  *
  * <p>The effector overrides the corresponding effector from {@link Startable} with the behaviour
  * in this lifecycle class instance.
  */
 public Effector<Void> newStartEffector() {
   return Effectors.effector(Startable.START).impl(newStartEffectorTask()).build();
 }