Examples of checkSize()


Examples of org.archive.io.WriterPoolMember.checkSize()

        WriterPoolMember writer = getPool().borrowFile();
        long position = writer.getPosition();
        // See if we need to open a new file because we've exceeded maxBytes.
        // Call to checkFileSize will open new file if we're at maximum for
        // current file.
        writer.checkSize();
        if (writer.getPosition() != position) {
            // We just closed the file because it was larger than maxBytes.
            // Add to the totalBytesWritten the size of the first record
            // in the file, if any.
            setTotalBytesWritten(getTotalBytesWritten() +
View Full Code Here

Examples of org.archive.io.warc.WARCWriter.checkSize()

        long position = writer.getPosition();
        try {
            // See if we need to open a new file because we've exceeded maxBytes.
            // Call to checkFileSize will open new file if we're at maximum for
            // current file.
            writer.checkSize();
            if (writer.getPosition() != position) {
                // We just closed the file because it was larger than maxBytes.
                // Add to the totalBytesWritten the size of the first record
                // in the file, if any.
                setTotalBytesWritten(getTotalBytesWritten() +
View Full Code Here

Examples of org.hornetq.core.journal.impl.TimedBuffer.checkSize()

               bytes[j] = UnitTestCase.getSamplebyte(x++);
            }

            HornetQBuffer buff = HornetQBuffers.wrappedBuffer(bytes);

            timedBuffer.checkSize(10);
            timedBuffer.addBytes(buff, false, dummyCallback);
         }

         timedBuffer.checkSize(1);
View Full Code Here

Examples of org.hornetq.core.journal.impl.TimedBuffer.checkSize()

            timedBuffer.checkSize(10);
            timedBuffer.addBytes(buff, false, dummyCallback);
         }

         timedBuffer.checkSize(1);

         Assert.assertEquals(1, flushTimes.get());

         ByteBuffer flushedBuffer = buffers.get(0);
View Full Code Here

Examples of org.hornetq.core.journal.impl.TimedBuffer.checkSize()

            bytes[j] = UnitTestCase.getSamplebyte(x++);
         }

         HornetQBuffer buff = HornetQBuffers.wrappedBuffer(bytes);

         timedBuffer.checkSize(10);
         timedBuffer.addBytes(buff, false, dummyCallback);

         Thread.sleep(200);

         Assert.assertEquals(0, flushTimes.get());
View Full Code Here

Examples of org.hornetq.core.journal.impl.TimedBuffer.checkSize()

            bytes[j] = UnitTestCase.getSamplebyte(x++);
         }

         buff = HornetQBuffers.wrappedBuffer(bytes);

         timedBuffer.checkSize(10);
         timedBuffer.addBytes(buff, true, dummyCallback);

         Thread.sleep(500);

         Assert.assertEquals(1, flushTimes.get());
View Full Code Here

Examples of org.hornetq.core.journal.impl.TimedBuffer.checkSize()

               bytes[j] = UnitTestCase.getSamplebyte(x++);
            }

            HornetQBuffer buff = HornetQBuffers.wrappedBuffer(bytes);

            timedBuffer.checkSize(10);
            timedBuffer.addBytes(buff, false, dummyCallback);
         }

         timedBuffer.checkSize(1);
View Full Code Here

Examples of org.hornetq.core.journal.impl.TimedBuffer.checkSize()

            timedBuffer.checkSize(10);
            timedBuffer.addBytes(buff, false, dummyCallback);
         }

         timedBuffer.checkSize(1);

         Assert.assertEquals(1, flushTimes.get());

         ByteBuffer flushedBuffer = buffers.get(0);
View Full Code Here

Examples of org.hornetq.core.journal.impl.TimedBuffer.checkSize()

            bytes[j] = UnitTestCase.getSamplebyte(x++);
         }

         HornetQBuffer buff = HornetQBuffers.wrappedBuffer(bytes);

         timedBuffer.checkSize(10);
         timedBuffer.addBytes(buff, false, dummyCallback);

         Thread.sleep(200);

         Assert.assertEquals(0, flushTimes.get());
View Full Code Here

Examples of org.hornetq.core.journal.impl.TimedBuffer.checkSize()

            bytes[j] = UnitTestCase.getSamplebyte(x++);
         }

         buff = HornetQBuffers.wrappedBuffer(bytes);

         timedBuffer.checkSize(10);
         timedBuffer.addBytes(buff, true, dummyCallback);

         Thread.sleep(500);

         Assert.assertEquals(1, flushTimes.get());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.