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 TypeMethodDescriptionvoidaccept(org.eclipse.core.runtime.IProgressMonitor progressMonitor) finish()Finishes the operation.Gets the handle of the associated operationgetType()Gets the type of the operationbooleanChecks if the operation is finihed alreadybooleanChecks if the operation is already started by the enginevoidsetAsyncEventScheduler(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 codevoidSets the operation handle This method is called by the DD engine and shouldn't be called in the client codevoidsetImplicitWaitingContext(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 benulltype- the type of the operation. May not benullname- The name of the operation. May not benullimplicitDerivedDataWait- 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 benulltype- The type of the operation. May not benullname- The name of the operation. May not benullderivedDataManager- 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
nullif 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
-