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

brooklyn.util.task.DeferredSupplier Maven / Gradle / Ivy

package brooklyn.util.task;

import com.google.common.base.Supplier;

/**
 * A class that supplies objects of a single type. When used as a ConfigKey value,
 * the evaluation is deferred until getConfig() is called. The returned value will then
 * be coerced to the correct type. 
 * 
 * Subsequent calls to getConfig will result in further calls to deferredProvider.get(), 
 * rather than reusing the result. If you want to reuse the result, consider instead 
 * using a Future.
 * 
 * Note that this functionality replaces the ues of Closure in brooklyn 0.4.0, which 
 * served the same purpose.
 */
public interface DeferredSupplier extends Supplier {
    @Override
    T get();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy