Package org.objectweb.howl.log

Examples of org.objectweb.howl.log.LogRecord


        // replay the transaction log, updating the cache and adding any messages to be dispatched
        // to the container
        firstException = null;
        try {
            transactionLog.replay(new ReplayListener() {
                LogRecord record = new LogRecord(DEFAULT_RECORD_SIZE);

                public void onRecord(LogRecord logRecord) {
                    readPacket(logRecord, container);
                }
View Full Code Here


            log.error("Error during recovery: ", exception);
        }

        public LogRecord getLogRecord() {
            //TODO justify this size estimate
            return new LogRecord(10 * 2 * Xid.MAXBQUALSIZE);
        }
View Full Code Here

            log.error("Error during recovery: ", exception);
        }

        public LogRecord getLogRecord() {
            //TODO justify this size estimate
            return new LogRecord(10 * 2 * Xid.MAXBQUALSIZE);
        }
View Full Code Here

          }
      }
     
      try {
          while(true) {
              LogRecord record = logger.get(null, toLong(lastLocation));
            // I assume getNext will return null if there is no next record.
              LogRecord next = logger.getNext(record);
              if( next==null || next.length == 0 )
                  return null;
              lastLocation = new LongRecordLocation(next.key);
              if( !next.isCTRL() )
                  return lastLocation;
          }
    } catch (Exception e) {
      throw (InvalidRecordLocationException)new InvalidRecordLocationException().initCause(e);
        }
View Full Code Here

   */
  public Packet read(RecordLocation location)
      throws InvalidRecordLocationException, IOException {
     
      try {
            LogRecord record = logger.get(null, toLong(location));
            return new ByteArrayPacket(record.data);           
    } catch (InvalidLogKeyException e) {
      throw new InvalidRecordLocationException(e.getMessage(), e);
    } catch (Exception e) {
      throw (IOException) new IOException("Journal write failed: " + e)
View Full Code Here

        // replay the transaction log, updating the cache and adding any messages to be dispatched
        // to the container
        firstException = null;
        try {
            transactionLog.replay(new ReplayListener() {
                LogRecord record = new LogRecord(DEFAULT_RECORD_SIZE);

                public void onRecord(LogRecord logRecord) {
                    readPacket(logRecord, container);
                }
View Full Code Here

          }
      }
     
      try {
          while(true) {
              LogRecord record = logger.get(null, toLong(lastLocation));
            // I assume getNext will return null if there is no next record.
              LogRecord next = logger.getNext(record);
              if( next==null || next.length == 0 )
                  return null;
              lastLocation = new LongRecordLocation(next.key);
              if( !next.isCTRL() )
                  return lastLocation;
          }
    } catch (Exception e) {
      throw (InvalidRecordLocationException)new InvalidRecordLocationException().initCause(e);
        }
View Full Code Here

   */
  public Packet read(RecordLocation location)
      throws InvalidRecordLocationException, IOException {
     
      try {
            LogRecord record = logger.get(null, toLong(location));
            return new ByteArrayPacket(record.data);           
    } catch (InvalidLogKeyException e) {
      throw new InvalidRecordLocationException(e.getMessage(), e);
    } catch (Exception e) {
      throw (IOException) new IOException("Journal write failed: " + e)
View Full Code Here

            log.error("Error during recovery: ", exception);
        }

        public LogRecord getLogRecord() {
            //TODO justify this size estimate
            return new LogRecord(10 * 2 * Xid.MAXBQUALSIZE);
        }
View Full Code Here

          }
      }
     
      try {
          while(true) {
              LogRecord record = logger.get(null, toLong(lastLocation));
            // I assume getNext will return null if there is no next record.
              LogRecord next = logger.getNext(record);
              if( next==null || next.length == 0 )
                  return null;
              lastLocation = new LongRecordLocation(next.key);
              if( !next.isCTRL() )
                  return lastLocation;
          }
    } catch (Exception e) {
      throw (InvalidRecordLocationException)new InvalidRecordLocationException().initCause(e);
        }
View Full Code Here

TOP

Related Classes of org.objectweb.howl.log.LogRecord

Copyright © 2018 www.massapicom. 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.