Interface InstanceStatus


  • public interface InstanceStatus
    The instance status interface provides access to all instance specific status information. This e.g. includes if the instance is allowed to be migrated or executed.
    Author:
    Kevin Goeser
    • Method Detail

      • getInstanceID

        UUID getInstanceID()
        Returns the (logical) ID of the instance, this status object belongs to.
        Returns:
        The (logical) ID of the instance of this status.
      • getMigrationStatus

        ProcessConstants.InstanceMigrationStatus getMigrationStatus()
        Returns the migration status of the instance. The instance can be migratable, migrating or not migratable.
        Returns:
        The migration status.
      • getMigrationStatusDate

        long getMigrationStatusDate()
        Gets the date (as long) the current instance migration status has been set. A negative value indicates that no migration has taken place yet.
        Returns:
        The date (as long) the current instance migration status has been set.
      • getMigrationStatusComment

        String getMigrationStatusComment()
        Returns the comment set for the current migration status.
        Returns:
        The comment set for the current migration status or null if not set.
      • getExecutionStatus

        ProcessConstants.InstanceExecutionStatus getExecutionStatus()
        Returns the execution status of the instance. An instance can be running, suspended, aborted or finished.
        Returns:
        The execution status.
      • getExecutionStatusDate

        long getExecutionStatusDate()
        Gets the date (as long) the current instance execution status has been set.
        Returns:
        The date (as long) the current instance execution status has been set.
      • getExecutionStatusComment

        String getExecutionStatusComment()
        Returns the comment set for the current execution status.
        Returns:
        The comment set for the current execution status or null if not set.
      • setMigrationStatus

        void setMigrationStatus​(ProcessConstants.InstanceMigrationStatus migrationStatus,
                                String comment)
        Set the migration status of the instance. The instance can be migrateable, migrating or not migrateable.
        Parameters:
        migrationStatus - The migration status to be set.
        comment - The comment for the status to be set. The comment will override the former comment. The parameter may be null.
      • setExecutionStatus

        void setExecutionStatus​(ProcessConstants.InstanceExecutionStatus executionStatus,
                                String comment)
        Set the execution status of the instance. An instance can be running, suspended, aborted or finished.

        The different execution states have also influence onto the other state indicators. For example the execution state 'aborted' implies that the instance cannot be changed any more. So the instance status flag that indicates if the instance may be changed must reflect this state after the instance has taken up the execution state 'aborted'.

        This method ensures that all the instance state flags are adapted accordingly depending on the execution state to take up.

        Parameters:
        executionStatus - The execution status to be set.
        comment - The comment for the status to be set. The comment will override the former comment. The parameter may be null.