public class GridH2Table
extends TableBase
| Constructor and Description |
|---|
GridH2Table(CreateTableData createTblData,
GridH2RowDescriptor desc,
H2RowFactory rowFactory,
GridH2SystemIndexFactory idxsFactory,
GridCacheContext cctx)
Creates table.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addColumns(List<QueryField> cols,
boolean ifNotExists)
Add new columns to this table.
|
Index |
addIndex(Session ses,
String idxName,
int idxId,
IndexColumn[] cols,
IndexType idxType,
boolean create,
String idxComment) |
void |
addRow(Session ses,
Row row) |
GridCacheContext |
cache() |
int |
cacheId() |
String |
cacheName() |
boolean |
canDrop() |
boolean |
canGetRowCount() |
void |
checkRename() |
void |
checkSupportAlter() |
void |
close(Session ses) |
void |
collectIndexesForPartialRebuild(IndexRebuildPartialClosure clo)
Collect indexes for rebuild.
|
boolean |
containsUserIndex(String idxName)
Check whether user index with provided name exists.
|
void |
destroy()
Destroy the table.
|
void |
dropColumns(List<String> cols,
boolean ifExists)
Drop columns.
|
IndexColumn |
getAffinityKeyColumn() |
Column[] |
getColumns() |
long |
getDiskSpaceUsed() |
ArrayList<Index> |
getIndexes() |
long |
getMaxDataModificationId() |
long |
getRowCount(Session ses) |
long |
getRowCountApproximation() |
Index |
getScanIndex(Session ses) |
TableType |
getTableType() |
Index |
getUniqueIndex() |
QueryTable |
identifier() |
String |
identifierString() |
IndexColumn |
indexColumn(int col,
int sorting)
Creates index column for table.
|
static void |
insertHack(boolean val)
Set insert hack flag.
|
static boolean |
insertHackRequired(String sql)
Check whether insert hack is required.
|
boolean |
isDeterministic() |
boolean |
isLockedExclusively() |
boolean |
isLockedExclusivelyBy(Session ses) |
boolean |
isPartitioned() |
boolean |
lock(Session ses,
boolean exclusive,
boolean force) |
void |
markRebuildFromHashInProgress(boolean value)
Mark or unmark index rebuild state.
|
void |
proposeUserIndex(Index idx)
Add index that is in an intermediate state and is still being built, thus is not used in queries until it is
promoted.
|
boolean |
rebuildFromHashInProgress() |
boolean |
remove(CacheDataRow row)
Remove row.
|
void |
removeChildrenAndResources(Session ses) |
void |
removeIndex(Index h2Idx) |
void |
removeIndex(Session session,
Index h2Idx)
Remove the given index from the list.
|
void |
removeRow(Session ses,
Row row) |
void |
rollbackUserIndex(String idxName)
Remove user index without promoting it.
|
GridH2RowDescriptor |
rowDescriptor() |
H2RowFactory |
rowFactory() |
void |
setRemoveIndexOnDestroy(boolean rmIndex)
If flag
True, index will be destroyed when table destroy(). |
void |
truncate(Session ses) |
void |
unlock(Session ses) |
void |
update(CacheDataRow row,
CacheDataRow prevRow,
boolean prevRowAvailable)
Updates table for given key.
|
public GridH2Table(CreateTableData createTblData,
GridH2RowDescriptor desc,
H2RowFactory rowFactory,
GridH2SystemIndexFactory idxsFactory,
GridCacheContext cctx)
createTblData - Table description.desc - Row descriptor.rowFactory - Row factory.idxsFactory - Indexes factory.cctx - Cache context.public boolean isPartitioned()
true If this is a partitioned table.public IndexColumn getAffinityKeyColumn()
null if not available.public long getDiskSpaceUsed()
public GridH2RowDescriptor rowDescriptor()
public String cacheName()
public int cacheId()
public GridCacheContext cache()
public boolean lock(Session ses,
boolean exclusive,
boolean force)
public QueryTable identifier()
public String identifierString()
public void close(Session ses)
public void removeChildrenAndResources(Session ses)
public void destroy()
public void setRemoveIndexOnDestroy(boolean rmIndex)
True, index will be destroyed when table destroy().rmIndex - Flag indicate remove index on destroy or not.public void unlock(Session ses)
public void update(CacheDataRow row,
CacheDataRow prevRow,
boolean prevRowAvailable)
throws IgniteCheckedException
row - Row to be updated.prevRow - Previous row.prevRowAvailable - Whether previous row is available.IgniteCheckedException - If failed.public boolean remove(CacheDataRow row)
throws IgniteCheckedException
row - Row.True if was removed.IgniteCheckedException - If failed.public void collectIndexesForPartialRebuild(IndexRebuildPartialClosure clo)
clo - Closure.public void markRebuildFromHashInProgress(boolean value)
public boolean rebuildFromHashInProgress()
public Index addIndex(Session ses,
String idxName,
int idxId,
IndexColumn[] cols,
IndexType idxType,
boolean create,
String idxComment)
public void proposeUserIndex(Index idx)
throws IgniteCheckedException
idx - Index to add.IgniteCheckedException - If failed.public void rollbackUserIndex(String idxName)
idxName - Index name.public boolean containsUserIndex(String idxName)
idxName - Index name.True if exists.public void removeIndex(Index h2Idx)
public void removeIndex(Session session,
Index h2Idx)
h2Idx - the index to removepublic void removeRow(Session ses,
Row row)
public void truncate(Session ses)
public void addRow(Session ses,
Row row)
public void checkSupportAlter()
public TableType getTableType()
public Index getScanIndex(Session ses)
public Index getUniqueIndex()
public ArrayList<Index> getIndexes()
public boolean isLockedExclusively()
public boolean isLockedExclusivelyBy(Session ses)
public long getMaxDataModificationId()
public boolean isDeterministic()
public boolean canGetRowCount()
public boolean canDrop()
public long getRowCount(Session ses)
public long getRowCountApproximation()
public void checkRename()
public IndexColumn indexColumn(int col,
int sorting)
col - Column index.sorting - Sorting order SortOrderpublic H2RowFactory rowFactory()
public void addColumns(List<QueryField> cols, boolean ifNotExists)
cols - Columns to add.ifNotExists - Ignore this command if cols has size of 1 and column with given name already exists.public void dropColumns(List<String> cols, boolean ifExists)
cols - Columns.ifExists - If EXISTS flag.public Column[] getColumns()
public static void insertHack(boolean val)
val - Value.public static boolean insertHackRequired(String sql)
sql - SQL statement.True if target combination is found.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.2-p3 Release Date : April 25 2019