Author: clebert.suconic(a)jboss.com
Date: 2009-11-28 17:57:54 -0500 (Sat, 28 Nov 2009)
New Revision: 8453
Modified:
trunk/src/main/org/hornetq/core/journal/impl/JournalImpl.java
Log:
Replacing perfBlast
Modified: trunk/src/main/org/hornetq/core/journal/impl/JournalImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/journal/impl/JournalImpl.java 2009-11-28 22:04:18 UTC
(rev 8452)
+++ trunk/src/main/org/hornetq/core/journal/impl/JournalImpl.java 2009-11-28 22:57:54 UTC
(rev 8453)
@@ -3370,13 +3370,29 @@
{
lockAppend.lock();
-// HornetQBuffer bb = newBuffer(128 * 1024);
-//
-// for (int i = 0; i < pages; i++)
-// {
-// appendRecord(bb, false, false, null, null);
-// }
+ final ByteArrayEncoding byteEncoder = new ByteArrayEncoding(new byte[128 *
1024]);
+
+ JournalInternalRecord blastRecord = new JournalInternalRecord()
+ {
+ @Override
+ public int getEncodeSize()
+ {
+ return byteEncoder.getEncodeSize();
+ }
+
+ public void encode(HornetQBuffer buffer)
+ {
+ byteEncoder.encode(buffer);
+ }
+ };
+
+
+ for (int i = 0; i < pages; i++)
+ {
+ appendRecord(blastRecord, false, false, null, null);
+ }
+
lockAppend.unlock();
}
catch (Exception e)
Show replies by date