Package org.codehaus.activemq.journal

Examples of org.codehaus.activemq.journal.InvalidRecordLocationException


   * @throws IOException
   * @throws InterruptedException
   */
  synchronized public void setMark(final RecordLocationImpl recordLocator, boolean force) throws InvalidRecordLocationException, InterruptedException, IOException {
    if( recordLocator==null )
          throw new InvalidRecordLocationException("The location cannot be null.");           
      if( lastMarkedLocation!=null && recordLocator.compareTo(lastMarkedLocation)<0 )
          throw new InvalidRecordLocationException("The location is less than the last mark.");           
      lastMarkedLocation = recordLocator;
      Mark mark = new Mark(recordLocator);
      byte data[] = mark.writeExternal();
      write(LogFile.MARK_RECORD_TYPE,data,force,mark);
  }
View Full Code Here


            return (RecordLocationImpl)result.get();
        } catch (InterruptedException e) {
            throw (IOException)new IOException("Interrupted.").initCause(e);
        } catch (InvocationTargetException e) {
            if( e.getTargetException() instanceof InvalidRecordLocationException)
                throw new InvalidRecordLocationException(e.getTargetException().getMessage(),e.getTargetException());
            if( e.getTargetException() instanceof IOException)
                throw (IOException)new IOException(e.getTargetException().getMessage()).initCause(e.getTargetException());
            throw (IOException)new IOException("Unexpected Exception: ").initCause(e.getTargetException());
        }       
  } 
View Full Code Here

            return (byte[])result.get();
        } catch (InterruptedException e) {
            throw (IOException)new IOException("Interrupted.").initCause(e);
        } catch (InvocationTargetException e) {
            if( e.getTargetException() instanceof InvalidRecordLocationException)
                throw new InvalidRecordLocationException(e.getTargetException().getMessage(),e.getTargetException());
            if( e.getTargetException() instanceof IOException)
                throw (IOException)new IOException(e.getTargetException().getMessage()).initCause(e.getTargetException());
            throw (IOException)new IOException("Unexpected Exception: ").initCause(e.getTargetException());
        }       
  }
View Full Code Here

TOP

Related Classes of org.codehaus.activemq.journal.InvalidRecordLocationException

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.