@InterfaceAudience.Private public class NoopProcedureStore extends ProcedureStoreBase
ProcedureStore.ProcedureIterator, ProcedureStore.ProcedureLoader, ProcedureStore.ProcedureStoreListener
Modifier and Type | Field and Description |
---|---|
private int |
numThreads |
Constructor and Description |
---|
NoopProcedureStore() |
Modifier and Type | Method and Description |
---|---|
void |
delete(long procId)
The specified procId was removed from the executor, due to completion, abort or failure.
|
void |
delete(long[] procIds,
int offset,
int count)
The specified procIds were removed from the executor, due to completion, abort or failure.
|
void |
delete(Procedure<?> proc,
long[] subprocs)
The parent procedure completed.
|
int |
getNumThreads()
Returns the number of threads/slots passed to start()
|
void |
insert(Procedure<?>[] proc)
Serialize a set of new procedures.
|
void |
insert(Procedure<?> proc,
Procedure<?>[] subprocs)
When a procedure is submitted to the executor insert(proc, null) will be called.
|
void |
load(ProcedureStore.ProcedureLoader loader)
Load the Procedures in the store.
|
void |
recoverLease()
Acquire the lease for the procedure store.
|
int |
setRunningProcedureCount(int count)
Set the number of procedure running.
|
void |
start(int numThreads)
Start/Open the procedure store
|
void |
stop(boolean abort)
Stop/Close the procedure store
|
void |
update(Procedure<?> proc)
The specified procedure was executed, and the new state should be written to the store.
|
isRunning, registerListener, sendAbortProcessSignal, sendForceUpdateSignal, sendPostSyncSignal, setRunning, unregisterListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cleanup
private int numThreads
public NoopProcedureStore()
public void start(int numThreads) throws IOException
ProcedureStore
numThreads
- number of threads to be used by the procedure storeIOException
public void stop(boolean abort)
ProcedureStore
abort
- true if the stop is an abortpublic void recoverLease() throws IOException
ProcedureStore
IOException
public int getNumThreads()
ProcedureStore
public int setRunningProcedureCount(int count)
ProcedureStore
count
).public void load(ProcedureStore.ProcedureLoader loader) throws IOException
ProcedureStore
loader
- the ProcedureLoader that will handle the store-load eventsIOException
public void insert(Procedure<?> proc, Procedure<?>[] subprocs)
ProcedureStore
proc
- the procedure to serialize and write to the store.subprocs
- the newly created child of the proc.public void insert(Procedure<?>[] proc)
ProcedureStore
proc
- the procedures to serialize and write to the store.public void update(Procedure<?> proc)
ProcedureStore
proc
- the procedure to serialize and write to the store.public void delete(long procId)
ProcedureStore
procId
- the ID of the procedure to remove.public void delete(Procedure<?> proc, long[] subprocs)
ProcedureStore
proc
- the parent procedure to serialize and write to the store.subprocs
- the IDs of the sub-procedure to remove.public void delete(long[] procIds, int offset, int count)
ProcedureStore
procIds
- the IDs of the procedures to remove.offset
- the array offset from where to start to deletecount
- the number of IDs to deleteCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.