congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
VdcHost
Code IndexAdd Tabnine to your IDE (free)

How to use
VdcHost
in
com.emc.rest.smart.ecs

Best Java code snippets using com.emc.rest.smart.ecs.VdcHost (Showing top 10 results out of 315)

origin: com.emc.ecs/smart-client

@Override
public boolean equals(Object o) {
  if (this == o) return true;
  if (!(o instanceof VdcHost)) return false;
  if (!super.equals(o)) return false;
  VdcHost vdcHost = (VdcHost) o;
  return getVdc().equals(vdcHost.getVdc());
}
origin: com.emc.ecs/smart-client

public Vdc(String... hostNames) {
  this.name = hostNames[0];
  hosts = new ArrayList<VdcHost>();
  for (String hostName : hostNames) {
    hosts.add(new VdcHost(this, hostName));
  }
}
origin: com.emc.ecs/smart-client

@Override
public boolean isHealthy() {
  return !isMaintenanceMode() && super.isHealthy();
}
origin: com.emc.ecs/smart-client

vdcNodeList.add(new VdcHost(vdc, host.getName()));
  if (vdcHost.equals(node)) {
    hostPresent = true;
    nodeI.remove();
  log.info("host " + vdcHost.getName() + " was not in the updated node list; removing from VDC " + vdc.getName());
  vdcI.remove();
log.info("adding host " + node.getName() + " to VDC " + vdc.getName());
vdc.getHosts().add(new VdcHost(vdc, node.getName()));
origin: com.emc.ecs/object-client

@ConfigUriProperty(type = ConfigUriProperty.Type.Host)
public String getHost() {
  if (getVdcs() == null || getVdcs().isEmpty()) return null;
  return getVdcs().get(0).getHosts().get(0).getName();
}
origin: com.emc.ecs/smart-client

@Override
public void runHealthCheck(Host host) {
  // header is workaround for STORAGE-1833
  PingResponse response = client.resource(getRequestUri(host, "/?ping")).header("x-emc-namespace", "x")
      .get(PingResponse.class);
  if (host instanceof VdcHost) {
    PingItem.Status status = PingItem.Status.OFF;
    if (response != null && response.getPingItemMap() != null) {
      PingItem pingItem = response.getPingItemMap().get(PingItem.MAINTENANCE_MODE);
      if (pingItem != null) status = pingItem.getStatus();
    }
    if (status == PingItem.Status.ON) ((VdcHost) host).setMaintenanceMode(true);
    else ((VdcHost) host).setMaintenanceMode(false);
  }
}
origin: EMCECS/ecs-sync

@Override
public String getAsText() {
  Vdc vdc = (Vdc) getValue();
  if (vdc.getHosts().isEmpty()) return "";
  List<String> names = new ArrayList<>();
  for (Host host : vdc.getHosts()) {
    names.add(host.getName());
  }
  if (vdc.getName() == null || vdc.getName().equals(vdc.getHosts().get(0).getName())) {
    return SyncUtil.join(names, ",");
  } else {
    return String.format("%s(%s)", vdc.getName(), SyncUtil.join(names, ","));
  }
}
origin: com.emc.ecs/object-client

  @Override
  public boolean shouldVeto(Host host, Map<String, Object> requestProperties) {
    Vdc vdc = (Vdc) requestProperties.get(PROP_GEO_PINNED_VDC);

    return (vdc != null && host instanceof VdcHost && !vdc.equals(((VdcHost) host).getVdc()));
  }
}
origin: com.emc.ecs/smart-client

protected List<VdcHost> createVdcHosts(List<? extends Host> hosts) {
  List<VdcHost> vdcHosts = new ArrayList<VdcHost>();
  for (Host host : hosts) {
    vdcHosts.add(new VdcHost(this, host.getName()));
  }
  return vdcHosts;
}
origin: com.emc.ecs/smart-client

@Override
public int hashCode() {
  int result = super.hashCode();
  result = 31 * result + getVdc().hashCode();
  return result;
}
com.emc.rest.smart.ecsVdcHost

Most used methods

  • getName
  • getVdc
  • <init>
  • equals
  • isMaintenanceMode
  • setMaintenanceMode

Popular in Java

  • Start an intent from android
  • getExternalFilesDir (Context)
  • onCreateOptionsMenu (Activity)
  • onRequestPermissionsResult (Fragment)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Permission (java.security)
    Legacy security code; do not use.
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • JCheckBox (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Top plugins for WebStorm
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