Last active
October 12, 2015 00:28
-
-
Save ericacm/3943149 to your computer and use it in GitHub Desktop.
ClusterService / ClusterConfig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait ClusterService { | |
def initialize() | |
def enabled: Boolean | |
def clusterStatus: ClusterStatus | |
} | |
case class ClusterStatus( | |
current: String, | |
isLeader: Boolean, leader: String, | |
participants: Iterable[String]) | |
@Configuration // Non-testing version | |
class ClusterConfig { | |
@Bean def clusterService: ClusterService = new ZookeeperServiceImpl | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment