/** * Returns a dirtied, writable version of this chunk whose identity won't change until the write lock is released. */ public Chunk getWritableChunk() { Chunk result = this.fDatabase.getChunk(this.fSequenceNumber * Database.CHUNK_SIZE); result.makeDirty(); return result; } }
/** * Returns a dirtied, writable version of this chunk whose identity won't change until the write lock is released. */ public Chunk getWritableChunk() { Chunk result = this.fDatabase.getChunk((long) this.fSequenceNumber * Database.CHUNK_SIZE); result.makeDirty(); return result; } }
public void putBytes(final long offset, final byte[] bytes) { makeDirty(); System.arraycopy(bytes, 0, this.fBuffer, recPtrToIndex(offset), bytes.length); recordWrite(offset, bytes.length); }
public void putBytes(final long offset, final byte[] bytes) { makeDirty(); System.arraycopy(bytes, 0, this.fBuffer, recPtrToIndex(offset), bytes.length); recordWrite(offset, bytes.length); }
void put(final long offset, final byte[] data, int dataPos, final int len) { makeDirty(); int idx = recPtrToIndex(offset); System.arraycopy(data, dataPos, this.fBuffer, idx, len); recordWrite(offset, len); }
public void putCharsAsBytes(final long offset, char[] chars, int start, int len) { makeDirty(); int idx= recPtrToIndex(offset)-1; final int end= start + len; for (int i = start; i < end; i++) { char value= chars[i]; this.fBuffer[++idx]= (byte) (value); } recordWrite(offset, len); }
public void putChar(final long offset, final char value) { makeDirty(); int idx= recPtrToIndex(offset); this.fBuffer[idx]= (byte) (value >> 8); this.fBuffer[++idx]= (byte) (value); recordWrite(offset, 2); }
public void putByte(final long offset, final byte value) { makeDirty(); this.fBuffer[recPtrToIndex(offset)]= value; recordWrite(offset, 1); }
public void put3ByteUnsignedInt(final long offset, final int value) { makeDirty(); int idx= recPtrToIndex(offset); this.fBuffer[idx]= (byte) (value >> 16); this.fBuffer[++idx]= (byte) (value >> 8); this.fBuffer[++idx]= (byte) (value); recordWrite(offset, 3); }
public void put3ByteUnsignedInt(final long offset, final int value) { makeDirty(); int idx= recPtrToIndex(offset); this.fBuffer[idx]= (byte) (value >> 16); this.fBuffer[++idx]= (byte) (value >> 8); this.fBuffer[++idx]= (byte) (value); recordWrite(offset, 3); }
public void putByte(final long offset, final byte value) { makeDirty(); this.fBuffer[recPtrToIndex(offset)]= value; recordWrite(offset, 1); }
public void putShort(final long offset, final short value) { makeDirty(); int idx= recPtrToIndex(offset); this.fBuffer[idx]= (byte) (value >> 8); this.fBuffer[++idx]= (byte) (value); recordWrite(offset, 2); }
public void putChars(final long offset, char[] chars, int start, int len) { makeDirty(); int idx= recPtrToIndex(offset)-1; final int end= start + len; for (int i = start; i < end; i++) { char value= chars[i]; this.fBuffer[++idx]= (byte) (value >> 8); this.fBuffer[++idx]= (byte) (value); } recordWrite(offset, len * 2); }
public void putCharsAsBytes(final long offset, char[] chars, int start, int len) { makeDirty(); int idx= recPtrToIndex(offset)-1; final int end= start + len; for (int i = start; i < end; i++) { char value= chars[i]; this.fBuffer[++idx]= (byte) (value); } recordWrite(offset, len); }
public void putShort(final long offset, final short value) { makeDirty(); int idx= recPtrToIndex(offset); this.fBuffer[idx]= (byte) (value >> 8); this.fBuffer[++idx]= (byte) (value); recordWrite(offset, 2); }
/** * A Record Pointer is a pointer as returned by Database.malloc(). * This is a pointer to a block + BLOCK_HEADER_SIZE. */ public void putRecPtr(final long offset, final long value) { makeDirty(); int idx = recPtrToIndex(offset); Database.putRecPtr(value, this.fBuffer, idx); recordWrite(offset, 4); }
public void putInt(final long offset, final int value) { makeDirty(); int idx= recPtrToIndex(offset); putInt(value, this.fBuffer, idx); recordWrite(offset, 4); }
/** * A Record Pointer is a pointer as returned by Database.malloc(). * This is a pointer to a block + BLOCK_HEADER_SIZE. */ public void putRecPtr(final long offset, final long value) { makeDirty(); int idx = recPtrToIndex(offset); Database.putRecPtr(value, this.fBuffer, idx); recordWrite(offset, 4); }
public void putInt(final long offset, final int value) { makeDirty(); int idx= recPtrToIndex(offset); putInt(value, this.fBuffer, idx); recordWrite(offset, 4); }
/** * A free Record Pointer is a pointer to a raw block, * i.e. the pointer is not moved past the BLOCK_HEADER_SIZE. */ public void putFreeRecPtr(final long offset, final long value) { makeDirty(); int idx = recPtrToIndex(offset); putInt(compressFreeRecPtr(value), this.fBuffer, idx); recordWrite(offset, 4); }