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

How to use
MetricStore
in
com.netflix.spinnaker.halyard.config.model.v1.node

Best Java code snippets using com.netflix.spinnaker.halyard.config.model.v1.node.MetricStore (Showing top 6 results out of 315)

origin: spinnaker/halyard

public void setMetricStore(String deploymentName, MetricStore metricStore) {
 MetricStores metricStores = getMetricStores(deploymentName);
 switch (metricStore.getMetricStoreType()) {
  case DATADOG:
   metricStores.setDatadog((DatadogStore) metricStore);
   break;
  case PROMETHEUS:
   metricStores.setPrometheus((PrometheusStore) metricStore);
   break;
  case STACKDRIVER:
   metricStores.setStackdriver((StackdriverStore) metricStore);
   break;
  default:
   throw new RuntimeException("Unknown Metric Store " + metricStore.getMetricStoreType());
 }
}
origin: spinnaker/halyard

public void setMetricStoreEnabled(String deploymentName, String metricStoreType, boolean enabled) {
 MetricStore metricStore = getMetricStore(deploymentName, metricStoreType);
 metricStore.setEnabled(enabled);
 setMetricStore(deploymentName, metricStore);
}
origin: spinnaker/halyard

 @Override
 protected void executeThis() {
  String currentDeployment = getCurrentDeployment();
  String metricStoreType = getMetricStoreType().getId();
  // Disable validation here, since we don't want an illegal config to prevent us from fixing it.
  MetricStore metricStore = new OperationHandler<MetricStore>()
    .setOperation(Daemon.getMetricStore(currentDeployment, metricStoreType, false))
    .setFailureMesssage("Failed to get " + metricStoreType + " method.")
    .get();

  int originalHash = metricStore.hashCode();

  metricStore = editMetricStore((T) metricStore);

  if (originalHash == metricStore.hashCode()) {
   AnsiUi.failure("No changes supplied.");
   return;
  }

  new OperationHandler<Void>()
    .setOperation(Daemon.setMetricStore(currentDeployment, metricStoreType, !noValidate, metricStore))
    .setFailureMesssage("Failed to edit " + metricStoreType + " method.")
    .setSuccessMessage("Successfully edited " + metricStoreType + " method.")
    .get();
 }
}
origin: com.netflix.spinnaker.halyard/halyard-cli

 @Override
 protected void executeThis() {
  String currentDeployment = getCurrentDeployment();
  String metricStoreType = getMetricStoreType().getId();
  // Disable validation here, since we don't want an illegal config to prevent us from fixing it.
  MetricStore metricStore = new OperationHandler<MetricStore>()
    .setOperation(Daemon.getMetricStore(currentDeployment, metricStoreType, false))
    .setFailureMesssage("Failed to get " + metricStoreType + " method.")
    .get();

  int originalHash = metricStore.hashCode();

  metricStore = editMetricStore((T) metricStore);

  if (originalHash == metricStore.hashCode()) {
   AnsiUi.failure("No changes supplied.");
   return;
  }

  new OperationHandler<Void>()
    .setOperation(Daemon.setMetricStore(currentDeployment, metricStoreType, !noValidate, metricStore))
    .setFailureMesssage("Failed to edit " + metricStoreType + " method.")
    .setSuccessMessage("Successfully edited " + metricStoreType + " method.")
    .get();
 }
}
origin: com.netflix.spinnaker.halyard/halyard-config

public void setMetricStoreEnabled(String deploymentName, String metricStoreType, boolean enabled) {
 MetricStore metricStore = getMetricStore(deploymentName, metricStoreType);
 metricStore.setEnabled(enabled);
 setMetricStore(deploymentName, metricStore);
}
origin: com.netflix.spinnaker.halyard/halyard-config

public void setMetricStore(String deploymentName, MetricStore metricStore) {
 MetricStores metricStores = getMetricStores(deploymentName);
 switch (metricStore.getMetricStoreType()) {
  case DATADOG:
   metricStores.setDatadog((DatadogStore) metricStore);
   break;
  case PROMETHEUS:
   metricStores.setPrometheus((PrometheusStore) metricStore);
   break;
  case STACKDRIVER:
   metricStores.setStackdriver((StackdriverStore) metricStore);
   break;
  default:
   throw new RuntimeException("Unknown Metric Store " + metricStore.getMetricStoreType());
 }
}
com.netflix.spinnaker.halyard.config.model.v1.nodeMetricStore

Most used methods

  • getMetricStoreType
  • hashCode
  • setEnabled

Popular in Java

  • Making http requests using okhttp
  • setContentView (Activity)
  • getExternalFilesDir (Context)
  • scheduleAtFixedRate (Timer)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Top plugins for Android Studio
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