Package com._1c.g5.v8.derived.operations
Class WrappingOperation
java.lang.Object
com._1c.g5.v8.derived.operations.WrappingOperation
- All Implemented Interfaces:
Consumer<org.eclipse.core.runtime.IProgressMonitor>
- Direct Known Subclasses:
BmAutoWrappingOperation
public class WrappingOperation
extends Object
implements Consumer<org.eclipse.core.runtime.IProgressMonitor>
Special operation which allow to create inline operation boundaries in the code directly. The operation finish is controlled
via the code itself.
-
Constructor Summary
ConstructorsConstructorDescriptionWrappingOperation
(Consumer<Object> operation, OperationType type, String name, boolean implicitDerivedDataWait, IDerivedDataManager derivedDataManager) Constructs an operationWrappingOperation
(Consumer<Object> operation, OperationType type, String name, IDerivedDataManager derivedDataManager) Constructs an operation -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(org.eclipse.core.runtime.IProgressMonitor progressMonitor) finish()
Finishes the operation.Gets the handle of the associated operationgetType()
Gets the type of the operationboolean
Checks if the operation is finihed alreadyboolean
Checks if the operation is already started by the enginevoid
setAsyncEventScheduler
(Runnable asyncEventScheduler) Sets the scheduler process of the async. event sending to the wrapping operation This method is called by the DD engine and shouldn't be called in the client codevoid
Sets the operation handle This method is called by the DD engine and shouldn't be called in the client codevoid
setImplicitWaitingContext
(Collection<IObjectDerivedDataContext> waitingScope) Sets the context of data being changed within this operation to wait in on the exit from the operation.toString()
-
Constructor Details
-
WrappingOperation
public WrappingOperation(Consumer<Object> operation, OperationType type, String name, boolean implicitDerivedDataWait, IDerivedDataManager derivedDataManager) Constructs an operation- Parameters:
operation
- The operation executable. It's called after the operation's start is confirmed by the system. May not benull
type
- the type of the operation. May not benull
name
- The name of the operation. May not benull
implicitDerivedDataWait
- Perform an implicit wait of thederivedDataManager
- The reference to the correspondingIDerivedDataManager
. May not benull
-
WrappingOperation
public WrappingOperation(Consumer<Object> operation, OperationType type, String name, IDerivedDataManager derivedDataManager) Constructs an operation- Parameters:
operation
- The operation executable. It's called after the operation's start is confirmed by the system. May not benull
type
- The type of the operation. May not benull
name
- The name of the operation. May not benull
derivedDataManager
- The reference to the correspondingIDerivedDataManager
. May not benull
-
-
Method Details
-
accept
public void accept(org.eclipse.core.runtime.IProgressMonitor progressMonitor) -
finish
Finishes the operation. If necessary - waits for an async. data that are related to BM task being executed inside the operation- Returns:
- Post-finish actions, may not be
null
-
getHandle
Gets the handle of the associated operation- Returns:
- The handle of the operation. May be
null
if the operation isn't scheduled yet
-
getType
Gets the type of the operation- Returns:
- The type of the operation. May not be
null
-
isFinished
public boolean isFinished()Checks if the operation is finihed already- Returns:
- True if the operation is finished
-
isStarted
public boolean isStarted()Checks if the operation is already started by the engine- Returns:
- True if the operation is started
-
setAsyncEventScheduler
Sets the scheduler process of the async. event sending to the wrapping operation This method is called by the DD engine and shouldn't be called in the client code- Parameters:
asyncEventScheduler
- The async event sending sheduler. May not benull
-
setHandle
Sets the operation handle This method is called by the DD engine and shouldn't be called in the client code- Parameters:
handle
- The handle to set. May not benull
-
setImplicitWaitingContext
Sets the context of data being changed within this operation to wait in on the exit from the operation. This method is called by the DD engine and shouldn't be called in the client code- Parameters:
waitingScope
- The scope to wait. May not benull
-
toString
-