@InterfaceAudience.Private public abstract class ProcedureStoreBase extends Object implements ProcedureStore
ProcedureStore
s.ProcedureStore.ProcedureIterator, ProcedureStore.ProcedureLoader, ProcedureStore.ProcedureStoreListener
Modifier and Type | Field and Description |
---|---|
private CopyOnWriteArrayList<ProcedureStore.ProcedureStoreListener> |
listeners |
private AtomicBoolean |
running |
Constructor and Description |
---|
ProcedureStoreBase() |
Modifier and Type | Method and Description |
---|---|
boolean |
isRunning() |
void |
registerListener(ProcedureStore.ProcedureStoreListener listener)
Add the listener to the notification list.
|
protected void |
sendAbortProcessSignal() |
protected void |
sendForceUpdateSignal(long[] procIds) |
protected void |
sendPostSyncSignal() |
protected boolean |
setRunning(boolean isRunning)
Change the state to 'isRunning',
returns true if the store state was changed,
false if the store was already in that state.
|
boolean |
unregisterListener(ProcedureStore.ProcedureStoreListener listener)
Remove the listener from the notification list.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cleanup, delete, delete, delete, getNumThreads, insert, insert, load, recoverLease, setRunningProcedureCount, start, stop, update
private final CopyOnWriteArrayList<ProcedureStore.ProcedureStoreListener> listeners
private final AtomicBoolean running
public ProcedureStoreBase()
protected boolean setRunning(boolean isRunning)
isRunning
- the state to set.public boolean isRunning()
isRunning
in interface ProcedureStore
public void registerListener(ProcedureStore.ProcedureStoreListener listener)
ProcedureStore
registerListener
in interface ProcedureStore
listener
- The AssignmentListener to registerpublic boolean unregisterListener(ProcedureStore.ProcedureStoreListener listener)
ProcedureStore
unregisterListener
in interface ProcedureStore
listener
- The AssignmentListener to unregisterprotected final void sendPostSyncSignal()
protected final void sendAbortProcessSignal()
protected final void sendForceUpdateSignal(long[] procIds)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.