Package com.elastisys.scale.cloudadapers.api

Examples of com.elastisys.scale.cloudadapers.api.CloudAdapterException


          jsonConfig, BaseCloudAdapterConfig.class);
      configuration.validate();
      return configuration;
    } catch (Exception e) {
      Throwables.propagateIfInstanceOf(e, CloudAdapterException.class);
      throw new CloudAdapterException(
          "failed to validate cloud adapter configuration: "
              + e.getMessage(), e);
    }
  }
View Full Code Here


    } catch (Exception e) {
      String message = format("failed to retrieve scaling group: %s\n%s",
          e.getMessage(), Throwables.getStackTraceAsString(e));
      this.eventBus.post(new Alert(AlertTopics.POOL_FETCH.name(),
          AlertSeverity.ERROR, UtcTime.now(), message));
      throw new CloudAdapterException(message, e);
    }
  }
View Full Code Here

          + "\"%s\" to desired capacity %d: %s\n%s", scalingGroup(),
          desiredSize(), e.getMessage(),
          Throwables.getStackTraceAsString(e));
      this.eventBus.post(new Alert(AlertTopics.RESIZE.name(),
          AlertSeverity.ERROR, UtcTime.now(), message));
      throw new CloudAdapterException(message, e);
    } finally {
      this.lock.unlock();
    }
  }
View Full Code Here

        this.alerts.validate();
      }
    } catch (Exception e) {
      // no need to wrap further if already a config exception
      Throwables.propagateIfInstanceOf(e, CloudAdapterException.class);
      throw new CloudAdapterException(format(
          "failed to validate configuration: %s", e.getMessage()), e);
    }
  }
View Full Code Here

    public void validate() throws CloudAdapterException {
      try {
        checkNotNull(this.name, "missing name");
        checkNotNull(this.config, "missing config");
      } catch (Exception e) {
        throw new CloudAdapterException(format(
            "failed to validate scalingGroup configuration: %s",
            e.getMessage()), e);
      }
    }
View Full Code Here

        checkNotNull(this.image, "missing image");
        checkNotNull(this.keyPair, "missing keyPair");
        checkNotNull(this.securityGroups, "missing securityGroups");
        checkNotNull(this.bootScript, "missing bootScript");
      } catch (Exception e) {
        throw new CloudAdapterException(
            format("failed to validate scaleUpConfig: %s",
                e.getMessage()), e);
      }
    }
View Full Code Here

            "victim selection policy cannot be null");
        checkArgument(this.instanceHourMargin < 3600,
            "instance hour margin must be <= 3600");

      } catch (Exception e) {
        throw new CloudAdapterException(format(
            "failed to validate scaleDownConfig: %s",
            e.getMessage()), e);
      }
    }
View Full Code Here

            "missing run-time liveness check");

        this.bootTimeCheck.validate();
        this.runTimeCheck.validate();
      } catch (Exception e) {
        throw new CloudAdapterException(format(
            "failed to validate liveness configuration: %s",
            e.getMessage()), e);
      }
    }
View Full Code Here

        checkArgument(this.maxRetries >= 0,
            "boot-time liveness max retries must be >= 0");
        checkArgument(this.retryDelay >= 0,
            "boot-time liveness retry delay must be >= 0");
      } catch (Exception e) {
        throw new CloudAdapterException(format(
            "failed to validate bootTimeLiveness config: %s",
            e.getMessage()), e);
      }
    }
View Full Code Here

        checkArgument(this.maxRetries > 0,
            "run-time liveness test max retries must be >= 0");
        checkArgument(this.retryDelay >= 0,
            "run-time liveness test retry delay must be >= 0");
      } catch (Exception e) {
        throw new CloudAdapterException(format(
            "failed to validate runTimeLiveness config: %s",
            e.getMessage()), e);
      }
    }
View Full Code Here

TOP

Related Classes of com.elastisys.scale.cloudadapers.api.CloudAdapterException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.