|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.db.block.Block
public final class Block
Represents a versioned row
| Method Summary | |
|---|---|
boolean |
allocate()
Allocates the block for a query. |
void |
commit()
Handle any database writes necessary at commit time. |
void |
deallocate()
|
void |
free()
Frees a block from a query. |
long |
getBlockId()
Returns the block's id. |
byte[] |
getBuffer()
Returns the block's buffer. |
java.util.concurrent.locks.Lock |
getReadLock()
|
BlockStore |
getStore()
Returns the block's table. |
int |
getUseCount()
|
java.util.concurrent.locks.Lock |
getWriteLock()
|
boolean |
isDestroyed()
|
boolean |
isDirty()
Returns true if the block needs writing |
boolean |
isFlushDirtyOnCommit()
Returns true if the block should be flushed on a commit. |
boolean |
isIndex()
|
boolean |
isValid()
|
void |
read()
Reads into the block. |
void |
saveAllocation()
|
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. |
boolean |
startLruRemove()
Called by the LRU cache before removing to see if the item can actually be removed. |
void |
syncLruRemoveEvent()
Called when the block is removed from the cache. |
void |
syncRemoveEvent()
Called when the block is removed deliberately from the cache. |
java.lang.String |
toString()
|
void |
validateIsIndex()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public boolean isFlushDirtyOnCommit()
public void setFlushDirtyOnCommit(boolean isFlush)
public boolean isIndex()
public void validateIsIndex()
public BlockStore getStore()
public long getBlockId()
public final java.util.concurrent.locks.Lock getReadLock()
public final java.util.concurrent.locks.Lock getWriteLock()
public final boolean isValid()
public boolean isDirty()
public final boolean allocate()
public void read()
throws java.io.IOException
java.io.IOExceptionpublic final byte[] getBuffer()
public void setDirty(int min,
int max)
public void commit()
throws java.io.IOException
java.io.IOExceptionpublic int getUseCount()
public void deallocate()
throws java.io.IOException
java.io.IOException
public void saveAllocation()
throws java.io.IOException
java.io.IOExceptionpublic final void free()
public boolean startLruRemove()
startLruRemove in interface SyncCacheListenerpublic final void syncLruRemoveEvent()
syncLruRemoveEvent in interface SyncCacheListenerpublic final void syncRemoveEvent()
syncRemoveEvent in interface SyncCacheListenerpublic boolean isDestroyed()
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 | |||||||||