Search in sources :

Example 26 with RMNodeSourceEvent

use of org.ow2.proactive.resourcemanager.common.event.RMNodeSourceEvent in project scheduling by ow2-proactive.

the class NodeSource method putAndPersistAdditionalInformation.

public void putAndPersistAdditionalInformation(String key, String value) {
    String valueToUpdate = this.additionalInformation.get(key);
    if (valueToUpdate == null || (valueToUpdate != null && !valueToUpdate.equals(value))) {
        // Put additional information
        this.additionalInformation.put(key, value);
        this.descriptor.getAdditionalInformation().put(key, value);
        // Persist additional information
        persistAdditionalInformation();
        // Notify the rm portal that the node source changed
        this.monitoring.nodeSourceEvent(new RMNodeSourceEvent(RMEventType.NODESOURCE_UPDATED, this.administrator.getName(), this.name, this.getDescription(), this.additionalInformation, this.administrator.getName(), this.getStatus().toString()));
    }
}
Also used : RMNodeSourceEvent(org.ow2.proactive.resourcemanager.common.event.RMNodeSourceEvent)

Aggregations

RMNodeSourceEvent (org.ow2.proactive.resourcemanager.common.event.RMNodeSourceEvent)24 RMMonitorEventReceiver (functionaltests.monitor.RMMonitorEventReceiver)14 BooleanWrapper (org.objectweb.proactive.core.util.wrapper.BooleanWrapper)8 RMTHelper (functionaltests.utils.RMTHelper)6 NodeSource (org.ow2.proactive.resourcemanager.nodesource.NodeSource)6 HashSet (java.util.HashSet)5 RMNodeEvent (org.ow2.proactive.resourcemanager.common.event.RMNodeEvent)5 TestSSHInfrastructureV2 (functionaltests.nodesource.TestSSHInfrastructureV2)3 Set (java.util.Set)3 NSAdminPermission (org.ow2.proactive.permissions.NSAdminPermission)3 RMCoreAllPermission (org.ow2.proactive.permissions.RMCoreAllPermission)3 ResourceManager (org.ow2.proactive.resourcemanager.frontend.ResourceManager)3 SSHInfrastructureV2 (org.ow2.proactive.resourcemanager.nodesource.infrastructure.SSHInfrastructureV2)3 StaticPolicy (org.ow2.proactive.resourcemanager.nodesource.policy.StaticPolicy)3 ImmutableSet (com.google.common.collect.ImmutableSet)2 File (java.io.File)2 Permission (java.security.Permission)2 List (java.util.List)2 Entry (java.util.Map.Entry)2 Node (org.objectweb.proactive.core.node.Node)2