public interface ServiceProvider<T> extends Closeable
ProviderStrategy
paired with an InstanceProvider| Modifier and Type | Method and Description |
|---|---|
Collection<ServiceInstance<T>> |
getAllInstances()
Return the current available set of instances IMPORTANT: users
should not hold on to the instance returned.
|
ServiceInstance<T> |
getInstance()
Return an instance for a single use.
|
void |
noteError(ServiceInstance<T> instance)
Take note of an error connecting to the given instance.
|
void |
start()
The provider must be started before use
|
void start()
throws Exception
Exception - any errorsServiceInstance<T> getInstance() throws Exception
Exception - any errorsCollection<ServiceInstance<T>> getAllInstances() throws Exception
Exception - any errorsvoid noteError(ServiceInstance<T> instance)
DownInstancePolicy.instance - instance that had an errorCopyright © 2011–2016 The Apache Software Foundation. All rights reserved.