Setting default QosParameters for tests.

This commit is contained in:
J. Brisbin
2010-12-09 12:53:29 -06:00
parent 6bd547bfc5
commit e0d79d1048
3 changed files with 20 additions and 2 deletions

View File

@@ -168,6 +168,14 @@ public abstract class AbstractRiakTemplate extends RestGatewaySupport implements
this.useCache = useCache;
}
public QosParameters getDefaultQosParameters() {
return defaultQosParameters;
}
public void setDefaultQosParameters(QosParameters defaultQosParameters) {
this.defaultQosParameters = defaultQosParameters;
}
/**
* Extract the prefix from the URI for use in creating links.
*

View File

@@ -1,11 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<import resource="classpath:/META-INF/spring/app-context.xml"/>
<bean id="qos" class="org.springframework.data.keyvalue.riak.core.RiakQosParameters"
p:durableWriteThreshold="all"
p:writeThreshold="all"/>
<bean id="riakTemplate"
class="org.springframework.data.keyvalue.riak.core.RiakKeyValueTemplate"/>
class="org.springframework.data.keyvalue.riak.core.RiakKeyValueTemplate"
p:defaultQosParameters-ref="qos"/>
</beans>

View File

@@ -18,12 +18,17 @@
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<import resource="classpath:/META-INF/spring/app-context.xml"/>
<bean id="qos" class="org.springframework.data.keyvalue.riak.core.RiakQosParameters"
p:durableWriteThreshold="all"
p:writeThreshold="all"/>
<bean id="riakTemplate"
class="org.springframework.data.keyvalue.riak.core.RiakTemplate"/>
class="org.springframework.data.keyvalue.riak.core.RiakTemplate"
p:defaultQosParameters-ref="qos"/>
</beans>