public class FeederManager extends StoppableThread
Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
static String |
FEEDER_SERVICE |
int |
leaseRenewalCount |
envImplMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
FeederManager(ServiceDispatcher serviceDispatcher,
EnvironmentImpl envImpl,
NameIdPair nameIdPair)
Creates a FeederManager but does not start it.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearedCachedFileChecksum(String fileName)
Clears the cached checksum for a file when it may be overwritten
(e.g., entries may be erased).
|
int |
getActiveFeederCount()
Returns the number of feeders that are currently active with this node.
|
int |
getLeaseCount()
Returns the number of leases that are currently outstanding.
|
long |
getLeaseDuration() |
int |
getLeaseRenewalCount()
Returns the number of times the lease was actually renewed.
|
protected Logger |
getLogger() |
protected int |
initiateSoftShutdown()
Threads that use shutdownThread() must define this method.
|
void |
run()
The dispatcher method that starts up new log file feeders.
|
void |
setLeaseDuration(long leaseDuration) |
void |
shutdown() |
cleanup, getSavedShutdownException, getTotalCpuTime, getTotalUserTime, handleUncaughtException, isShutdown, saveShutdownException, shutdownDone, shutdownThreadactiveCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic int leaseRenewalCount
public static final String FEEDER_SERVICE
public FeederManager(ServiceDispatcher serviceDispatcher, EnvironmentImpl envImpl, NameIdPair nameIdPair)
serviceDispatcher - The service dispatcher with which the
FeederManager must register itself. It's null only in a test
environment.nameIdPair - The node name and id associated with the feederenvImpl - the environment that will provide the log filespublic int getLeaseRenewalCount()
public int getLeaseCount()
public int getActiveFeederCount()
public long getLeaseDuration()
public void setLeaseDuration(long leaseDuration)
public void clearedCachedFileChecksum(String fileName)
public void run()
public void shutdown()
protected int initiateSoftShutdown()
StoppableThreadinitiateSoftShutdown in class StoppableThreadprotected Logger getLogger()
getLogger in class StoppableThreadStoppableThread.getLogger()Copyright © 2024. All rights reserved.