input
stringlengths
10
828
output
stringlengths
5
107
public boolean is overriden by final corrective action corrective action return is overiding call script corrective action corrective action corrective action instanceof restart agent corrective action
returns whether this corrective action is overriden by code corrective action code
public boolean is overriden by final corrective action corrective action return false
returns true if code corrective action code overides this corrective action
public boolean is overriden by final corrective action sequence other corrective action sequence final corrective action this currective action get current corrective action final corrective action other currective action other corrective action sequence get current corrective action return this currective action null other currective action null this currective action is overriden by other currective action
determines if the next available corrective action in
public boolean get overides invoke method corrective action return m overides invoke method corrective action
returns whether this corrective action overides
final public boolean is overriden by final set other corrective action sequences boolean is overriden false for iterator iterator other corrective action sequences iterator iterator has next corrective action sequence corrective action sequence corrective action sequence iterator next if is overriden by corrective action sequence is overriden true break return is overriden
determines whether any of the corrective action sequences in
private boolean matches desired result object result return result null m desired result null m desired result equals result
returns whether code result code matches the desired result set during construction
public boolean get overides restart agent corrective action return m overides restart agent corrective action
returns whether this corrective action overides
private corrective action get current corrective action corrective action current corrective action null if m corrective action sequence null m current corrective action 1 for int c loop m current corrective action c loop m corrective action sequence size c loop corrective action current action corrective action m corrective action sequence get m current corrective action if current action can apply current corrective action current action break return current corrective action
obtains the current corrective action skipping through corrective actions until a
private corrective action context get delegate corrective action context return m delegate corrective action context
retrieves the delegate corrective action context
final public corrective action set corrective action context corrective action context corrective action context m corrective action context corrective action context return this
sets the corrective action context of this corrective action
private boolean get allow write to delegate corrective action context return m allow write to delegate corrective action context
determines whether delegate corrective action context can be writen to
final public corrective action context get corrective action context return m corrective action context
returns the corrective action context of this corrective action
final public corrective action set number of times to apply final int number of times to apply m number of times to apply number of times to apply return this
sets the number of times this corrective action can be applied
final public int get number of times to apply return m number of times to apply
get the total number of times this corrective action can be applied
final public boolean apply throws corrective action exception exception if can apply throw new corrective action exception cannot apply corrective action failed too often try boolean result apply impl if result m number of times failed else m number of times failed 0 return result catch exception e m number of times failed throw e
apply this corrective action
final public boolean can apply return m number of times failed m number of times to apply
returns whether this corrective action can be applied
private void configure agent final properties agent properties throws exception final string system agent configurator class name system get property configuration agent configurator class property final string agent configurator class name agent properties get property configuration agent configurator class property system agent configurator class name if agent configurator class name null final class agent configurator class class for name agent configurator class name final constructor agent configurator constructor agent configurator class get constructor new class java util properties class base agent class m agent configurator agent configurator constructor new instance new object agent properties this
configure the agent by creating a class via reflection the class is
public boolean start agent throws remote exception try log debug base agent start agent called return start agent m mlet url m mlet mbeans list catch remote exception re system out println remote exception in base agent start agent re print stack trace re detail print stack trace throw re catch throwable t system out println throwable in base agent start agent t print stack trace return false
starts the agent loading the mbeans from the location specified during rmi registration
protected boolean restart mbean impl throws exception log debug restart mbean impl return start mbean impl
delegates to code start mbean impl code
public boolean stop agent throws remote exception boolean succeeded false try if is running log debug stop any watchdog mbean that is watching me stop thing watching me log debug stopping mbeans stop mbeans log debug unregistering mbeans unregister mbeans log debug removing server remove server log deactivating object activatable unexport object this true inactive get id succeeded true log debug stop agent done system exit 1 activatable unexport object this false catch remote exception re log warning re throw re catch exception e log warning e throw new remote exception e return succeeded
stops the agent
protected boolean has mbean failed throws exception return is mbean running
gets whether this watchdog mbean has failed
public boolean is running throws remote exception try return is server created are mbeans registered are mbeans running catch remote exception re throw re catch exception e throw new remote exception e
returns the running state of the agent
public void start document m accumulator new string buffer
called at the beginning of parsing
public string get host name throws remote exception try return java net inet address get local host get host name catch java net unknown host exception uhe throw new remote exception uhe
returns the hostname of agents machine
private void move odin string machine name exec script configuration hermes directory bin reboot machine machine name
execute a script to change the machine that odin points to
protected boolean is mbean running throws exception long current time system current time millis long time last did something get time last did something long how long since last did something current time time last did something boolean is running how long since last did something 3 get granularity return is running
gets whether this watchdog mbean is running
private void reboot machine string machine name exec script configuration hermes directory bin reboot machine machine name
execute a script to reboot a machine
public void characters char buffer int start int length m accumulator append buffer start length
when the parser encounters plain text not xml elements it calls
public void run log debug sleeping for 50ms second just in case try if this thread invokes a cluster method call before membership changed event completes it could timeout hang we need to discuss this with bela thread sleep 50 catch exception ignored merge members
called when the service needs to merge with another partition
private boolean is machine running string machine name registry registry null try registry locate registry get registry catch remote exception re registry null return registry null
gets whether a machine is running
public string get rmi agent binding return m rmi agent binding
gets the rmi binding of the jmx agent that is being watched
public void end element string namespace url string local name string qname try final string element text translate string m accumulator to string trim if local name equals activation group set current activation group id null else if local name equals activatable object if m current activation group id null create activation group add activatable object element text else if local name equals marshalled object create marshalled object element text else if local name equals constructor param add constructor param element text catch exception e e print stack trace system out
take special action when we reach the end of selected elements
public int get num watched return m num watched
gets the number of startable mbeans that are being watched
public void warning saxparse exception exception system err println warning line exception get line number exception get message
issue a warning
private boolean is server created return m server null
returns true if the mbean server has been created
public void error saxparse exception exception system err println error line exception get line number exception get message
report a parsing error
public int get num running return m num running
gets the number of startable mbeans that are running
public void fatal error saxparse exception exception throws saxexception system err println fatal line exception get line number exception get message throw exception
report a non recoverable error and exit
public int get num stopped return m num watched m num running
gets the number of startable mbeans that are not running
public boolean get all running return m num running m num watched
get whether all the startable mbeans being watched are running
private void add constructor param string text try final string class attribute get constructor parameter properties get property class final class param class class for name class attribute final class param constructor param new class string class final object param constructor values new object text constructor param class constructor param class get constructor param constructor param add marshalled object constructor parameter param class constructor new instance param constructor values class attribute catch exception e e print stack trace system out
xml routine for adding constructor parameters
private void set activation group attributes attributes attributes set activation group properties new properties add individual attribute to properties get activation group properties attributes name add individual attribute to properties get activation group properties attributes classpath add individual attribute to properties get activation group properties attributes policy add individual attribute to properties get activation group properties attributes script
sets the activation group attributes
public long get granularity return m granularity
get the amount of time in milliseconds between watching
private void set activatable object attributes attributes attributes set activatable object properties new properties add individual attribute to properties get activatable object properties attributes name add individual attribute to properties get activatable object properties attributes class add individual attribute to properties get activatable object properties attributes rmi binding add individual attribute to properties get activatable object properties attributes codebase set current marshalled object null
sets the activatable object attributes
private boolean is system mean string class name return is rmi adaptor service class name is html adaptor server class name
returns true if code class name code is a system mbean
private void set marshalled object attributes attributes attributes set marshalled object properties new properties add individual attribute to properties get marshalled object properties attributes class
sets the marshalled object attributes
public void set service controller final object name service controller this service controller service controller
describe code set service controller code method here
public void set granularity long granularity m granularity granularity
sets the amount of time in milliseconds between watching runs
private boolean is rmi adaptor service string class name return org elba jmx connector rmi rmiadaptor service class get name equals class name
returns true if code class name code is an rmi adaptor mbean
private void set constructor parameter attributes attributes attributes set constructor parameter properties new properties add individual attribute to properties get constructor parameter properties attributes class
sets the constructor parameter attributes
public collection list deployed log info deployment list string deployment list synchronized deployment list return new array list deployment list
the code list deployed code method returns a collection of deploymemt info
private boolean is html adaptor server string class name return com sun jdmk comm html adaptor server class get name equals class name
returns true if code class name code is an htmladaptor mbean
public long get time started watching return m time started watching
gets the system time that watching started
public string list deployed as string return pre list deployed pre
describe code list deployed as string code method here
public void add library jar url lib jar deployment info current this while current parent null current current parent current ucl add url lib jar
all library jars referenced through either the manifest references
public loader repository config get top repository config loader repository config top config repository config deployment info info this while info parent null info info parent top config info repository config return top config
the the class loader repository name of the top most deployment info
public int get extension index url url string path url get path if path ends with path path substring 0 path length 1 int i 0 for i suffix order length i if path ends with suffix order i break return i
return the index that matches this url
private boolean unregister mbeans throws exception set mbeans m server query mbeans null null for iterator i mbeans iterator i has next object instance object instance object instance i next object name object name object instance get object name if object name null object name to string equals service name delegate unregister mbean object name return true
unregistered the mbeans from the mbean server
private void initialise marshalled object constructor parameters m marshalled object constructor parameters new array list
initialises the marshalled object constructor parameters
public string get metadata url return metadata url
mbean get set pair for field metadata url
public void set metadata url string metadata url this metadata url metadata url
set the value of metadata url
public object name get loader repository return loader repository
mbean get set pair for field loader repository
public manifest get manifest try if manifest null file file new file local url get file if file is directory file input stream fis new file input stream new file file meta inf manifest mf manifest new manifest fis fis close else a jar manifest new jar file file get manifest return manifest it is ok to barf at any time in the above means no manifest catch exception ignored return null
get manifest returns if present the deployments manifest
public void set loader repository object name loader repository this loader repository loader repository
set the value of loader repository
public long get time last watched return m time last watched
gets the system time that the last watching run started
private boolean start mbeans throws exception set mbeans m server query mbeans null null start non startable mbeans mbeans start startable mbeans mbeans return true
starts the mbeans
private void initialise marshalled object constructor signature m marshalled object constructor signature new array list
initialises the marshalled object constructor signature
public collection list waiting for deployer synchronized waiting deployments return new array list waiting deployments
the code list waiting for deployer code method returns a collection
public boolean accepts deployment info di string url str di url to string return url str ends with sar url str ends with sar url str ends with service xml
returns true if this deployer can deploy the given deployment info
private void add marshalled object constructor parameter object parameter string class name get marshalled object constructor parameters add parameter get marshalled object constructor signature add class name
adds a marshalled object constructor parameter
public int get num times to attempt mbean restart return m num times to attempt mbean restart
gets the number of times to attempt mbean restart
public void set xsl url final string xsl url this xsl url xsl url
describe code set xsl url code method here
public string get xsl url return xsl url
describe code get xsl url code method here
public void start deployment info di throws deployment exception log debug deploying sar start step url di url try start the services for iterator iter di mbeans iterator iter has next object name service object name iter next the service won t be started until explicitely dependent mbeans are started service controller start service generate a jmx notification for the start stage super start di catch exception e stop di destroy di throw new deployment exception start operation failed on package di url e
the code start code method starts all the mbeans in this deployment info
public void set package suffix final string package suffix this package suffix package suffix
describe code set package suffix code method here
public void remove deployer final sub deployer deployer log info removing deployer deployer boolean removed false synchronized deployers removed deployers remove deployer send a notification about the deployer removal if removed notification msg new notification remove deployer this get next notification sequence number msg set user data deployer get service name send notification msg list copy null synchronized deployment list copy new array list deployment list for iterator i copy iterator i has next deployment info di deployment info i next if di deployer deployer undeploy di di deployer null synchronized waiting deployments waiting deployments add di
the code remove deployer code method unregisters a deployer with the main deployer
public string get package suffix return package suffix
describe code get package suffix code method here
public void set dd suffix final string dd suffix this dd suffix dd suffix
describe code set dd suffix code method here
public string get dd suffix return dd suffix
describe code get dd suffix code method here
public void set delegate name final object name delegate name this delegate name delegate name
describe code set delegate name code method here
private boolean stop mbeans throws exception set mbeans m server query mbeans null null stop non startable mbeans mbeans stop startable mbeans mbeans return true
stops the mbeans
public object name get delegate name return delegate name
describe code get delegate name code method here
public int get num times to attempt mbean reregister return m num times to attempt mbean reregister
gets the number of times to attempt mbean reregister
public collection list deployers array list deployer names new array list synchronized deployers for int n 0 n deployers size n sub deployer deployer sub deployer deployers get n object name name deployer get service name deployer names add name return deployer names
the code list deployers code method returns a collection of object names of
public void stop deployment info di log debug undeploying document di url list services di mbeans int last service services size stop services in reverse order for list iterator i services list iterator last service i has previous object name name object name i previous log debug stopping mbean name try service controller stop name catch exception e log error could not stop mbean name e end of try catch generate a jmx notification for the stop stage try super stop di catch exception ignore
undeploys the package at the url string specified
private properties get activation group properties return m activation group properties
gets the activation group properties
public int get num times to attempt agent restart return m num times to attempt agent restart
gets the number of times to attempt agent restart
protected void start service throws exception super start service main deployer main deployer mbean mbean proxy ext create main deployer mbean class main deployer mbean object name server get the controller proxy service controller service controller mbean mbean proxy ext create service controller mbean class service controller mbean object name server get the data directory install url library url server config config server config locator locate data dir config get server data dir server home url config get server home url
the start service method gets the mbean proxies for main deployer
private void create mbean string class name object name object name throws exception try m server create mbean class name object name catch exception e log warning create mbean class name object name exception thrown log warning e throw e
creates an mbean
public boolean accept file file return accept file get name
if the filename matches any string in the prefix suffix or matches
private boolean unregister mbean object name object name throws exception if m server is registered object name m server unregister mbean object name return true else return false
unregisters an mbean
public void shutdown if we shutdown in the middle of a scan it still might be possible that we try to redeploy things we are busy killing int deploy counter 0 undeploy everything in sight list copy deployments new array list deployment list for list iterator i copy deployments list iterator copy deployments size i has previous try undeploy deployment info i previous true deploy counter catch exception e log info exception trying to undeploy during shutdown e log info undeployed deploy counter deployed packages
the code shutdown code method undeploys all deployed packages in
private properties get activatable object properties return m activatable object properties
gets the activatable object properties
public int get num times to attempt machine restart return m num times to attempt machine restart
gets the number of times to attempt machine restart
public string get default http directory lister url if default http directory lister url null default http directory lister url net boot helper get default list url return this default http directory lister url
default url to be used when listing files on a remote http folder
private boolean is mbean registered object name object name throws exception return m server is registered object name
determines if the mbean referenced by code object name code has be registered
public string get default http directory download url if http directory download null http directory download net boot helper get default download url return this http directory download
default url to be used when downloading files from a remote http folder
private boolean stop thing watching me boolean succeeded false try agent remote interface watcher agent agent remote interface naming lookup hermes machine properties get resolved rmi agent binding m watcher rmi agent binding watcher agent invoke method on mbean m watcher object name stop mbean new object 0 new string 0 succeeded true catch exception e log warning e catch throwable t log warning t return succeeded
stops the watchdog mbean watching this agent
public void set num times to attempt mbean restart int num times to attempt mbean restart m num times to attempt mbean restart math min num times to attempt mbean restart max num times to attempt mbean restart
sets the number of times to attempt mbean restart
private properties get marshalled object properties return m marshalled object properties
gets the marshalled object properties