|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.archive.hcc.ClusterControllerBean
public class ClusterControllerBean
As the main workhorse of the package, the ClusterControllerBean
provides a unified view of any number of Heritrix instances and all related
objects within a JNDI scope.
Constructor Summary | |
---|---|
ClusterControllerBean()
Creates a cluster controller bean. |
Method Summary | |
---|---|
protected javax.management.ObjectName |
addCrawler(javax.management.ObjectName newCrawler)
|
void |
addNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
|
protected void |
attachMBeanServerDelegateNotificationListener(java.net.InetSocketAddress address,
javax.management.NotificationListener listener)
Attaches a notification listener to the remote mbean server delegate at the specified address.. |
javax.management.ObjectName |
createCrawler()
Creates a new crawler on the least loaded machine on the cluster. |
protected void |
dereferenceContainer(Container c)
Unhooks container from the bus. |
void |
destroy()
Disconnects the cluster controller from the network. |
void |
destroyAllCrawlers()
|
protected boolean |
equals(javax.management.ObjectName a,
javax.management.ObjectName b,
java.lang.String key)
|
javax.management.ObjectName |
findCrawlServiceJobParent(java.lang.String jobUid,
java.lang.String host,
java.lang.Integer port)
|
java.lang.Object |
getAttribute(java.lang.String attribute)
|
javax.management.AttributeList |
getAttributes(java.lang.String[] attributes)
|
javax.management.ObjectName |
getCurrentCrawlJob(javax.management.ObjectName mother)
Returns the current job object name associated with the specified crawler. |
int |
getMaxInstances(java.lang.String hostname,
java.lang.Integer port)
Returns the maximum number of instances allowed for this container. |
javax.management.MBeanInfo |
getMBeanInfo()
|
javax.management.MBeanNotificationInfo[] |
getNotificationInfo()
|
java.lang.Integer |
getTotalCrawlerCount()
|
protected void |
handleContainerRemoved(javax.management.ObjectName name)
|
protected void |
handleCrawlerCreated(javax.management.ObjectName newCrawler)
|
protected void |
handleCrawlerRemoved(javax.management.ObjectName name)
|
protected void |
handleJobAdded(javax.management.ObjectName job)
|
protected void |
handleJobRemoved(javax.management.ObjectName job)
|
void |
init()
Initializes the cluster controller. |
java.lang.Object |
invoke(java.lang.String actionName,
java.lang.Object[] params,
java.lang.String[] signature)
|
javax.management.ObjectName[] |
listCrawlers()
|
static void |
main(java.lang.String[] args)
|
boolean |
pauseAllJobs()
|
void |
postDeregister()
|
void |
postRegister(java.lang.Boolean registrationDone)
|
void |
preDeregister()
|
javax.management.ObjectName |
preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
|
protected void |
refreshRegistry()
|
protected void |
registerAddress(java.net.InetSocketAddress isa)
|
protected void |
removeMBeanServerNotificationListener(java.net.InetSocketAddress address)
|
void |
removeNotificationListener(javax.management.NotificationListener listener)
|
void |
removeNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
|
protected java.util.List<Container> |
resolveLeastLoadedContainers()
|
boolean |
resumeAllPausedJobs()
|
protected java.util.List<javax.management.ObjectName> |
retrieveContainerListFromJndi()
|
void |
setAttribute(javax.management.Attribute attribute)
|
javax.management.AttributeList |
setAttributes(javax.management.AttributeList attributes)
|
void |
setMaxInstances(java.lang.String hostname,
java.lang.Integer port,
java.lang.Integer maxInstances)
Sets the maximum number of instances that may run on a specified container defined by a host and port. |
protected void |
synchronizeContainer(javax.management.ObjectName c)
Synchronizes the state of an individual container. |
protected java.util.Map<javax.management.ObjectName,Container> |
synchronizeContainers(java.util.Map<javax.management.ObjectName,Container> containers,
java.util.List<javax.management.ObjectName> freshContainers)
Synchronizes the container list with the fresh list (fresh meaning, last polled from jndi), removing those that went away, and adding any newly discovered containers. |
protected void |
synchronizeMBean(javax.management.ObjectName name)
synchronizes state of beans according to their types. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClusterControllerBean()
Method Detail |
---|
public java.lang.Integer getTotalCrawlerCount()
public javax.management.ObjectName findCrawlServiceJobParent(java.lang.String jobUid, java.lang.String host, java.lang.Integer port)
public javax.management.ObjectName getCurrentCrawlJob(javax.management.ObjectName mother)
mother
-
public int getMaxInstances(java.lang.String hostname, java.lang.Integer port)
hostname
- port
-
public void setMaxInstances(java.lang.String hostname, java.lang.Integer port, java.lang.Integer maxInstances)
hostname
- port
- maxInstances
- public javax.management.ObjectName createCrawler() throws javax.management.MBeanException
javax.management.MBeanException
protected java.util.List<Container> resolveLeastLoadedContainers()
public javax.management.ObjectName[] listCrawlers()
public void destroyAllCrawlers()
public boolean pauseAllJobs()
public boolean resumeAllPausedJobs()
public void init()
public void destroy()
protected void handleJobRemoved(javax.management.ObjectName job)
protected void handleJobAdded(javax.management.ObjectName job)
protected boolean equals(javax.management.ObjectName a, javax.management.ObjectName b, java.lang.String key)
protected void handleContainerRemoved(javax.management.ObjectName name)
protected void handleCrawlerRemoved(javax.management.ObjectName name)
protected final java.util.List<javax.management.ObjectName> retrieveContainerListFromJndi()
protected final void refreshRegistry()
protected final java.util.Map<javax.management.ObjectName,Container> synchronizeContainers(java.util.Map<javax.management.ObjectName,Container> containers, java.util.List<javax.management.ObjectName> freshContainers)
containers
- freshContainers
-
protected void attachMBeanServerDelegateNotificationListener(java.net.InetSocketAddress address, javax.management.NotificationListener listener)
address
- listener
- protected void registerAddress(java.net.InetSocketAddress isa) throws java.io.IOException
java.io.IOException
protected void dereferenceContainer(Container c)
c
- Container to remove.protected void removeMBeanServerNotificationListener(java.net.InetSocketAddress address)
protected void synchronizeContainer(javax.management.ObjectName c)
c
- Container to check.protected void synchronizeMBean(javax.management.ObjectName name)
name
- public java.lang.Object getAttribute(java.lang.String attribute) throws javax.management.AttributeNotFoundException, javax.management.MBeanException, javax.management.ReflectionException
getAttribute
in interface javax.management.DynamicMBean
javax.management.AttributeNotFoundException
javax.management.MBeanException
javax.management.ReflectionException
public javax.management.AttributeList getAttributes(java.lang.String[] attributes)
getAttributes
in interface javax.management.DynamicMBean
public javax.management.MBeanInfo getMBeanInfo()
getMBeanInfo
in interface javax.management.DynamicMBean
public java.lang.Object invoke(java.lang.String actionName, java.lang.Object[] params, java.lang.String[] signature) throws javax.management.MBeanException, javax.management.ReflectionException
invoke
in interface javax.management.DynamicMBean
javax.management.MBeanException
javax.management.ReflectionException
public void setAttribute(javax.management.Attribute attribute) throws javax.management.AttributeNotFoundException, javax.management.InvalidAttributeValueException, javax.management.MBeanException, javax.management.ReflectionException
setAttribute
in interface javax.management.DynamicMBean
javax.management.AttributeNotFoundException
javax.management.InvalidAttributeValueException
javax.management.MBeanException
javax.management.ReflectionException
public javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
setAttributes
in interface javax.management.DynamicMBean
public void addNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback) throws java.lang.IllegalArgumentException
addNotificationListener
in interface javax.management.NotificationBroadcaster
java.lang.IllegalArgumentException
public javax.management.MBeanNotificationInfo[] getNotificationInfo()
getNotificationInfo
in interface javax.management.NotificationBroadcaster
public void removeNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback) throws javax.management.ListenerNotFoundException
removeNotificationListener
in interface javax.management.NotificationEmitter
javax.management.ListenerNotFoundException
public void removeNotificationListener(javax.management.NotificationListener listener) throws javax.management.ListenerNotFoundException
removeNotificationListener
in interface javax.management.NotificationBroadcaster
javax.management.ListenerNotFoundException
public void postDeregister()
postDeregister
in interface javax.management.MBeanRegistration
public void postRegister(java.lang.Boolean registrationDone)
postRegister
in interface javax.management.MBeanRegistration
public void preDeregister() throws java.lang.Exception
preDeregister
in interface javax.management.MBeanRegistration
java.lang.Exception
public javax.management.ObjectName preRegister(javax.management.MBeanServer server, javax.management.ObjectName name) throws java.lang.Exception
preRegister
in interface javax.management.MBeanRegistration
java.lang.Exception
protected javax.management.ObjectName addCrawler(javax.management.ObjectName newCrawler)
protected void handleCrawlerCreated(javax.management.ObjectName newCrawler)
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |