org.springframework.yarn.test.support
Class ClusterDelegatingFactoryBean

java.lang.Object
  extended by org.springframework.yarn.test.support.ClusterDelegatingFactoryBean
All Implemented Interfaces:
DisposableBean, FactoryBean<YarnCluster>, InitializingBean

public class ClusterDelegatingFactoryBean
extends Object
implements InitializingBean, DisposableBean, FactoryBean<YarnCluster>

Delegates to YarnClusterManager for handling lifecycle of YarnCluster. This is needed order to clear and shutdown cluster during the application context refresh if DirtiesContext is used.

Author:
Janne Valkealahti

Constructor Summary
ClusterDelegatingFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
 void destroy()
           
 YarnCluster getObject()
           
 Class<YarnCluster> getObjectType()
           
 boolean isSingleton()
           
 void setId(String id)
           
 void setNodes(int nodes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClusterDelegatingFactoryBean

public ClusterDelegatingFactoryBean()
Method Detail

getObject

public YarnCluster getObject()
                      throws Exception
Specified by:
getObject in interface FactoryBean<YarnCluster>
Throws:
Exception

getObjectType

public Class<YarnCluster> getObjectType()
Specified by:
getObjectType in interface FactoryBean<YarnCluster>

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface FactoryBean<YarnCluster>

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception

destroy

public void destroy()
             throws Exception
Specified by:
destroy in interface DisposableBean
Throws:
Exception

setId

public void setId(String id)

setNodes

public void setNodes(int nodes)