public interface Feature extends ComponentRegistry
Reusable features can be shared across teams. Each reusable feature should be built into in its own Maven artifact for ease of re-use across development teams.
Feature Concepts:
| Modifier and Type | Method and Description |
|---|---|
void |
finish(Server server)
Called by Helix Server when the server going to stop.
|
String |
getFeatureName()
Returns the name of this feature.
|
void |
logFeatureDetails(org.slf4j.Logger logger)
Logs the feature configuration to the provided logger.
|
void |
start(Server server)
Called by Helix Server when the server is starting.
|
void |
stop(Server server)
Called by Helix Server when the server has stopped.
|
findByType, findByType, getRegistrationMapString getFeatureName()
void logFeatureDetails(org.slf4j.Logger logger)
logger - Logger to write the feature details tovoid start(Server server)
The order features will be called is the same order they initially registered with Helix. At the time this method is called, Vert.x will be initialized enabling the feature to create any Vert.x related resources.
Features should create and register any singleton components and allocate resources during the start call. Blocking operations are allowed in this method.
server - Helix Server that is starting upvoid finish(Server server)
The order features will be called is the reverse order they initially registered with Helix. Features should NOT release resources at this point.
Stop accepting new requests, and finish all ongoing requests. There will be a configurable delay between the finish and stop lifecycle callbacks to enable the server to finish in-flight requests.
server - Helix Server that is finishing in-flight requestsvoid stop(Server server)
The order features will be called is the reverse order they initially registered with Helix. Features must release all owned resources at this point. Blocking operations are allowed in this method.
server - Helix Server that is being stoppedCopyright © 2016. All rights reserved.