public abstract class Discovery extends Object implements ReadyRunnable
Modifier and Type | Field and Description |
---|---|
protected long |
m_initial_sleep_time |
protected EnhancedLinkd |
m_linkd |
protected long |
m_poll_interval
The interval, default value 30 minutes
|
protected boolean |
m_suspendCollection
The initial sleep time, default value 5 minutes
|
Constructor and Description |
---|
Discovery(EnhancedLinkd linkd,
long interval,
long initial)
Constructs a new SNMP collector for a node using the passed interface
as the collection point.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getInfo()
getInfo
|
long |
getInitialSleepTime()
getInitialSleepTime
|
abstract String |
getName() |
long |
getPollInterval()
getPollInterval
|
Scheduler |
getScheduler()
getScheduler
|
int |
hashCode() |
boolean |
isReady()
isReady
|
boolean |
isSuspended()
isSuspended
|
void |
reschedule() |
void |
run() |
abstract void |
runDiscovery() |
void |
schedule()
schedule
|
protected void |
sendCompletedEvent(int nodeid) |
protected void |
sendStartEvent(int nodeid) |
protected void |
sendSuspendedEvent(int nodeid) |
void |
setInitialSleepTime(long initial_sleep_time)
setInitialSleepTime
|
void |
setPollInterval(long interval)
setPollInterval
|
void |
setScheduler(Scheduler scheduler)
setScheduler
|
void |
suspend()
suspend
|
void |
unschedule()
unschedule
|
void |
wakeUp()
wakeUp
|
protected long m_poll_interval
protected long m_initial_sleep_time
protected boolean m_suspendCollection
protected final EnhancedLinkd m_linkd
public Discovery(EnhancedLinkd linkd, long interval, long initial)
run
method is invoked.nodeid
- config
- The SnmpPeer object to collect from.public abstract String getName()
public abstract void runDiscovery()
public void setScheduler(Scheduler scheduler)
setScheduler
scheduler
- a Scheduler
object.public void schedule()
schedule
schedule
in interface ReadyRunnable
public void unschedule()
unschedule
unschedule
in interface ReadyRunnable
public void reschedule()
public boolean isReady()
isReady
isReady
in interface ReadyRunnable
public boolean isSuspended()
isSuspended
isSuspended
in interface ReadyRunnable
public void suspend()
suspend
suspend
in interface ReadyRunnable
public void wakeUp()
wakeUp
wakeUp
in interface ReadyRunnable
public String getInfo()
getInfo
getInfo
in interface ReadyRunnable
String
object.public long getPollInterval()
getPollInterval
public void setPollInterval(long interval)
setPollInterval
interval
- a long.public long getInitialSleepTime()
getInitialSleepTime
public void setInitialSleepTime(long initial_sleep_time)
setInitialSleepTime
initial_sleep_time
- The initial_sleep_timeto set.protected void sendSuspendedEvent(int nodeid)
protected void sendStartEvent(int nodeid)
protected void sendCompletedEvent(int nodeid)
Copyright © 2019. All rights reserved.