Top Description Fields Constructors Methods
org.hsqldb

public Class RowAction

extends RowActionBase
Class Inheritance
Imports
org.hsqldb.error.Error, .ErrorCode, org.hsqldb.lib.ArrayUtil, .OrderedHashSet, org.hsqldb.persist.PersistentStore

Represents the chain of insert / delete / rollback / commit actions on a row.
Author
Fred Toussi (fredt@users dot sourceforge dot net)
Since
2.0.0
Version
2.7.4

Field Summary

Modifier and TypeField and Description
public static final RowAction[]
pack-priv final Row
pack-priv final long
pack-priv final PersistentStore
pack-priv final TableBase
pack-priv RowAction
Inherited from org.hsqldb.RowActionBase:
ACTION_CHECKACTION_DEBUGACTION_DELETEACTION_DELETE_FINALACTION_INSERTACTION_INSERT_DELETEACTION_NONEACTION_REFactionSCNchangeColumnMapcommitSCNdeleteCompletenextpreparedrolledbacksessiontype

Constructor Summary

AccessConstructor and Description
public
RowAction(Session session, TableBase table, PersistentStore store, byte type, Row row, int[] colMap)

Method Summary

Modifier and TypeMethod and Description
public static RowAction
addDeleteAction(Session session, TableBase table, PersistentStore store, Row row, int[] colMap)

pack-priv synchronized RowAction
addDeleteAction(Session session, int[] colMap)

public static RowAction
addInsertAction(Session session, TableBase table, PersistentStore store, Row row)

public static boolean
addRefAction(Session session, Row row, int[] colMap)

pack-priv synchronized boolean
addRefAction(Session session, int[] colMap)

pack-priv synchronized boolean
canCommit(Session session)

returns false if another committed session has altered the same row

public synchronized boolean
canRead(Session session, int mode, int[] cols)

pack-priv synchronized int
commit(Session session)

pack-priv synchronized boolean
complete(Session session, OrderedHashSet<Session> set)

returns false if cannot complete when READ COMMITTED, false result always means repeat action and adds to set parameter the sessions to wait on (may be no wait)

public synchronized String
describe(Session session)

pack-priv synchronized int
getCommitTypeOn(long timestamp)

returns type of commit performed on timestamp.

public long
private int
public Row
public synchronized int
public boolean
public boolean
public boolean
private RowAction
mergeExpiredRefActions()

eliminate all expired updatedAction in chain

pack-priv synchronized int
mergeRollback(Session session, long timestamp)

merge rolled back actions

pack-priv synchronized void
mergeToTimestamp(long timestamp)

merge session actions committed on given timestamp.

pack-priv synchronized void
prepareCommit(Session session)

for two-phased pre-commit

pack-priv synchronized void
rollback(Session session, long timestamp)

Rollback actions for a session including and after the given timestamp

pack-priv synchronized void
private void
setAsDeleteFinal(long timestamp)

pack-priv synchronized void
public synchronized void
pack-priv synchronized void
setNoOpAsAction(Session session, byte type)

Field Detail

emptyArrayback to summary
public static final RowAction[] emptyArray
memoryRowback to summary
pack-priv final Row memoryRow
rowIdback to summary
pack-priv final long rowId
storeback to summary
pack-priv final PersistentStore store
tableback to summary
pack-priv final TableBase table
updatedActionback to summary
pack-priv RowAction updatedAction

Constructor Detail

RowActionback to summary
public RowAction(Session session, TableBase table, PersistentStore store, byte type, Row row, int[] colMap)

Method Detail

addDeleteActionback to summary
public static RowAction addDeleteAction(Session session, TableBase table, PersistentStore store, Row row, int[] colMap)
addDeleteActionback to summary
pack-priv synchronized RowAction addDeleteAction(Session session, int[] colMap)
addInsertActionback to summary
public static RowAction addInsertAction(Session session, TableBase table, PersistentStore store, Row row)
addRefActionback to summary
public static boolean addRefAction(Session session, Row row, int[] colMap)
addRefActionback to summary
pack-priv synchronized boolean addRefAction(Session session, int[] colMap)
canCommitback to summary
pack-priv synchronized boolean canCommit(Session session)

returns false if another committed session has altered the same row

canReadback to summary
public synchronized boolean canRead(Session session, int mode, int[] cols)
commitback to summary
pack-priv synchronized int commit(Session session)
completeback to summary
pack-priv synchronized boolean complete(Session session, OrderedHashSet<Session> set)

returns false if cannot complete when READ COMMITTED, false result always means repeat action and adds to set parameter the sessions to wait on (may be no wait)

describeback to summary
public synchronized String describe(Session session)
getCommitTypeOnback to summary
pack-priv synchronized int getCommitTypeOn(long timestamp)

returns type of commit performed on timestamp. ACTION_NONE if none. assumes rolled-back actions have already been merged

getPosback to summary
public long getPos()
getRollbackTypeback to summary
private int getRollbackType(Session session)
getRowback to summary
public Row getRow()
getTypeback to summary
public synchronized int getType()
hasCurrentRefActionback to summary
public boolean hasCurrentRefAction()
isDeleteCompleteback to summary
public boolean isDeleteComplete()
isDeletedback to summary
public boolean isDeleted()
mergeExpiredRefActionsback to summary
private RowAction mergeExpiredRefActions()

eliminate all expired updatedAction in chain

mergeRollbackback to summary
pack-priv synchronized int mergeRollback(Session session, long timestamp)

merge rolled back actions

mergeToTimestampback to summary
pack-priv synchronized void mergeToTimestamp(long timestamp)

merge session actions committed on given timestamp. may be called more than once on same action

prepareCommitback to summary
pack-priv synchronized void prepareCommit(Session session)

for two-phased pre-commit

rollbackback to summary
pack-priv synchronized void rollback(Session session, long timestamp)

Rollback actions for a session including and after the given timestamp

setAsActionback to summary
pack-priv synchronized void setAsAction(RowActionBase action)

Overrides org.hsqldb.RowActionBase.setAsAction.

setAsDeleteFinalback to summary
private void setAsDeleteFinal(long timestamp)
setAsNoOpback to summary
pack-priv synchronized void setAsNoOp()
setDeleteCompleteback to summary
public synchronized void setDeleteComplete()
setNoOpAsActionback to summary
pack-priv synchronized void setNoOpAsAction(Session session, byte type)