|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.scale7.cassandra.pelops.spring.CachePerNodePoolFactoryBean
@Deprecated public class CachePerNodePoolFactoryBean
Used to initialize a Pelops pool that honors Spring's context life cycle. Using this class ensures that the dependency graph that's managed by Spring won't attempt to use Pelops when it isn't available.
To use it add the following to your context file:<bean id="pelopsPool" class="org.scale7.cassandra.pelops.spring.CachePerNodePoolFactoryBean"> <property name="cluster"> <bean class="org.scale7.cassandra.pelops.Cluster"> <constructor-arg index="0" type="java.lang.String" value="${digitalpigeon.cassandra.host}" /> <constructor-arg index="1" type="int" value="${digitalpigeon.cassandra.port}" /> </bean> </property> <property name="keyspace" value="keyspace" /> </bean>
NOTE: If you intend to use this class you'll need to bypass the static convenience methods on
Pelops
.
Inject the instance of IThriftPool
created by this factory bean into your
application code and use it's method directly.
private IThriftPool pool;
public void doStuff() { Selector selector = pool.createSelector(); ... }
Constructor Summary | |
---|---|
CachePerNodePoolFactoryBean()
Deprecated. |
Method Summary | |
---|---|
void |
afterPropertiesSet()
Deprecated. Initializes the Pelops pool. |
void |
destroy()
Deprecated. Shuts down the Pelops pool. |
Cluster |
getCluster()
Deprecated. |
String |
getKeyspace()
Deprecated. |
IThriftPool |
getObject()
Deprecated. . |
Class<?> |
getObjectType()
Deprecated. . |
OperandPolicy |
getOperandPolicy()
Deprecated. |
CachePerNodePool.Policy |
getPoolPolicy()
Deprecated. |
boolean |
isSingleton()
Deprecated. . |
void |
setCluster(Cluster cluster)
Deprecated. |
void |
setKeyspace(String keyspace)
Deprecated. |
void |
setOperandPolicy(OperandPolicy operandPolicy)
Deprecated. |
void |
setPoolPolicy(CachePerNodePool.Policy poolPolicy)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CachePerNodePoolFactoryBean()
Method Detail |
---|
public IThriftPool getObject() throws Exception
getObject
in interface org.springframework.beans.factory.FactoryBean<IThriftPool>
Exception
public Class<?> getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean<IThriftPool>
IThriftPool
public boolean isSingleton()
isSingleton
in interface org.springframework.beans.factory.FactoryBean<IThriftPool>
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
- if an error occurspublic void destroy() throws Exception
destroy
in interface org.springframework.beans.factory.DisposableBean
Exception
- if an error occursorg.scale7.cassandra.pelops.pool.IThriftPool#shutdown()}
public Cluster getCluster()
public void setCluster(Cluster cluster)
public String getKeyspace()
public void setKeyspace(String keyspace)
public CachePerNodePool.Policy getPoolPolicy()
public void setPoolPolicy(CachePerNodePool.Policy poolPolicy)
public OperandPolicy getOperandPolicy()
public void setOperandPolicy(OperandPolicy operandPolicy)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |