public interface CamelClusterService extends Service, CamelContextAware, IdAware, Ordered
Modifier and Type | Interface and Description |
---|---|
static interface |
CamelClusterService.Selector |
Modifier and Type | Method and Description |
---|---|
default Map<String,Object> |
getAttributes()
Attributes associated to the service.
|
Collection<String> |
getNamespaces()
Return the namespaces handled by this service.
|
default int |
getOrder()
Gets the order.
|
CamelClusterView |
getView(String namespace)
Get a view of the cluster bound to a namespace creating it if needed.
|
boolean |
isLeader(String namespace)
Check if the service is the leader on the given namespace.
|
void |
releaseView(CamelClusterView view)
Release a view if it has no references.
|
void |
startView(String namespace)
Force start of the view associated to the give namespace.
|
void |
stopView(String namespace)
Force stop of the view associated to the give namespace.
|
default <T extends CamelClusterService> |
unwrap(Class<T> clazz)
Access the underlying concrete CamelClusterService implementation to
provide access to further features.
|
getCamelContext, setCamelContext, trySetCamelContext
default int getOrder()
Ordered
Integer.MAX_VALUE
or eg Ordered.LOWEST
.CamelClusterView getView(String namespace) throws Exception
namespace
- the namespace the view refer to.Exception
- if the view can't be created.void releaseView(CamelClusterView view) throws Exception
view
- the view.Exception
Collection<String> getNamespaces()
void startView(String namespace) throws Exception
Exception
void stopView(String namespace) throws Exception
Exception
boolean isLeader(String namespace)
namespace
- the namespace.default <T extends CamelClusterService> T unwrap(Class<T> clazz)
clazz
- the proprietary class or interface of the underlying concrete CamelClusterService.Apache Camel