INT-1269 Missing using-direct-buffers Attribute

This commit is contained in:
Gary Russell
2010-07-27 00:29:20 +00:00
parent eef7883e56
commit f5d6e0480b
3 changed files with 13 additions and 1 deletions

View File

@@ -285,7 +285,7 @@ connections.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="using-nio" type="xsd:string">
<xsd:attribute name="using-nio" type="xsd:string" default="false">
<xsd:annotation>
<xsd:documentation>
If true, the factory will use java.nio.channel.SocketChannel for communication;
@@ -301,6 +301,14 @@ performance and may use fewer threads.
<xsd:attribute name="so-tcp-no-delay" type="xsd:string" />
<xsd:attribute name="so-timeout" type="xsd:string" />
<xsd:attribute name="so-traffic-class" type="xsd:string" />
<xsd:attribute name="using-direct-buffers" type="xsd:string" default="false">
<xsd:annotation>
<xsd:documentation>
If true, instructs the factory to use direct buffers if possible; only applies if
using-nio is true. Refer to ByteBuffer javadocs for more information.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="single-use" type="xsd:string">
<xsd:annotation>
<xsd:documentation>

View File

@@ -296,6 +296,7 @@
single-use="true"
task-executor="externalTE"
pool-size="321"
using-direct-buffers="true"
/>
<ip:tcp-connection-factory
@@ -316,6 +317,7 @@
single-use="true"
task-executor="externalTE"
pool-size="123"
using-direct-buffers="true"
/>
<bean id="serial" class="org.springframework.commons.serializer.JavaSerializationConverter" />

View File

@@ -435,6 +435,7 @@ public class ParserUnitTests {
assertEquals(true, dfa.getPropertyValue("singleUse"));
assertSame(taskExecutor, dfa.getPropertyValue("taskExecutor"));
assertEquals(321, dfa.getPropertyValue("poolSize"));
assertEquals(true, dfa.getPropertyValue("usingDirectBuffers"));
}
@Test
@@ -453,6 +454,7 @@ public class ParserUnitTests {
assertEquals(true, dfa.getPropertyValue("singleUse"));
assertSame(taskExecutor, dfa.getPropertyValue("taskExecutor"));
assertEquals(123, dfa.getPropertyValue("poolSize"));
assertEquals(true, dfa.getPropertyValue("usingDirectBuffers"));
}
@Test