Class OperationContext

    • Constructor Detail

      • OperationContext

        public OperationContext​(String segmentId,
                                OperationType operationType,
                                boolean important,
                                Consumer<org.eclipse.core.runtime.IProgressMonitor> operation)
        Constructs an instance of the operation
        Parameters:
        segmentId - The target pipeline segment identifier. May not be null
        operationType - The operation type. May not be null
        operation - The executable part of the operation. May not be null
    • Method Detail

      • clear

        public void clear()
        Description copied from interface: IObjectDerivedDataContext
        Clears the context. Implemenentations aren't required to be safe, the thread safety during the snapshot creation is supported by the DD context management facilities (due to complexity and performance reasons).
        Specified by:
        clear in interface IObjectDerivedDataContext
      • getBaseVersion

        public long getBaseVersion()
        Description copied from interface: IObjectDerivedDataContext
        Gets the base version of the context. The base version is used during the conflict resolution phase. In case if context computation task is started for the particular version, any updates of the context wiil result in cancelling of the computed results.
        Specified by:
        getBaseVersion in interface IObjectDerivedDataContext
        Returns:
        The base version of the context.
      • getOperation

        public Consumer<org.eclipse.core.runtime.IProgressMonitor> getOperation()
        Gets the operation executable
        Returns:
        The operation executable. May not be null
      • getOperationType

        public OperationType getOperationType()
        Gets the associated operation type
        Returns:
        The type of the operation. May not be null
      • getSnapshot

        public IObjectDerivedDataContext getSnapshot()
        Description copied from interface: IObjectDerivedDataContext
        Gets the snapshot of the context. Implemenentations aren't required to be safe, the thread safety during the snapshot creation is supported by the DD context management facilities (due to complexity and performance reasons).
        Specified by:
        getSnapshot in interface IObjectDerivedDataContext
        Returns:
        The current snapshot of the context state.
      • getVersion

        public long getVersion()
        Description copied from interface: IObjectDerivedDataContext
        Gets the current version of the context. The version is defined during the snapshotting of the context. The verison is used during the context merge process to update the base version.
        Specified by:
        getVersion in interface IObjectDerivedDataContext
        Returns:
        The version of the context.
      • isRemoval

        public boolean isRemoval()
        Description copied from interface: IObjectDerivedDataContext
        Checks if the current context represents removed object.
        Specified by:
        isRemoval in interface IObjectDerivedDataContext
        Returns:
        True if the context was collected for the removed object; false otherwise.
      • isModal

        public boolean isModal()
        Checks if this operation is modal one.
        Returns:
        True if the operation is modal. False otherwise
      • getModalOperationController

        public IModalOperationController getModalOperationController()
        Gets the modal operation controller for the modal operation (if any)
        Returns:
        The modal operation controller. May be null
      • isImportant

        public boolean isImportant()
        Checks if the operation is important one. The system waits all important tasks to finish before the closure of the project context
        Returns:
        True if the operation is important