/** * add a USER record consisting of byte[] to the log. * * <p>wrap byte[] <i> data </i> in a new byte[][] * and delegates call to put(byte[][], boolean) * * @param data byte[] to be written to log * @param sync true if caller wishes to block waiting for the * record to force to disk. * @return log key for the record * @throws LogClosedException * @throws LogRecordSizeException * @throws LogFileOverflowException * @throws InterruptedException * @throws IOException */ public long put(byte[] data, boolean sync) throws LogClosedException, LogRecordSizeException, LogFileOverflowException, InterruptedException, IOException { return put(LogRecordType.USER, new byte[][]{data}, sync); }
/** * add a USER record consisting of byte[] to the log. * * <p>wrap byte[] <i> data </i> in a new byte[][] * and delegates call to put(byte[][], boolean) * * @param data byte[] to be written to log * @param sync true if caller wishes to block waiting for the * record to force to disk. * @return log key for the record * @throws LogClosedException * @throws LogRecordSizeException * @throws LogFileOverflowException * @throws InterruptedException * @throws IOException */ public long put(byte[] data, boolean sync) throws LogClosedException, LogRecordSizeException, LogFileOverflowException, InterruptedException, IOException { return put(LogRecordType.USER, new byte[][]{data}, sync); }
/** * add a USER record consisting of byte[] to the log. * * <p>wrap byte[] <i> data </i> in a new byte[][] * and delegates call to put(byte[][], boolean) * * @param data byte[] to be written to log * @param sync true if caller wishes to block waiting for the * record to force to disk. * @return log key for the record * @throws LogClosedException * @throws LogRecordSizeException * @throws LogFileOverflowException * @throws InterruptedException * @throws IOException */ public long put(byte[] data, boolean sync) throws LogClosedException, LogRecordSizeException, LogFileOverflowException, InterruptedException, IOException { return put(LogRecordType.USER, new byte[][]{data}, sync); }
/** * add a USER record consisting of byte[] to the log. * * <p>wrap byte[] <i> data </i> in a new byte[][] * and delegates call to put(byte[][], boolean) * * @param data byte[] to be written to log * @param sync true if caller wishes to block waiting for the * record to force to disk. * @return log key for the record * @throws LogClosedException * @throws LogRecordSizeException * @throws LogFileOverflowException * @throws InterruptedException * @throws IOException */ public long put(byte[] data, boolean sync) throws LogClosedException, LogRecordSizeException, LogFileOverflowException, InterruptedException, IOException { return put(LogRecordType.USER, new byte[][]{data}, sync); }
InterruptedException, IOException return put(LogRecordType.USER, data, sync);
InterruptedException, IOException return put(LogRecordType.USER, data, sync);
InterruptedException, IOException return put(LogRecordType.USER, data, sync);
InterruptedException, IOException return put(LogRecordType.USER, data, sync);
/** * @see org.apache.activeio.journal.Journal#write(byte[], boolean) */ public RecordLocation write(Packet packet, boolean sync) throws IOException { try { return new LongRecordLocation(logger.put(packet.sliceAsBytes(), sync)); } catch (InterruptedException e) { throw (InterruptedIOException) new InterruptedIOException() .initCause(e); } catch (IOException e) { throw e; } catch (Exception e) { throw (IOException) new IOException("Journal write failed: " + e) .initCause(e); } }