Codota Logo
BlockLogBuffer
Code IndexAdd Codota to your IDE (free)

How to use
BlockLogBuffer
in
org.objectweb.howl.log

Best Java code snippets using org.objectweb.howl.log.BlockLogBuffer (Showing top 9 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: apache/felix

/**
 * determines if buffer should be forced to disk.
 * 
 * <p>If there are any waiting threads, then buffer
 * is forced when it is 50 ms old.  Otherwise, if there
 * are no waiting threads, we wait 1/4 second before we
 * force.
 *
 * @return true if buffer should be forced now.
 */ 
boolean shouldForce()
{
 int forceDelta = getWaitingThreads() > 0 ? 50 : 250;
 long now = System.currentTimeMillis();
 return ((todPut + forceDelta) < now);
}

origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.howl

if (!compareBytes(headerId, HEADER_ID))
 throw new InvalidLogBufferException("HEADER_ID" + bufferInfo());
 throw new InvalidLogBufferException("bufferSize" + bufferInfo());
 throw new InvalidLogBufferException("data used: " + bytesUsed + bufferInfo());
 int expectedChecksum = checksum();
 buffer.clear().position(checksumOffset);
  throw new InvalidLogBufferException("CHECKSUM expected: " + Integer.toHexString(expectedChecksum) + bufferInfo());
if (!compareBytes(crlf, CRLF))
 throw new InvalidLogBufferException("HEADER_CRLF" + bufferInfo());
if (!compareBytes(footerId, FOOTER_ID))
 throw new InvalidLogBufferException("FOOTER_ID" + bufferInfo());
 throw new InvalidLogBufferException("FOOTER_BSN" + bufferInfo());
 throw new InvalidLogBufferException("FOOTER_TOD" + bufferInfo());
if (!compareBytes(crlf, CRLF))
 throw new InvalidLogBufferException("FOOTER_CRLF" + bufferInfo());
origin: apache/felix

buffer.putInt(checksumOffset, 0);
if (doChecksum) {
 int checksum = checksum();
 buffer.putInt(checksumOffset, checksum);
origin: org.apache.servicemix.transaction/org.apache.servicemix.transaction

if (!compareBytes(headerId, HEADER_ID))
 throw new InvalidLogBufferException("HEADER_ID" + bufferInfo());
 throw new InvalidLogBufferException("bufferSize" + bufferInfo());
 throw new InvalidLogBufferException("data used: " + bytesUsed + bufferInfo());
 int expectedChecksum = checksum();
 buffer.clear().position(checksumOffset);
  throw new InvalidLogBufferException("CHECKSUM expected: " + Integer.toHexString(expectedChecksum) + bufferInfo());
if (!compareBytes(crlf, CRLF))
 throw new InvalidLogBufferException("HEADER_CRLF" + bufferInfo());
if (!compareBytes(footerId, FOOTER_ID))
 throw new InvalidLogBufferException("FOOTER_ID" + bufferInfo());
 throw new InvalidLogBufferException("FOOTER_BSN" + bufferInfo());
 throw new InvalidLogBufferException("FOOTER_TOD" + bufferInfo());
if (!compareBytes(crlf, CRLF))
 throw new InvalidLogBufferException("FOOTER_CRLF" + bufferInfo());
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.howl

buffer.putInt(checksumOffset, 0);
if (doChecksum) {
 int checksum = checksum();
 buffer.putInt(checksumOffset, checksum);
origin: apache/felix

if (!compareBytes(headerId, HEADER_ID))
 throw new InvalidLogBufferException("HEADER_ID" + bufferInfo());
 throw new InvalidLogBufferException("bufferSize" + bufferInfo());
 throw new InvalidLogBufferException("data used: " + bytesUsed + bufferInfo());
 int expectedChecksum = checksum();
 buffer.clear().position(checksumOffset);
  throw new InvalidLogBufferException("CHECKSUM expected: " + Integer.toHexString(expectedChecksum) + bufferInfo());
if (!compareBytes(crlf, CRLF))
 throw new InvalidLogBufferException("HEADER_CRLF" + bufferInfo());
if (!compareBytes(footerId, FOOTER_ID))
 throw new InvalidLogBufferException("FOOTER_ID" + bufferInfo());
 throw new InvalidLogBufferException("FOOTER_BSN" + bufferInfo());
 throw new InvalidLogBufferException("FOOTER_TOD" + bufferInfo());
if (!compareBytes(crlf, CRLF))
 throw new InvalidLogBufferException("FOOTER_CRLF" + bufferInfo());
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.howl

/**
 * determines if buffer should be forced to disk.
 * 
 * <p>If there are any waiting threads, then buffer
 * is forced when it is 50 ms old.  Otherwise, if there
 * are no waiting threads, we wait 1/4 second before we
 * force.
 *
 * @return true if buffer should be forced now.
 */ 
boolean shouldForce()
{
 int forceDelta = getWaitingThreads() > 0 ? 50 : 250;
 long now = System.currentTimeMillis();
 return ((todPut + forceDelta) < now);
}

origin: org.apache.servicemix.transaction/org.apache.servicemix.transaction

buffer.putInt(checksumOffset, 0);
if (doChecksum) {
 int checksum = checksum();
 buffer.putInt(checksumOffset, checksum);
origin: org.apache.servicemix.transaction/org.apache.servicemix.transaction

/**
 * determines if buffer should be forced to disk.
 * 
 * <p>If there are any waiting threads, then buffer
 * is forced when it is 50 ms old.  Otherwise, if there
 * are no waiting threads, we wait 1/4 second before we
 * force.
 *
 * @return true if buffer should be forced now.
 */ 
boolean shouldForce()
{
 int forceDelta = getWaitingThreads() > 0 ? 50 : 250;
 long now = System.currentTimeMillis();
 return ((todPut + forceDelta) < now);
}

org.objectweb.howl.logBlockLogBuffer

Javadoc

An implementation of LogBuffer that provides features necessary for a reliable Transaction Monitor journal.

Each block contains a header, zero or more log records, and a footer. The header and footer contain enough information to allow recovery operations to validate the integrity of each log block.

Most used methods

  • bufferInfo
    generate a String that represents the state of this LogBuffer object
  • checksum
  • compareBytes
    internal routine used to compare two byte[] objects.
  • getWaitingThreads

Popular in Java

  • Reading from database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • startActivity (Activity)
  • Color (java.awt)
    The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary co
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • IOException (java.io)
    Signals that an I/O exception of some sort has occurred. This class is the general class of exceptio
  • URI (java.net)
    Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now