|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.db.store.Block
public abstract class Block
Represents a versioned row
| Field Summary | |
|---|---|
protected static FreeList<byte[]> |
_freeBuffers
|
| Method Summary | |
|---|---|
boolean |
allocate()
Allocates the block for a query. |
void |
commit()
Handle any database writes necessary at commit time. |
void |
free()
Frees a block from a query. |
protected void |
freeImpl()
Frees any resources. |
long |
getBlockId()
Returns the block's id. |
abstract byte[] |
getBuffer()
Returns the block's buffer. |
Lock |
getLock()
|
void |
invalidate()
Marks the block's data as invalid. |
boolean |
isDirty()
Returns true if the block needs writing |
boolean |
isFlushDirtyOnCommit()
Returns true if the block should be flushed on a commit. |
boolean |
isFree()
Return true if this is a free block. |
void |
read()
Reads into the block. |
void |
setDirty(int min,
int max)
Marks the block's data as dirty |
void |
setFlushDirtyOnCommit(boolean isFlush)
True if the block should be flushed on a commit. |
void |
syncRemoveEvent()
Called when the block is removed from the cache. |
java.lang.String |
toString()
|
void |
write()
Forces a write of the data (should be private?) |
protected void |
writeImpl(int offset,
int length)
Write the dirty block. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final FreeList<byte[]> _freeBuffers
| Method Detail |
|---|
public boolean isFlushDirtyOnCommit()
public void setFlushDirtyOnCommit(boolean isFlush)
public boolean allocate()
public long getBlockId()
public Lock getLock()
public abstract byte[] getBuffer()
public void read()
throws java.io.IOException
java.io.IOException
public void commit()
throws java.io.IOException
java.io.IOException
public void write()
throws java.io.IOException
java.io.IOException
protected void writeImpl(int offset,
int length)
throws java.io.IOException
java.io.IOExceptionpublic void invalidate()
public void setDirty(int min,
int max)
public boolean isDirty()
public boolean isFree()
public final void free()
public final void syncRemoveEvent()
syncRemoveEvent in interface SyncCacheListenerprotected void freeImpl()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||