public class FeederManager extends StoppableThread
Modifier and Type | Class and Description |
---|---|
(package private) class |
FeederManager.Lease
Provides the lease mechanism used to maintain a handle to the DbBackup
object across Server client disconnects.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FEEDER_SERVICE |
(package private) java.util.Map<java.lang.Integer,LogFileFeeder> |
feeders |
(package private) long |
leaseDuration |
int |
leaseRenewalCount |
(package private) java.util.Map<java.lang.Integer,FeederManager.Lease> |
leases |
(package private) java.util.Timer |
leaseTimer |
(package private) java.util.logging.Logger |
logger |
(package private) NameIdPair |
nameIdPair |
(package private) ServiceDispatcher |
serviceDispatcher |
(package private) java.util.concurrent.atomic.AtomicBoolean |
shutdown |
(package private) java.util.Map<java.lang.String,Protocol.FileInfoResp> |
statResponses |
envImpl
Constructor and Description |
---|
FeederManager(ServiceDispatcher serviceDispatcher,
EnvironmentImpl envImpl,
NameIdPair nameIdPair)
Creates a FeederManager but does not start it.
|
Modifier and Type | Method and Description |
---|---|
int |
getActiveFeederCount()
Returns the number of feeders that are currently active with this node.
|
(package private) EnvironmentImpl |
getEnvImpl() |
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 java.util.logging.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, isShutdown, saveShutdownException, setExceptionListener, shutdownDone, shutdownThread
activeCount, 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, yield
final java.util.Map<java.lang.Integer,LogFileFeeder> feeders
final java.util.Map<java.lang.Integer,FeederManager.Lease> leases
final java.util.Map<java.lang.String,Protocol.FileInfoResp> statResponses
final java.util.Timer leaseTimer
final NameIdPair nameIdPair
public int leaseRenewalCount
long leaseDuration
final ServiceDispatcher serviceDispatcher
final java.util.concurrent.atomic.AtomicBoolean shutdown
final java.util.logging.Logger logger
public static final java.lang.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 filesEnvironmentImpl getEnvImpl()
public int getLeaseRenewalCount()
public int getLeaseCount()
public int getActiveFeederCount()
public long getLeaseDuration()
public void setLeaseDuration(long leaseDuration)
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void shutdown()
protected int initiateSoftShutdown()
StoppableThread
initiateSoftShutdown
in class StoppableThread
protected java.util.logging.Logger getLogger()
getLogger
in class StoppableThread
StoppableThread.getLogger()
Copyright (c) 2004-2012 Oracle. All rights reserved.