Interface InternalRDBMS
public interface InternalRDBMS
-
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcloseTransactionConnection(long transactionId) voidcreateTable(ITypeDesc typeDesc) voidvoidexecuteBulk(List<TieredStorageBulkOperationRequest> operationRequests, ServerTransaction transaction) longgetEntryByUID(String typeName, String uid) longbooleaninitialize(String spaceName, String fullMemberName, SpaceTypeManager typeManager, boolean isBackup) voidinitialLoad(Context context, SpaceEngine engine, InitialLoadInfo initialLoadInfo) voidinsertEntry(Context context, IEntryHolder entryHolder) Inserts a new entry to the internalDiskStoragebooleanisKnownType(String name) makeEntriesIter(String typeName, ITemplateHolder templateHolder) voidpersistType(ITypeDesc typeDesc) intremoveEntries(String typeName, ITemplateHolder templateHolder, int maxEntries) Removes at mostmaxEntriesentries oftypeNamethat matchtemplateHolderdirectly in the underlying store, without materializing them in the engine.booleanremoveEntry(Context context, IEntryHolder entryHolder) Removes an entry from the internalDiskStoragevoidvoidshutDown()voidunpersistType(ITypeDesc typeDesc) voidupdateEntry(Context context, IEntryHolder updatedEntry) updates an entry.
-
Method Details
-
initialize
boolean initialize(String spaceName, String fullMemberName, SpaceTypeManager typeManager, boolean isBackup) throws SAException - Parameters:
spaceName-fullMemberName-typeManager-- Returns:
- true if RDBMS is not empty on startup
- Throws:
SAException
-
setLogger
-
getDiskSize
- Throws:
SAExceptionIOException
-
getFreeSpaceSize
- Throws:
SAExceptionIOException
-
createTable
- Throws:
SAException
-
addIndex
- Throws:
SAException
-
dropTable
- Throws:
SAException
-
insertEntry
Inserts a new entry to the internalDiskStorage- Parameters:
entryHolder- entry to insert- Throws:
SAException
-
updateEntry
updates an entry.- Parameters:
updatedEntry- new content, same UID and class- Throws:
SAException
-
removeEntry
Removes an entry from the internalDiskStorage- Parameters:
entryHolder- entry to remove- Throws:
SAException
-
removeEntries
int removeEntries(String typeName, ITemplateHolder templateHolder, int maxEntries) throws SAException Removes at mostmaxEntriesentries oftypeNamethat matchtemplateHolderdirectly in the underlying store, without materializing them in the engine. Backs the clear-table / JDBC DELETE pushdown (seeSpaceEngine.tryPushdownClearTable): only the count is needed, the matched entries are not returned.Matching: an empty / no-condition template matches the whole table; otherwise only the entries matching the template's criteria are removed.
maxEntries == Integer.MAX_VALUEmeans unbounded (remove every match); a bounded clear (PIC-6174) removes an arbitrarymaxEntries-sized subset of the matches - no ordering is guaranteed.The implementation owns the per-type disk-entry bookkeeping for this path - the engine does not adjust the disk-entry counter here, so the implementation must keep it consistent with the rows actually removed.
- Parameters:
typeName- the concrete type whose entries are removed (never the root type)templateHolder- the match template; an empty template matches the whole tablemaxEntries- the maximum number of entries to remove;Integer.MAX_VALUEfor unbounded- Returns:
- the number of entries removed; never negative, saturated at
Integer.MAX_VALUEwhen more than that many rows were removed - Throws:
SAException- if the removal fails
-
getEntryByUID
- Throws:
SAException
-
makeEntriesIter
ISAdapterIterator<IEntryHolder> makeEntriesIter(String typeName, ITemplateHolder templateHolder) throws SAException - Throws:
SAException
-
isKnownType
-
shutDown
void shutDown() -
deleteData
- Throws:
SAException
-
persistType
- Throws:
SAException
-
unpersistType
- Throws:
SAException
-
initialLoad
void initialLoad(Context context, SpaceEngine engine, InitialLoadInfo initialLoadInfo) throws SAException - Throws:
SAException
-
getTypeManager
SpaceTypeManager getTypeManager() -
executeBulk
List<TieredStorageBulkOperationResult> executeBulk(List<TieredStorageBulkOperationRequest> operationRequests, ServerTransaction transaction) throws SQLException, ClassNotFoundException - Throws:
SQLExceptionClassNotFoundException
-
closeTransactionConnection
- Throws:
SQLException
-