Interface QBackendModuleInterface
- All Known Implementing Classes:
APIBackendModule,EnumerationBackendModule,FilesystemBackendModule,MemoryBackendModule,MockBackendModule,MongoDBBackendModule,PostgreSQLBackendModule,RDBMSBackendModule,S3BackendModule,SFTPBackendModule,SQLiteBackendModule
public interface QBackendModuleInterface
Interface that a QBackendModule must implement.
Note, all methods have a default version, which throws a 'not implemented'
exception.
-
Method Summary
Modifier and TypeMethodDescriptiondefault AggregateInterfacedefault Class<? extends QBackendMetaData> Method to identify the class used for backend meta data for this module.Method where a backend module must be able to provide its type (name).default ConditionalUpdateInterfaceThe CONDITIONAL_UPDATE capability (atomic compare-and-set update), or null when the backend does not support it (the default).default CountInterfacedefault DeleteInterfacedefault GetInterfacedefault HealthCheckgetHealthCheck(QBackendMetaData backend) Optional backend readiness probe, registered by central health monitoring.default InsertInterfacedefault QueryInterfacedefault QStorageInterfacedefault Class<? extends QTableBackendDetails> Method to identify the class used for table-backend details for this module.default Set<Capability> Capabilities this module can never provide (for example, writes on a read-only module).default UpdateInterfacedefault Optional<QBackendTransaction> Open a read-only transaction through which every table read (passed as the transaction on the read's input) reflects one instant - see ConsistencyScope and ConsistencyGuarantee (QBackendTransaction.getConsistencyGuarantee).default QBackendTransactiondefault List<SequenceResyncResult> resyncKeySequences(QBackendMetaData backend, Collection<QTableMetaData> tables) Advance each table's generated-key sequence past the largest key now in the table, so the next generated insert gets max+1.default booleansupportsQueryLockMode(QBackendMetaData backendMetaData, QueryLockMode lockMode) Whether queries against this backend can take the given row locks (QueryInput.lockMode).default booleansupportsSubQueries(QBackendMetaData backend) Whether query, count and aggregate can translate same-backend sub-queries.
-
Method Details
-
getHealthCheck
Optional backend readiness probe, registered by central health monitoring. -
supportsSubQueries
Whether query, count and aggregate can translate same-backend sub-queries. -
getBackendType
String getBackendType()Method where a backend module must be able to provide its type (name). -
getBackendMetaDataClass
Method to identify the class used for backend meta data for this module. -
getUnsupportedCapabilities
Capabilities this module can never provide (for example, writes on a read-only module). The instance enricher disables them on every backend of this type, unless the backend explicitly enables them, so tables, their generated bulk processes, permissions and frontends all agree. -
getTableBackendDetailsClass
Method to identify the class used for table-backend details for this module. -
getCountInterface
-
getQueryInterface
-
getGetInterface
-
getInsertInterface
-
getUpdateInterface
-
getDeleteInterface
-
getAggregateInterface
-
getConditionalUpdateInterface
The CONDITIONAL_UPDATE capability (atomic compare-and-set update), or null when the backend does not support it (the default). -
supportsQueryLockMode
Whether queries against this backend can take the given row locks (QueryInput.lockMode). False by default. -
getStorageInterface
-
openTransaction
- Throws:
QException
-
openConsistentReadTransaction
default Optional<QBackendTransaction> openConsistentReadTransaction(ConsistentReadInput input) throws QException Open a read-only transaction through which every table read (passed as the transaction on the read's input) reflects one instant - see ConsistencyScope and ConsistencyGuarantee (QBackendTransaction.getConsistencyGuarantee). Where the backend can share the snapshot, the transaction's getExportedSnapshotId is set, and other transactions may attach to it via ConsistentReadInput.importSnapshotId (while this one stays open). The default - for backends with no such support - is Optional.empty(). The caller owns the returned transaction, and must close it.- Throws:
QException
-
resyncKeySequences
default List<SequenceResyncResult> resyncKeySequences(QBackendMetaData backend, Collection<QTableMetaData> tables) throws QException Advance each table's generated-key sequence past the largest key now in the table, so the next generated insert gets max+1. Needed after rows were inserted with explicit (preserved) primary keys, e.g., a restore or a data migration. The default does nothing, and returns an empty list: backends without generated key sequences have nothing to resync.- Throws:
QException
-