Package fr.gouv.vitam.worker.core.impl
Class WorkspaceBatchRunner
- java.lang.Object
-
- fr.gouv.vitam.worker.core.impl.WorkspaceBatchRunner
-
- All Implemented Interfaces:
java.lang.Runnable
public class WorkspaceBatchRunner extends java.lang.Object implements java.lang.RunnableThis task is responsible of sending files to the workspace
-
-
Constructor Summary
Constructors Constructor Description WorkspaceBatchRunner(HandlerIO handlerAsyncIO, java.util.concurrent.Executor executor, int queueSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidjoin()Wait end of workspace batch this method may be called only oncevoidrun()voidstart()Start the workspace batch This method should be called only oncevoidtransfer(WorkspaceQueue workspaceQueue)Enqueue element to be transferred to the workspace
-
-
-
Constructor Detail
-
WorkspaceBatchRunner
public WorkspaceBatchRunner(HandlerIO handlerAsyncIO, java.util.concurrent.Executor executor, int queueSize)
-
-
Method Detail
-
run
public void run()
- Specified by:
runin interfacejava.lang.Runnable
-
transfer
public void transfer(WorkspaceQueue workspaceQueue) throws WorkerspaceQueueException
Enqueue element to be transferred to the workspace- Parameters:
workspaceQueue-- Throws:
ProcessingExceptionWorkerspaceQueueException
-
start
public void start() throws WorkerspaceQueueExceptionStart the workspace batch This method should be called only once- Throws:
WorkerspaceQueueException
-
join
public void join() throws WorkerspaceQueueExceptionWait end of workspace batch this method may be called only once- Throws:
WorkerspaceQueueException
-
-