Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * JBoss, Home of Professional Open Source.
   * Copyright 2013, Red Hat, Inc., and individual contributors
   * as indicated by the @author tags. See the copyright.txt file in the
   * distribution for a full listing of individual contributors.
   *
   * This is free software; you can redistribute it and/or modify it
   * under the terms of the GNU Lesser General Public License as
   * published by the Free Software Foundation; either version 2.1 of
  * the License, or (at your option) any later version.
  *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  */
 package org.jboss.as.host.controller.mgmt;
 
 import java.util.Set;
 
Used on the DC. Maintains the known domain level resource addresses and server groups for a particular host

Author(s):
Kabir Khan
 
 
     private final HostInfo hostInfo;
     private final IgnoredNonAffectedServerGroupsUtil util;
     private volatile ConcurrentSet<PathElementknownRootAddresses;
 
     private DomainControllerRuntimeIgnoreTransformationEntry(HostInfo hostInfoExtensionRegistry extensionRegistry) {
         this. = hostInfo;
         this. = IgnoredNonAffectedServerGroupsUtil.create(extensionRegistry);
     }

    
Static factory

Parameters:
hostInfo the host info for the slave
extensionRegistry the DC extension registry
Returns:
the created instance
 
     static DomainControllerRuntimeIgnoreTransformationEntry create(HostInfo hostInfoExtensionRegistry extensionRegistry) {
         return new DomainControllerRuntimeIgnoreTransformationEntry(hostInfoextensionRegistry);
     }

    
Callback for DomainControllerRuntimeIgnoreTransformationRegistry to initialize the known addresses map

Parameters:
knownRootAddresses the known addresses map
 
     void setKnownRootAddresses(ConcurrentSet<PathElementknownRootAddresses) {
         this. = knownRootAddresses;
     }

    
Whether the slave host is set up to ignore unaffected config

Returns:
true if the slave is set up to ignore unaffected config
 
     boolean isIgnoreUnaffactedConfig() {
         return .isIgnoreUnaffectedConfig();
     }

    
Whether the host should ignore the domain resource

Parameters:
domainResource the root domain resource
the address to check
Returns:
true if we are to ignore the resource
 
     @Override
     public boolean ignoreResource(Resource domainResourcePathAddress address) {
         if (address.size() != 1) {
             return false;
         }
         if (.isIgnoreUnaffectedConfig()) {
             if ( != null && address.size() >= 0 && .contains(address.getElement(0))) {
                 return false;
             }
             return .ignoreResource(domainResource.getServerConfigInfos(), address);
         }
         return false;
    }

    
Add/update a server config info

Parameters:
serverInfo the server config info
    void updateSlaveServerConfig(ServerConfigInfo serverInfo) {
        if (.isIgnoreUnaffectedConfig()) {
            .updateSlaveServerConfigInfo(serverInfo);
        }
    }

    
Gets all the unknown extensions for a profile's subsystems

Parameters:
domainResource the root domain resource
profileElement the profile address to check
Returns:
the unknown extensions
    Set<PathElementgetUnknownExtensionsForProfile(Resource domainResourcePathElement profileElement) {
        Set<PathElementallExtensions = .getAllExtensionsForProfile(domainResourceprofileElement);
        Set<PathElementunknownExtensions = new HashSet<>();
        for (PathElement extensionElement : allExtensions) {
            if (!.contains(extensionElement)) {
                unknownExtensions.add(extensionElement);
            }
        }
        return unknownExtensions;
    }
New to GrepCode? Check out our FAQ X