@InterfaceAudience.Private @InterfaceStability.Evolving public interface ProcedureStore
Modifier and Type | Interface and Description |
---|---|
static interface |
ProcedureStore.ProcedureIterator
An Iterator over a collection of Procedure
|
static interface |
ProcedureStore.ProcedureLoader
Interface passed to the ProcedureStore.load() method to handle the store-load events.
|
static interface |
ProcedureStore.ProcedureStoreListener
Store listener interface.
|
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<?> parentProc,
long[] subProcIds)
The parent procedure completed.
|
int |
getNumThreads() |
void |
insert(Procedure<?>[] procs)
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.
|
boolean |
isRunning() |
void |
load(ProcedureStore.ProcedureLoader loader)
Load the Procedures in the store.
|
void |
recoverLease()
Acquire the lease for the procedure store.
|
void |
registerListener(ProcedureStore.ProcedureStoreListener listener)
Add the listener to the notification list.
|
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
|
boolean |
unregisterListener(ProcedureStore.ProcedureStoreListener listener)
Remove the listener from the notification list.
|
void |
update(Procedure<?> proc)
The specified procedure was executed,
and the new state should be written to the store.
|
void registerListener(ProcedureStore.ProcedureStoreListener listener)
listener
- The AssignmentListener to registerboolean unregisterListener(ProcedureStore.ProcedureStoreListener listener)
listener
- The AssignmentListener to unregistervoid start(int numThreads) throws IOException
numThreads
- number of threads to be used by the procedure storeIOException
void stop(boolean abort)
abort
- true if the stop is an abortboolean isRunning()
int getNumThreads()
int setRunningProcedureCount(int count)
count
).void recoverLease() throws IOException
IOException
void load(ProcedureStore.ProcedureLoader loader) throws IOException
loader
- the ProcedureLoader that will handle the store-load eventsIOException
void insert(Procedure<?> proc, Procedure<?>[] subprocs)
proc
- the procedure to serialize and write to the store.subprocs
- the newly created child of the proc.void insert(Procedure<?>[] procs)
procs
- the procedures to serialize and write to the store.void update(Procedure<?> proc)
proc
- the procedure to serialize and write to the store.void delete(long procId)
procId
- the ID of the procedure to remove.void delete(Procedure<?> parentProc, long[] subProcIds)
parentProc
- the parent procedure to serialize and write to the store.subProcIds
- the IDs of the sub-procedure to remove.void delete(long[] procIds, int offset, int count)
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.