|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.util.CacheObject
org.h2.store.Record
public abstract class Record
A record represents a persisted row in a table, or a index page. When a
record is persisted to disk, it is first written into a DataPage
buffer.
Field Summary |
---|
Fields inherited from class org.h2.util.CacheObject |
---|
blockCount, cacheQueue, chained, next, previous |
Constructor Summary | |
---|---|
Record()
|
Method Summary | |
---|---|
boolean |
canRemove()
Check if the object can be removed from the cache. |
void |
commit()
This record has been committed. |
abstract int |
getByteCount(DataPage dummy)
Get the number of bytes required for the data if the given data page would be used. |
int |
getSessionId()
|
int |
getStorageId()
|
boolean |
isDeleted()
|
boolean |
isEmpty()
Check if this record is empty. |
boolean |
isLogWritten()
Check if this record has been written to the log file. |
void |
prepareWrite()
This method is called just before the page is written. |
void |
setDeleted(boolean deleted)
|
void |
setLastLog(int log,
int pos)
Set the last log file and position where this record needs to be written. |
void |
setLogWritten(int log,
int pos)
Set the last log file and position where this record was written. |
void |
setSessionId(int sessionId)
|
void |
setStorageId(int storageId)
|
abstract void |
write(DataPage buff)
Write the record to the data page. |
Methods inherited from class org.h2.util.CacheObject |
---|
getBlockCount, getMemorySize, getPos, isChanged, isPinned, setBlockCount, setChanged, setPos, sort |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Record()
Method Detail |
---|
public abstract int getByteCount(DataPage dummy) throws java.sql.SQLException
dummy
- the template data page
java.sql.SQLException
public abstract void write(DataPage buff) throws java.sql.SQLException
buff
- the data page
java.sql.SQLException
public void prepareWrite() throws java.sql.SQLException
java.sql.SQLException
public boolean isEmpty()
public void setDeleted(boolean deleted)
public void setSessionId(int sessionId)
public int getSessionId()
public void commit()
public boolean isDeleted()
public void setStorageId(int storageId)
public int getStorageId()
public void setLastLog(int log, int pos)
log
- the log file idpos
- the position in the log filepublic void setLogWritten(int log, int pos)
log
- the log file idpos
- the position in the log filepublic boolean canRemove()
CacheObject
canRemove
in class CacheObject
public boolean isLogWritten()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |