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

com.netflix.hystrix.HystrixKey Maven / Gradle / Ivy

There is a newer version: 1.5.18
Show newest version
package com.netflix.hystrix;

/**
 * Basic class for hystrix keys
 */
public interface HystrixKey {
    /**
     * The word 'name' is used instead of 'key' so that Enums can implement this interface and it work natively.
     *
     * @return String
     */
    String name();

    /**
     * Default implementation of the interface
     */
    abstract class HystrixKeyDefault implements HystrixKey {
        private final String name;

        public HystrixKeyDefault(String name) {
            this.name = name;
        }

        @Override
        public String name() {
            return name;
        }

        @Override
        public String toString() {
            return name;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy