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>
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
Constructors Constructor Description WrappingOperation(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(org.eclipse.core.runtime.IProgressMonitor progressMonitor)Runnablefinish()Finishes the operation.ObjectgetHandle()Gets the handle of the associated operationOperationTypegetType()Gets the type of the operationbooleanisFinished()Checks if the operation is finihed alreadybooleanisStarted()Checks if the operation is already started by the enginevoidsetAsyncEventScheduler(Runnable asyncEventScheduler)Sets the scheduler process of the async.voidsetHandle(Object handle)Sets 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.StringtoString()
-
-
-
Constructor Detail
-
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 Detail
-
accept
public void accept(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
-
finish
public Runnable 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
public Object getHandle()
Gets the handle of the associated operation- Returns:
- The handle of the operation. May be
nullif the operation isn't scheduled yet
-
getType
public OperationType 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
public void 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 code- Parameters:
asyncEventScheduler- The async event sending sheduler. May not benull
-
setHandle
public void setHandle(Object handle)
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
public void setImplicitWaitingContext(Collection<IObjectDerivedDataContext> waitingScope)
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
-
-