Tabnine Logo
CapabilityId
Code IndexAdd Tabnine to your IDE (free)

How to use
CapabilityId
in
org.jboss.as.controller.capability.registry

Best Java code snippets using org.jboss.as.controller.capability.registry.CapabilityId (Showing top 20 results out of 315)

origin: org.wildfly.core/wildfly-controller

public RequirementRegistration(String requiredName, String dependentName, CapabilityScope dependentContext) {
  this(requiredName, new CapabilityId(dependentName, dependentContext));
}
origin: org.wildfly.core/wildfly-controller

  @Override
  public int compareTo(CapabilityRegistration o) {
    return id.compareTo(o.id);
  }
}
origin: org.wildfly.core/wildfly-controller

@Override
public boolean equals(Object o) {
  if (this == o) return true;
  if (o == null || getClass() != o.getClass()) return false;
  CapabilityRegistration that = (CapabilityRegistration) o;
  return id.equals(that.id);
}
origin: org.wildfly.core/wildfly-controller

private Step findCapabilityRemovalStep(CapabilityId missingRequirement, boolean ignoreContext, CapabilityResolutionContext resolutionContext) {
  Step result = removedCapabilities.get(missingRequirement);
  if (result == null && !ignoreContext) {
    String missingName = missingRequirement.getName();
    for (Map.Entry<CapabilityId, Step> entry : removedCapabilities.entrySet()) {
      CapabilityId removedId = entry.getKey();
      if (missingName.equals(removedId.getName())
          && removedId.getScope().canSatisfyRequirement(missingRequirement.getName(), missingRequirement.getScope(), resolutionContext)) {
        result = entry.getValue();
        break;
      }
    }
  }
  return result;
}
origin: org.wildfly.core/wildfly-controller

readLock.lock();
try {
  final CapabilityId capId = capabilityId.getScope() == CapabilityScope.GLOBAL ? capabilityId : new CapabilityId(capabilityId.getName(), CapabilityScope.GLOBAL); //possible registry is only in global scope
  CapabilityRegistration<?> reg =  possibleCapabilities.get(capId);
  if (reg != null) {
    for (CapabilityRegistration<?> registration : possibleCapabilities.values()) {
      if (registration.getCapability().isDynamicallyNamed()
        && registration.getCapabilityScope().equals(capId.getScope())
        && capId.getName().startsWith(registration.getCapabilityName())) {
        Set<RegistrationPoint> registrationPoints = registration.getRegistrationPoints();
        for (RegistrationPoint registrationPoint : registrationPoints) {
origin: org.wildfly.core/wildfly-controller

private RuntimeStatus getDependentCapabilityStatus(Map<String, RuntimeRequirementRegistration> dependents, CapabilityId requiror, Set<CapabilityId> examined) {
  RuntimeStatus result = RuntimeStatus.NORMAL;
  if (dependents != null) {
    for (String dependent : dependents.keySet()) {
      CapabilityScope requirorScope = requiror.getScope();
      List<CapabilityScope> toCheck = requirorScope == CapabilityScope.GLOBAL
          ? Collections.singletonList(requirorScope)
          : Arrays.asList(requirorScope, CapabilityScope.GLOBAL);
      for (CapabilityScope scope : toCheck) {
        CapabilityId dependentId = new CapabilityId(dependent, scope);
        if (!examined.contains(dependentId)) {
          RuntimeStatus status = getCapabilityStatus(dependentId, examined);
          if (status == RuntimeStatus.RESTART_REQUIRED) {
            return status; // no need to check anything else
          } else if (status == RuntimeStatus.RELOAD_REQUIRED) {
            result = status;
          }
        }
      }
    }
  }
  return result;
}
origin: org.wildfly.core/wildfly-controller

public String getDependentName() {
  return dependentId.getName();
}
origin: org.wildfly.core/wildfly-controller

/**
 * Gets the scope in which the capability is registered.
 *
 * @return the capability scope. Will not return {@code null}
 */
public CapabilityScope getCapabilityScope() {
  return id.getScope();
}
origin: org.wildfly.core/wildfly-controller

@Override
public int hashCode() {
  return id.hashCode();
}
origin: wildfly/wildfly-core

readLock.lock();
try {
  final CapabilityId capId = capabilityId.getScope() == CapabilityScope.GLOBAL ? capabilityId : new CapabilityId(capabilityId.getName(), CapabilityScope.GLOBAL); //possible registry is only in global scope
  CapabilityRegistration<?> reg =  possibleCapabilities.get(capId);
  if (reg != null) {
    for (CapabilityRegistration<?> registration : possibleCapabilities.values()) {
      if (registration.getCapability().isDynamicallyNamed()
        && registration.getCapabilityScope().equals(capId.getScope())
        && capId.getName().startsWith(registration.getCapabilityName())) {
        Set<RegistrationPoint> registrationPoints = registration.getRegistrationPoints();
        for (RegistrationPoint registrationPoint : registrationPoints) {
origin: wildfly/wildfly-core

private Step findCapabilityRemovalStep(CapabilityId missingRequirement, boolean ignoreContext, CapabilityResolutionContext resolutionContext) {
  Step result = removedCapabilities.get(missingRequirement);
  if (result == null && !ignoreContext) {
    String missingName = missingRequirement.getName();
    for (Map.Entry<CapabilityId, Step> entry : removedCapabilities.entrySet()) {
      CapabilityId removedId = entry.getKey();
      if (missingName.equals(removedId.getName())
          && removedId.getScope().canSatisfyRequirement(missingRequirement.getName(), missingRequirement.getScope(), resolutionContext)) {
        result = entry.getValue();
        break;
      }
    }
  }
  return result;
}
origin: wildfly/wildfly-core

private RuntimeStatus getDependentCapabilityStatus(Map<String, RuntimeRequirementRegistration> dependents, CapabilityId requiror, Set<CapabilityId> examined) {
  RuntimeStatus result = RuntimeStatus.NORMAL;
  if (dependents != null) {
    for (String dependent : dependents.keySet()) {
      CapabilityScope requirorScope = requiror.getScope();
      List<CapabilityScope> toCheck = requirorScope == CapabilityScope.GLOBAL
          ? Collections.singletonList(requirorScope)
          : Arrays.asList(requirorScope, CapabilityScope.GLOBAL);
      for (CapabilityScope scope : toCheck) {
        CapabilityId dependentId = new CapabilityId(dependent, scope);
        if (!examined.contains(dependentId)) {
          RuntimeStatus status = getCapabilityStatus(dependentId, examined);
          if (status == RuntimeStatus.RESTART_REQUIRED) {
            return status; // no need to check anything else
          } else if (status == RuntimeStatus.RELOAD_REQUIRED) {
            result = status;
          }
        }
      }
    }
  }
  return result;
}
origin: org.wildfly.core/wildfly-controller

public String getCapabilityName() {
  return id.getName();
}
origin: wildfly/wildfly-core

/**
 * Gets the scope in which the capability is registered.
 *
 * @return the capability scope. Will not return {@code null}
 */
public CapabilityScope getCapabilityScope() {
  return id.getScope();
}
origin: wildfly/wildfly-core

@Override
public int hashCode() {
  return id.hashCode();
}
origin: org.wildfly.core/wildfly-controller

final CapabilityId capabilityId = new CapabilityId(capability.getName(), CapabilityScope.GLOBAL);
RegistrationPoint point = new RegistrationPoint(registrationPoint, null);
CapabilityRegistration<?> capabilityRegistration = new CapabilityRegistration<>(capability, CapabilityScope.GLOBAL, point);
      throw ControllerLogger.MGMT_OP_LOGGER.capabilityAlreadyRegisteredInContext(capabilityId.getName(),
          capabilityId.getScope().getName());
origin: wildfly/wildfly-core

public RequirementRegistration(String requiredName, String dependentName, CapabilityScope dependentContext) {
  this(requiredName, new CapabilityId(dependentName, dependentContext));
}
origin: org.wildfly.core/wildfly-controller

/**
 * This must be called with the write lock held.
 * @param requirement the requirement
 */
private void registerRequirement(RuntimeRequirementRegistration requirement) {
  assert writeLock.isHeldByCurrentThread();
  CapabilityId dependentId = requirement.getDependentId();
  if (!capabilities.containsKey(dependentId)) {
    throw ControllerLogger.MGMT_OP_LOGGER.unknownCapabilityInContext(dependentId.getName(),
        dependentId.getScope().getName());
  }
  Map<CapabilityId, Map<String, RuntimeRequirementRegistration>> requirementMap =
      requirement.isRuntimeOnly() ? runtimeOnlyRequirements : requirements;
  Map<String, RuntimeRequirementRegistration> dependents = requirementMap.get(dependentId);
  if (dependents == null) {
    dependents = new HashMap<>();
    requirementMap.put(dependentId, dependents);
  }
  RuntimeRequirementRegistration existing = dependents.get(requirement.getRequiredName());
  if (existing == null) {
    dependents.put(requirement.getRequiredName(), requirement);
  } else {
    existing.addRegistrationPoint(requirement.getOldestRegistrationPoint());
  }
  modified = true;
}
origin: wildfly/wildfly-core

public String getDependentName() {
  return dependentId.getName();
}
origin: wildfly/wildfly-core

@Override
public boolean equals(Object o) {
  if (this == o) return true;
  if (o == null || getClass() != o.getClass()) return false;
  CapabilityRegistration that = (CapabilityRegistration) o;
  return id.equals(that.id);
}
org.jboss.as.controller.capability.registryCapabilityId

Javadoc

Unique identifier for a capability, encapsulating its name and the scope in which it exists.

Most used methods

  • <init>
  • compareTo
  • equals
  • getName
    Gets the name of the capability. Must be unique within the given scope, so providers of capabilities
  • getScope
    Gets the scope in which the capability exists. A single management process may handle multiple scope
  • hashCode

Popular in Java

  • Updating database using SQL prepared statement
  • getContentResolver (Context)
  • putExtra (Intent)
  • setRequestProperty (URLConnection)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • BoxLayout (javax.swing)
  • JOptionPane (javax.swing)
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now