| Modifier and Type | Class and Description |
|---|---|
| private static enum | MVTable.
The type of trace lock events |
| Modifier and Type | Field and Description |
|---|---|
| private final AtomicInteger | |
| private final boolean | containsLargeObject
Whether the table contains a CLOB or BLOB. |
| public static final DebuggingThreadLocal | EXCLUSIVE_LOCKS
The table names this thread has exclusively locked. |
| private final ArrayList | |
| private final AtomicLong | |
| private volatile SessionLocal | lockExclusiveSession
The session (if any) that has exclusively locked this table. |
| private final ConcurrentHashMap | lockSharedSessions
The set of sessions (if any) that have a shared lock on the table. |
| private int | |
| private static final String | |
| private final MVPrimaryIndex | |
| private Column | |
| public static final DebuggingThreadLocal | SHARED_LOCKS
The tables names this thread has a shared lock on. |
| private final Store | |
| private final Trace | |
| private final TransactionStore | |
| public static final DebuggingThreadLocal | WAITING_FOR_LOCK
The table name this thread is waiting to lock. |
| private final ArrayDeque | waitingSessions
The queue of sessions waiting to lock the table. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Index | addIndex(SessionLocal
the session session, String the name of the index indexName, int the id indexId, IndexColumn[] the index columns cols, int the count of unique columns uniqueColumnCount, IndexType the index type indexType, boolean whether this is a new index create, String the comment indexComment)Implements abstract org. Create an index for this table |
| private void | |
| public void | addRow(SessionLocal
the session session, Row the row row)Implements abstract org. Add a row to the table and all indexes. |
| private static void | addRowsToIndex(SessionLocal
the session session, ArrayList<Row> the rows, list is cleared on completion list, Index the index to append to index)Appends the specified rows to the specified index. |
| public void | |
| private void | |
| public boolean | |
| public boolean | canGetRowCount(SessionLocal
the session session)Implements abstract org. Check if the row count can be retrieved quickly. |
| public boolean | |
| public ArrayList | checkDeadlock(SessionLocal
the session to be tested for session, SessionLocal set with sessions already visited, and null when starting
verification clash, Set<SessionLocal> set with sessions already visited, and null when starting
verification visited)Overrides org. Check if a deadlock occurred. |
| public void | checkSupportAlter()
Implements abstract org. Check if this table supports ALTER TABLE. |
| public void | close(SessionLocal
the session session)Implements abstract org. Close the table object and flush changes. |
| pack-priv DbException | Returns: the database exceptionthe illegal state exception e)Convert the MVStoreException to a database exception. |
| private DbException | |
| pack-priv DbException | Returns: the database exceptionthe illegal state exception e)Convert the MVStoreException from attempt to lock a row to a database exception. |
| private void | |
| private boolean | |
| public boolean | |
| private static String | Returns: formatted details of a deadlockthe list of sessions sessions, int the type of lock lockType)Formats details of a deadlock. |
| public long | |
| public ArrayList | |
| public int | getMainIndexColumn()
Overrides org. Returns ID of main index column, or |
| public String | |
| public long | getMaxDataModificationId()
Implements abstract org. Get the last data modification id. |
| public Row | getRow(SessionLocal
the session session, long the primary key key)Overrides org. Get the given row. |
| public long | getRowCount(SessionLocal
the session session)Implements abstract org. Get the row count for this table. |
| public long | getRowCountApproximation(SessionLocal
the session session)Implements abstract org. Get the approximated row count for this table. |
| public Column | getRowIdColumn()
Overrides org. Get the row id column if this table has one. |
| public Index | getScanIndex(SessionLocal
the session session)Implements abstract org. Get the scan index to iterate through all rows. |
| public TableType | |
| pack-priv Transaction | |
| protected void | invalidate()
Overrides org. Set the main attributes to null to make sure the object is no longer used. |
| public boolean | isDeterministic()
Implements abstract org. Check if the table is deterministic. |
| public boolean | isLockedExclusively()
Overrides org. Check if this table is locked exclusively. |
| public boolean | isLockedExclusivelyBy(SessionLocal
the session session)Overrides org. Check if the table is exclusively locked by this session. |
| public boolean | isRowLockable()
Overrides org. Views, function tables, links, etc. do not support locks |
| public boolean | lock(SessionLocal
the session session, int the type of lock lockType)Overrides org. Lock the table for the given session. |
| public Row | lockRow(SessionLocal
the session session, Row to lock row, int timeout in milliseconds, timeoutMillis)-1 for default, -2 to
skip locking if row is already locked by another sessionOverrides org. Locks row, preventing any updated to it, except from the session specified. |
| private static String | |
| private static IndexColumn[] | Returns: the prepared columns with flags setthe database database, IndexColumn[] the index columns cols, IndexType the type of an index indexType)Prepares columns of an index. |
| private void | |
| private void | |
| private void | |
| public void | removeChildrenAndResources(SessionLocal
the session session)Overrides org. Delete all dependent children objects and resources of this object. |
| public void | removeRow(SessionLocal
the session session, Row the row row)Implements abstract org. Remove a row from the table and all indexes. |
| private static void | |
| private void | |
| public String | |
| private void | |
| public long | truncate(SessionLocal
the session session)Implements abstract org. Remove all rows from the table and indexes. |
| public void | unlock(SessionLocal
the session s)Overrides org. Release the lock for this session. |
| public void | updateRow(SessionLocal
the session session, Row the row to update oldRow, Row the row with updated values (_rowid_ suppose to be the same) newRow)Overrides org. Update a row to the table and all indexes. |
| changesUntilAnalyze | back to summary |
|---|---|
| private final AtomicInteger changesUntilAnalyze | |
| containsLargeObject | back to summary |
|---|---|
| private final boolean containsLargeObject Whether the table contains a CLOB or BLOB. | |
| EXCLUSIVE_LOCKS | back to summary |
|---|---|
| public static final DebuggingThreadLocal<ArrayList<String>> EXCLUSIVE_LOCKS The table names this thread has exclusively locked. | |
| indexes | back to summary |
|---|---|
| private final ArrayList<Index> indexes | |
| lastModificationId | back to summary |
|---|---|
| private final AtomicLong lastModificationId | |
| lockExclusiveSession | back to summary |
|---|---|
| private volatile SessionLocal lockExclusiveSession The session (if any) that has exclusively locked this table. | |
| lockSharedSessions | back to summary |
|---|---|
| private final ConcurrentHashMap<SessionLocal, SessionLocal> lockSharedSessions The set of sessions (if any) that have a shared lock on the table. Here we are using using a ConcurrentHashMap as a set, as there is no ConcurrentHashSet. | |
| nextAnalyze | back to summary |
|---|---|
| private int nextAnalyze | |
| NO_EXTRA_INFO | back to summary |
|---|---|
| private static final String NO_EXTRA_INFO | |
| primaryIndex | back to summary |
|---|---|
| private final MVPrimaryIndex primaryIndex | |
| rowIdColumn | back to summary |
|---|---|
| private Column rowIdColumn | |
| SHARED_LOCKS | back to summary |
|---|---|
| public static final DebuggingThreadLocal<ArrayList<String>> SHARED_LOCKS The tables names this thread has a shared lock on. | |
| store | back to summary |
|---|---|
| private final Store store | |
| traceLock | back to summary |
|---|---|
| private final Trace traceLock | |
| transactionStore | back to summary |
|---|---|
| private final TransactionStore transactionStore | |
| WAITING_FOR_LOCK | back to summary |
|---|---|
| public static final DebuggingThreadLocal<String> WAITING_FOR_LOCK The table name this thread is waiting to lock. | |
| waitingSessions | back to summary |
|---|---|
| private final ArrayDeque<SessionLocal> waitingSessions The queue of sessions waiting to lock the table. It is a FIFO queue to prevent starvation, since Java's synchronized locking is biased. | |
| MVTable | back to summary |
|---|---|
| public MVTable(CreateTableData data, Store store) | |
| addIndex | back to summary |
|---|---|
| public Index addIndex(SessionLocal session, String indexName, int indexId, IndexColumn[] cols, int uniqueColumnCount, IndexType indexType, boolean create, String indexComment) Implements abstract org. Doc from org. Create an index for this table
| |
| addLockToDebugList | back to summary |
|---|---|
| private void addLockToDebugList(DebuggingThreadLocal<ArrayList<String>> locks) | |
| addRow | back to summary |
|---|---|
| public void addRow(SessionLocal session, Row row) Implements abstract org. Doc from org. Add a row to the table and all indexes.
| |
| addRowsToIndex | back to summary |
|---|---|
| private static void addRowsToIndex(SessionLocal session, ArrayList<Row> list, Index index) Appends the specified rows to the specified index.
| |
| afterCommit | back to summary |
|---|---|
| public void afterCommit() Called after commit to increment database data modification counter for this table. | |
| analyzeIfRequired | back to summary |
|---|---|
| private void analyzeIfRequired(SessionLocal session) | |
| canDrop | back to summary |
|---|---|
| public boolean canDrop() Implements abstract org. Doc from org. Check if this table can be dropped.
| |
| canGetRowCount | back to summary |
|---|---|
| public boolean canGetRowCount(SessionLocal session) Implements abstract org. Doc from org. Check if the row count can be retrieved quickly.
| |
| canTruncate | back to summary |
|---|---|
| public boolean canTruncate() Overrides org. Doc from org. Check if this table can be truncated.
| |
| checkDeadlock | back to summary |
|---|---|
| public ArrayList Overrides org. Doc from org. Check if a deadlock occurred. This method is called recursively. There is a circle if the session to be tested has already being visited. If this session is part of the circle (if it is the clash session), the method must return an empty object array. Once a deadlock has been detected, the methods must add the session to the list. If this session is not part of the circle, or if no deadlock is detected, this method returns null.
| |
| checkSupportAlter | back to summary |
|---|---|
| public void checkSupportAlter() Implements abstract org. Doc from org. Check if this table supports ALTER TABLE.
| |
| close | back to summary |
|---|---|
| public void close(SessionLocal session) Implements abstract org. Doc from org. Close the table object and flush changes.
| |
| convertException | back to summary |
|---|---|
| pack-priv DbException convertException(MVStoreException e) Convert the MVStoreException to a database exception.
| |
| convertException | back to summary |
|---|---|
| private DbException convertException(MVStoreException e, boolean lockException) | |
| convertLockException | back to summary |
|---|---|
| pack-priv DbException convertLockException(MVStoreException e) Convert the MVStoreException from attempt to lock a row to a database exception.
| |
| doLock1 | back to summary |
|---|---|
| private void doLock1(SessionLocal session, int lockType) | |
| doLock2 | back to summary |
|---|---|
| private boolean doLock2(SessionLocal session, int lockType) | |
| getContainsLargeObject | back to summary |
|---|---|
| public boolean getContainsLargeObject() | |
| getDeadlockDetails | back to summary |
|---|---|
| private static String getDeadlockDetails(ArrayList<SessionLocal> sessions, int lockType) Formats details of a deadlock.
| |
| getDiskSpaceUsed | back to summary |
|---|---|
| public long getDiskSpaceUsed(boolean total, boolean approximate) Overrides org.
| |
| getIndexes | back to summary |
|---|---|
| public ArrayList Implements abstract org. Doc from org. Get all indexes for this table. | |
| getMainIndexColumn | back to summary |
|---|---|
| public int getMainIndexColumn() Overrides org. Doc from org. Returns ID of main index column, or
| |
| getMapName | back to summary |
|---|---|
| public String getMapName() | |
| getMaxDataModificationId | back to summary |
|---|---|
| public long getMaxDataModificationId() Implements abstract org. Doc from org. Get the last data modification id.
| |
| getRow | back to summary |
|---|---|
| public Row getRow(SessionLocal session, long key) Overrides org. Doc from org. Get the given row.
| |
| getRowCount | back to summary |
|---|---|
| public long getRowCount(SessionLocal session) Implements abstract org. Doc from org. Get the row count for this table.
| |
| getRowCountApproximation | back to summary |
|---|---|
| public long getRowCountApproximation(SessionLocal session) Implements abstract org. Doc from org. Get the approximated row count for this table.
| |
| getRowIdColumn | back to summary |
|---|---|
| public Column getRowIdColumn() Overrides org. Doc from org. Get the row id column if this table has one. | |
| getScanIndex | back to summary |
|---|---|
| public Index getScanIndex(SessionLocal session) Implements abstract org. Doc from org. Get the scan index to iterate through all rows.
| |
| getTableType | back to summary |
|---|---|
| public TableType getTableType() Implements abstract org. Doc from org. Get the table type name | |
| getTransactionBegin | back to summary |
|---|---|
| pack-priv Transaction getTransactionBegin() Get a new transaction.
| |
| invalidate | back to summary |
|---|---|
| protected void invalidate() Overrides org. Doc from org. Set the main attributes to null to make sure the object is no longer used.
| |
| isDeterministic | back to summary |
|---|---|
| public boolean isDeterministic() Implements abstract org. Doc from org. Check if the table is deterministic.
| |
| isLockedExclusively | back to summary |
|---|---|
| public boolean isLockedExclusively() Overrides org. Doc from org. Check if this table is locked exclusively.
| |
| isLockedExclusivelyBy | back to summary |
|---|---|
| public boolean isLockedExclusivelyBy(SessionLocal session) Overrides org. Doc from org. Check if the table is exclusively locked by this session.
| |
| isRowLockable | back to summary |
|---|---|
| public boolean isRowLockable() Overrides org. Doc from org. Views, function tables, links, etc. do not support locks
| |
| lock | back to summary |
|---|---|
| public boolean lock(SessionLocal session, int lockType) Overrides org. Doc from org. Lock the table for the given session. This method waits until the lock is granted.
| |
| lockRow | back to summary |
|---|---|
| public Row lockRow(SessionLocal session, Row row, int timeoutMillis) Overrides org. Doc from org. Locks row, preventing any updated to it, except from the session specified.
| |
| lockTypeToString | back to summary |
|---|---|
| private static String lockTypeToString(int lockType) | |
| prepareColumns | back to summary |
|---|---|
| private static IndexColumn[] prepareColumns(Database database, IndexColumn[] cols, IndexType indexType) Prepares columns of an index.
| |
| rebuildIndex | back to summary |
|---|---|
| private void rebuildIndex(SessionLocal session, MVIndex<?, ?> index, String indexName) | |
| rebuildIndexBlockMerge | back to summary |
|---|---|
| private void rebuildIndexBlockMerge(SessionLocal session, MVIndex<?, ?> index) | |
| rebuildIndexBuffered | back to summary |
|---|---|
| private void rebuildIndexBuffered(SessionLocal session, Index index) | |
| removeChildrenAndResources | back to summary |
|---|---|
| public void removeChildrenAndResources(SessionLocal session) Overrides org. Doc from org. Delete all dependent children objects and resources of this object.
| |
| removeRow | back to summary |
|---|---|
| public void removeRow(SessionLocal session, Row row) Implements abstract org. Doc from org. Remove a row from the table and all indexes.
| |
| sortRows | back to summary |
|---|---|
| private static void sortRows(ArrayList<? extends SearchRow> list, final Index index) Sorts the specified list of rows for a specified index. | |
| syncLastModificationIdWithDatabase | back to summary |
|---|---|
| private void syncLastModificationIdWithDatabase() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| traceLock | back to summary |
|---|---|
| private void traceLock(SessionLocal session, int lockType, MVTable. | |
| truncate | back to summary |
|---|---|
| public long truncate(SessionLocal session) Implements abstract org. Doc from org. Remove all rows from the table and indexes.
| |
| unlock | back to summary |
|---|---|
| public void unlock(SessionLocal s) Overrides org. Doc from org. Release the lock for this session.
| |
| updateRow | back to summary |
|---|---|
| public void updateRow(SessionLocal session, Row oldRow, Row newRow) Overrides org. Doc from org. Update a row to the table and all indexes.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| public static final MVTable. | |
| public static final MVTable. | |
| public static final MVTable. | |
| public static final MVTable. | |
| public static final MVTable. | |
| public static final MVTable. | |
| public static final MVTable. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public static MVTable. | |
| public static MVTable. |
| eventText | back to summary |
|---|---|
| private final String eventText | |
| TRACE_LOCK_ADD_UPGRADED_FOR | back to summary |
|---|---|
| public static final MVTable. | |
| TRACE_LOCK_ADDED_FOR | back to summary |
|---|---|
| public static final MVTable. | |
| TRACE_LOCK_OK | back to summary |
|---|---|
| public static final MVTable. | |
| TRACE_LOCK_REQUESTING_FOR | back to summary |
|---|---|
| public static final MVTable. | |
| TRACE_LOCK_TIMEOUT_AFTER | back to summary |
|---|---|
| public static final MVTable. | |
| TRACE_LOCK_UNLOCK | back to summary |
|---|---|
| public static final MVTable. | |
| TRACE_LOCK_WAITING_FOR | back to summary |
|---|---|
| public static final MVTable. | |
| TraceLockEvent | back to summary |
|---|---|
| private TraceLockEvent(String eventText) | |
| getEventText | back to summary |
|---|---|
| public String getEventText() | |
| valueOf | back to summary |
|---|---|
| public static MVTable. | |
| values | back to summary |
|---|---|
| public static MVTable. | |