Annotation Type ExecuteOn


  • @Retention(RUNTIME)
    @Documented
    @Target(TYPE)
    public @interface ExecuteOn
    Annotation to qualify when an action like a command is targeted to be run on a cluster or a set of instances. Some actions may run only on DAS, or only on instances, by default they run on both the DAS and the instances.
    Author:
    Jerome Dochez
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      Class<? extends ClusterExecutor> executor
      Identifies the ClusterExecutor that is responsible for remotely executing commands on the target clusters or instances.
      FailurePolicy ifFailure
      Identifies the expected behavior from the framework if any of the clustered invocation failed.
      FailurePolicy ifNeverStarted
      Identifies the expected behavior from the framework if any of the clustered invocation could not be invoked because the remote server has never been started.
      FailurePolicy ifOffline
      Identifies the expected behaviour from the framework if any of the clustered invocation could not be invoked because the remote server was offline.
      RuntimeType[] value
      Returns an array of process types on which the annotated action should run
    • Element Detail

      • value

        RuntimeType[] value
        Returns an array of process types on which the annotated action should run
        Returns:
        array of target process types
        Default:
        {org.glassfish.api.admin.RuntimeType.DAS, org.glassfish.api.admin.RuntimeType.INSTANCE}
      • executor

        Class<? extends ClusterExecutor> executor
        Identifies the ClusterExecutor that is responsible for remotely executing commands on the target clusters or instances. The provider will be looked up in the habitat by its type.
        Returns:
        a ClusterExecutor type or null to use the default executor that takes the "target" command parameter to
        Default:
        org.glassfish.api.admin.TargetBasedExecutor.class
      • ifOffline

        FailurePolicy ifOffline
        Identifies the expected behaviour from the framework if any of the clustered invocation could not be invoked because the remote server was offline.
        Returns:
        the action the framework should perform if any of the remote invocation of this command cannot be executed due to the server being offline.
        Default:
        org.glassfish.api.admin.FailurePolicy.Warn
      • ifNeverStarted

        FailurePolicy ifNeverStarted
        Identifies the expected behavior from the framework if any of the clustered invocation could not be invoked because the remote server has never been started.
        Returns:
        the action the framework should perform if any of the remote invocation of this command cannot be executed due to the server being offline.
        Default:
        org.glassfish.api.admin.FailurePolicy.Ignore
      • ifFailure

        FailurePolicy ifFailure
        Identifies the expected behavior from the framework if any of the clustered invocation failed.
        Returns:
        the action the framework should perform if any of the remote invocation of this command fails.
        Default:
        org.glassfish.api.admin.FailurePolicy.Error