Codota Logo
StubComputeServiceAdapter.setStateOnNodeAfterDelay
Code IndexAdd Codota to your IDE (free)

How to use
setStateOnNodeAfterDelay
method
in
org.jclouds.compute.stub.config.StubComputeServiceAdapter

Best Java code snippets using org.jclouds.compute.stub.config.StubComputeServiceAdapter.setStateOnNodeAfterDelay (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: jclouds/legacy-jclouds

@Override
public void destroyNode(final String id) {
 NodeMetadata node = nodes.get(id);
 if (node == null)
   return;
 setStateOnNodeAfterDelay(Status.PENDING, node, 0);
 setStateOnNodeAfterDelay(Status.TERMINATED, node, 50);
 ioExecutor.execute(new Runnable() {
   @Override
   public void run() {
    try {
      Thread.sleep(200);
    } catch (InterruptedException e) {
      Throwables.propagate(e);
    } finally {
      nodes.remove(id);
    }
   }
 });
}
origin: io.cloudsoft.jclouds/jclouds-compute

@Override
public void destroyNode(final String id) {
 NodeMetadata node = nodes.get(id);
 if (node == null)
   return;
 setStateOnNodeAfterDelay(Status.PENDING, node, 0);
 setStateOnNodeAfterDelay(Status.TERMINATED, node, 50);
 groupsForNodes.removeAll(id);
 
 ioExecutor.execute(new Runnable() {
   @Override
   public void run() {
    try {
      Thread.sleep(200);
    } catch (InterruptedException e) {
      Throwables.propagate(e);
    } finally {
      nodes.remove(id);
    }
   }
 });
}
origin: org.apache.jclouds/jclouds-compute

@Override
public void destroyNode(final String id) {
 NodeMetadata node = nodes.get(id);
 if (node == null)
   return;
 setStateOnNodeAfterDelay(Status.PENDING, node, 0);
 setStateOnNodeAfterDelay(Status.TERMINATED, node, 50);
 groupsForNodes.removeAll(id);
 executor.execute(new Runnable() {
   @Override
   public void run() {
    try {
      Thread.sleep(200);
    } catch (InterruptedException e) {
      Throwables.propagate(e);
    } finally {
      nodes.remove(id);
    }
   }
 });
}
origin: apache/jclouds

@Override
public void destroyNode(final String id) {
 NodeMetadata node = nodes.get(id);
 if (node == null)
   return;
 setStateOnNodeAfterDelay(Status.PENDING, node, 0);
 setStateOnNodeAfterDelay(Status.TERMINATED, node, 50);
 groupsForNodes.removeAll(id);
 executor.execute(new Runnable() {
   @Override
   public void run() {
    try {
      Thread.sleep(200);
    } catch (InterruptedException e) {
      Throwables.propagate(e);
    } finally {
      nodes.remove(id);
    }
   }
 });
}
origin: jclouds/legacy-jclouds

@Override
public void rebootNode(String id) {
 NodeMetadata node = nodes.get(id);
 if (node == null)
   throw new ResourceNotFoundException("node not found: " + id);
 setStateOnNode(Status.PENDING, node);
 setStateOnNodeAfterDelay(Status.RUNNING, node, 50);
}
origin: io.cloudsoft.jclouds/jclouds-compute

@Override
public void rebootNode(String id) {
 NodeMetadata node = nodes.get(id);
 if (node == null)
   throw new ResourceNotFoundException("node not found: " + id);
 setStateOnNode(Status.PENDING, node);
 setStateOnNodeAfterDelay(Status.RUNNING, node, 50);
}
origin: org.apache.jclouds/jclouds-compute

@Override
public void rebootNode(String id) {
 NodeMetadata node = nodes.get(id);
 if (node == null)
   throw new ResourceNotFoundException("node not found: " + id);
 setStateOnNode(Status.PENDING, node);
 setStateOnNodeAfterDelay(Status.RUNNING, node, 50);
}
origin: apache/jclouds

@Override
public void rebootNode(String id) {
 NodeMetadata node = nodes.get(id);
 if (node == null)
   throw new ResourceNotFoundException("node not found: " + id);
 setStateOnNode(Status.PENDING, node);
 setStateOnNodeAfterDelay(Status.RUNNING, node, 50);
}
origin: jclouds/legacy-jclouds

@Override
public void suspendNode(String id) {
 NodeMetadata node = nodes.get(id);
 if (node == null)
   throw new ResourceNotFoundException("node not found: " + id);
 if (node.getStatus() == Status.SUSPENDED)
   return;
 if (node.getStatus() != Status.RUNNING)
   throw new IllegalStateException("to suspend a node, it must be in running status, not: " + formatStatus(node));
 setStateOnNode(Status.PENDING, node);
 setStateOnNodeAfterDelay(Status.SUSPENDED, node, 50);
}
origin: jclouds/legacy-jclouds

@Override
public void resumeNode(String id) {
 NodeMetadata node = nodes.get(id);
 if (node == null)
   throw new ResourceNotFoundException("node not found: " + id);
 if (node.getStatus() == Status.RUNNING)
   return;
 if (node.getStatus() != Status.SUSPENDED)
   throw new IllegalStateException("to resume a node, it must be in suspended status, not: " + formatStatus(node));
 setStateOnNode(Status.PENDING, node);
 setStateOnNodeAfterDelay(Status.RUNNING, node, 50);
}
origin: org.apache.jclouds/jclouds-compute

@Override
public void resumeNode(String id) {
 NodeMetadata node = nodes.get(id);
 if (node == null)
   throw new ResourceNotFoundException("node not found: " + id);
 if (node.getStatus() == Status.RUNNING)
   return;
 if (node.getStatus() != Status.SUSPENDED)
   throw new IllegalStateException("to resume a node, it must be in suspended status, not: " + formatStatus(node));
 setStateOnNode(Status.PENDING, node);
 setStateOnNodeAfterDelay(Status.RUNNING, node, 50);
}
origin: org.apache.jclouds/jclouds-compute

@Override
public void suspendNode(String id) {
 NodeMetadata node = nodes.get(id);
 if (node == null)
   throw new ResourceNotFoundException("node not found: " + id);
 if (node.getStatus() == Status.SUSPENDED)
   return;
 if (node.getStatus() != Status.RUNNING)
   throw new IllegalStateException("to suspend a node, it must be in running status, not: " + formatStatus(node));
 setStateOnNode(Status.PENDING, node);
 setStateOnNodeAfterDelay(Status.SUSPENDED, node, 50);
}
origin: io.cloudsoft.jclouds/jclouds-compute

@Override
public void resumeNode(String id) {
 NodeMetadata node = nodes.get(id);
 if (node == null)
   throw new ResourceNotFoundException("node not found: " + id);
 if (node.getStatus() == Status.RUNNING)
   return;
 if (node.getStatus() != Status.SUSPENDED)
   throw new IllegalStateException("to resume a node, it must be in suspended status, not: " + formatStatus(node));
 setStateOnNode(Status.PENDING, node);
 setStateOnNodeAfterDelay(Status.RUNNING, node, 50);
}
origin: io.cloudsoft.jclouds/jclouds-compute

@Override
public void suspendNode(String id) {
 NodeMetadata node = nodes.get(id);
 if (node == null)
   throw new ResourceNotFoundException("node not found: " + id);
 if (node.getStatus() == Status.SUSPENDED)
   return;
 if (node.getStatus() != Status.RUNNING)
   throw new IllegalStateException("to suspend a node, it must be in running status, not: " + formatStatus(node));
 setStateOnNode(Status.PENDING, node);
 setStateOnNodeAfterDelay(Status.SUSPENDED, node, 50);
}
origin: apache/jclouds

@Override
public void suspendNode(String id) {
 NodeMetadata node = nodes.get(id);
 if (node == null)
   throw new ResourceNotFoundException("node not found: " + id);
 if (node.getStatus() == Status.SUSPENDED)
   return;
 if (node.getStatus() != Status.RUNNING)
   throw new IllegalStateException("to suspend a node, it must be in running status, not: " + formatStatus(node));
 setStateOnNode(Status.PENDING, node);
 setStateOnNodeAfterDelay(Status.SUSPENDED, node, 50);
}
origin: apache/jclouds

@Override
public void resumeNode(String id) {
 NodeMetadata node = nodes.get(id);
 if (node == null)
   throw new ResourceNotFoundException("node not found: " + id);
 if (node.getStatus() == Status.RUNNING)
   return;
 if (node.getStatus() != Status.SUSPENDED)
   throw new IllegalStateException("to resume a node, it must be in suspended status, not: " + formatStatus(node));
 setStateOnNode(Status.PENDING, node);
 setStateOnNodeAfterDelay(Status.RUNNING, node, 50);
}
origin: org.apache.jclouds/jclouds-compute

setStateOnNodeAfterDelay(Status.RUNNING, node, 100);
return new NodeWithInitialCredentials(node);
origin: io.cloudsoft.jclouds/jclouds-compute

setStateOnNodeAfterDelay(Status.RUNNING, node, 100);
return new NodeWithInitialCredentials(node);
origin: apache/jclouds

setStateOnNodeAfterDelay(Status.RUNNING, node, 100);
return new NodeWithInitialCredentials(node);
origin: jclouds/legacy-jclouds

@Override
public NodeWithInitialCredentials createNodeWithGroupEncodedIntoName(String group, String name, Template template) {
 NodeMetadataBuilder builder = new NodeMetadataBuilder();
 String id = idProvider.get() + "";
 builder.ids(id);
 builder.name(name);
 // using a predictable name so tests will pass
 builder.hostname(group);
 builder.tags(template.getOptions().getTags());
 builder.userMetadata(template.getOptions().getUserMetadata());
 builder.group(group);
 builder.location(location.get());
 builder.imageId(template.getImage().getId());
 builder.operatingSystem(template.getImage().getOperatingSystem());
 builder.status(Status.PENDING);
 builder.publicAddresses(ImmutableSet.<String> of(publicIpPrefix + id));
 builder.privateAddresses(ImmutableSet.<String> of(privateIpPrefix + id));
 builder.credentials(LoginCredentials.builder().user("root").password(passwordPrefix + id).build());
 NodeMetadata node = builder.build();
 nodes.put(node.getId(), node);
 setStateOnNodeAfterDelay(Status.RUNNING, node, 100);
 return new NodeWithInitialCredentials(node);
}
org.jclouds.compute.stub.configStubComputeServiceAdaptersetStateOnNodeAfterDelay

Popular methods of StubComputeServiceAdapter

  • listImages
  • setStateOnNode

Popular in Java

  • Finding current android device location
  • getSupportFragmentManager (FragmentActivity)
  • putExtra (Intent)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now