All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.vertx.ext.consul.WatchResult Maven / Gradle / Ivy

/*
 * Copyright (c) 2016 The original author or authors
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * and Apache License v2.0 which accompanies this distribution.
 *
 *      The Eclipse Public License is available at
 *      http://www.eclipse.org/legal/epl-v10.html
 *
 *      The Apache License v2.0 is available at
 *      http://www.opensource.org/licenses/apache2.0.php
 *
 * You may elect to redistribute this code under either of these licenses.
 */
package io.vertx.ext.consul;

import io.vertx.codegen.annotations.VertxGen;

@VertxGen
public interface WatchResult {

  /**
   * The previous result of the operation.
   *
   * @return the previous result.
   */
  T prevResult();

  /**
   * The next result of the operation. This will be null if the operation failed.
   *
   * @return the next result or null if the operation failed.
   */
  T nextResult();

  /**
   * A Throwable describing failure. This will be null if the operation succeeded.
   *
   * @return the cause or null if the operation succeeded.
   */
  Throwable cause();

  /**
   * Did it succeed?
   *
   * @return true if it succeded or false otherwise
   */
  boolean succeeded();

  /**
   * Did it fail?
   *
   * @return true if it failed or false otherwise
   */
  boolean failed();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy