Package org.jppf.server.node
Class JPPFNode
java.lang.Object
org.jppf.utils.concurrent.ThreadSynchronization
org.jppf.node.AbstractNode
org.jppf.server.node.AbstractCommonNode
org.jppf.server.node.JPPFNode
- All Implemented Interfaces:
Runnable,org.jppf.execute.async.ExecutionManagerListener,org.jppf.node.Node,NodeInternal,ClassLoaderProvider
public abstract class JPPFNode
extends AbstractCommonNode
implements ClassLoaderProvider, org.jppf.execute.async.ExecutionManagerListener
Instances of this class encapsulate execution nodes.
- Author:
- Laurent Cohen, Domingos Creado
-
Field Summary
Fields inherited from class org.jppf.server.node.AbstractCommonNode
classLoaderManager, reconnectionNotificationFields inherited from class org.jppf.node.AbstractNode
configuration, helper, hookFactory, jmxEnabled, jmxServer, lifeCycleEventHandler, nodeConnection, nodeIO, serializer, systemInformation, uuidFields inherited from class org.jppf.utils.concurrent.ThreadSynchronization
stopped -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbundleExecuted(org.jppf.node.protocol.TaskBundle bundle, List<org.jppf.node.protocol.Task<?>> tasks, Throwable t) getClassLoader(List<String> uuidPath) Get a reference to the class loader associated with an application uuid.org.jppf.utils.concurrent.QueueHandler<org.jppf.node.protocol.BundleWithTasks>protected voidinit()Initialize this node's resources.voidGet the main classloader for the node.voidrun()Main processing loop of this node.voidstopNode()Stop this node and release the resources it is using.voidTrigger the configuration changed flag.Methods inherited from class org.jppf.server.node.AbstractCommonNode
cancelPendingAction, getClassLoader, getClassLoaderManager, getContainer, getExecutionManager, getJmxServer, getNodeAdmin, getPendingAction, getReconnectionNotification, getSerializationExecutor, hasPendingAction, isExecuting, isOffline, isRestart, isShutdownRequested, isStartedFromMain, isSuspended, requestResourceCacheReset, resetTaskClassLoader, setClassLoader, setExecuting, setNodeAdmin, setPendingAction, setReconnectionNotification, setStartedFromMain, setSuspended, setupBundleParameters, shutdown, stopJmxServerMethods inherited from class org.jppf.node.AbstractNode
getConfiguration, getExecutedTaskCount, getHelper, getHookFactory, getJPPFClassLoader, getLifeCycleEventHandler, getManagementInfo, getMasterNodeUuid, getNodeConnection, getNodeIO, getShuttingDown, getSystemInformation, getUuid, isJmxEnabled, isMasterNode, isSlaveNode, setExecutedTaskCount, setJPPFClassLoader, updateSystemInformationMethods inherited from class org.jppf.utils.concurrent.ThreadSynchronization
goToSleep, goToSleep, goToSleep, isStopped, setStopped, wakeUpMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jppf.node.Node
isAndroid, isDotnetCapable, isLocalMethods inherited from interface org.jppf.node.NodeInternal
closeDataChannel, initDataChannel
-
Constructor Details
-
JPPFNode
public JPPFNode(String uuid, org.jppf.utils.TypedProperties configuration, org.jppf.utils.hooks.HookFactory hookFactory) Default constructor.- Parameters:
uuid- this node's uuid.configuration- the configuration of this node.hookFactory- used to create and invoke hook instances.
-
-
Method Details
-
run
public void run()Main processing loop of this node. -
init
Initialize this node's resources.- Throws:
Exception- if an error is raised during initialization.
-
initHelper
Get the main classloader for the node. This method performs a lazy initialization of the classloader.- Throws:
Exception- if an error occurs while instantiating the class loader.
-
triggerConfigChanged
public void triggerConfigChanged()Trigger the configuration changed flag. -
getClassLoader
Description copied from interface:ClassLoaderProviderGet a reference to the class loader associated with an application uuid.- Specified by:
getClassLoaderin interfaceClassLoaderProvider- Parameters:
uuidPath- the uuid path containing the key to the container.- Returns:
- a
ClassLoaderused for loading the classes of the framework. - Throws:
Exception- if an error occurs while getting the class loader.
-
getSlaveManager
- Returns:
- the slave node manager.
-
getNodeConfigNotifier
- Specified by:
getNodeConfigNotifierin interfaceNodeInternal- Returns:
- the mbean which sends notifications of configuration changes.
-
bundleExecuted
public void bundleExecuted(org.jppf.node.protocol.TaskBundle bundle, List<org.jppf.node.protocol.Task<?>> tasks, Throwable t) - Specified by:
bundleExecutedin interfaceorg.jppf.execute.async.ExecutionManagerListener
-
stopNode
public void stopNode()Description copied from interface:NodeInternalStop this node and release the resources it is using.- Specified by:
stopNodein interfaceNodeInternal- Overrides:
stopNodein classAbstractCommonNode
-
getJobWriter
public org.jppf.utils.concurrent.QueueHandler<org.jppf.node.protocol.BundleWithTasks> getJobWriter()- Returns:
- the object which asynchronously sends job results and notification bundles.
-
getHandshakeUuidPath
- Returns:
- the uuid path of the handshake bundle.
-