public class StandaloneClusterManager extends AbstractClusterManager implements org.springframework.context.ApplicationContextAware
ClusterManager that only contains a single node. While this class may seem to violate
the purpose of the library, this implementation is useful for local developing and testing.| Constructor and Description |
|---|
StandaloneClusterManager(ClusterConfigurationProperties clusterConfigurationProperties)
Constructor.
|
StandaloneClusterManager(ClusterConfigurationProperties clusterConfigurationProperties,
StandaloneClusterMember member)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<ClusterMember> |
getClusterMembers()
Returns the set of cluster members that will share workloads.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getProperties()
Returns the map that backs distributed properties.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setBeanFactory(org.springframework.beans.factory.config.AutowireCapableBeanFactory beanFactory)
Sets the bean factory used to autowire and initialize instructions.
|
protected <T> java.util.concurrent.Future<? extends T> |
submitInstruction(ClusterMember clusterMember,
Instruction<? extends T> instruction)
Submits the given instruction to the given cluster member.
|
getClusterConfigurationProperties, getProperty, getProperty, getProperty, setProperty, submitInstruction, submitInstructionspublic StandaloneClusterManager(ClusterConfigurationProperties clusterConfigurationProperties)
clusterConfigurationProperties - Scheduler configuration properties.public StandaloneClusterManager(ClusterConfigurationProperties clusterConfigurationProperties, StandaloneClusterMember member)
clusterConfigurationProperties - Scheduler configuration properties.member - Cluster member.public void setBeanFactory(org.springframework.beans.factory.config.AutowireCapableBeanFactory beanFactory)
beanFactory - Bean factory instance.protected <T> java.util.concurrent.Future<? extends T> submitInstruction(ClusterMember clusterMember, Instruction<? extends T> instruction)
submitInstruction in class AbstractClusterManagerT - The return type of the instruction.clusterMember - Cluster member to run the instruction on.instruction - Instruction to run.protected java.util.Map<java.lang.String,java.lang.Object> getProperties()
getProperties in class AbstractClusterManagerpublic java.util.List<ClusterMember> getClusterMembers()
getClusterMembers in interface ClusterManagerpublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansException