Class BaseTableOperations<K,V>
java.lang.Object
org.infinispan.persistence.jdbc.common.sql.BaseTableOperations<K,V>
- All Implemented Interfaces:
TableOperations<K,
V>
- Direct Known Subclasses:
AbstractSchemaJdbcStore.SchemaTableOperations
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
protected class
-
Field Summary
Modifier and TypeFieldDescriptionprotected final int
protected final int
protected final int
-
Constructor Summary
ConstructorDescriptionBaseTableOperations
(int fetchSize, int writeQueryTimeout, int readQueryTimeout) -
Method Summary
Modifier and TypeMethodDescriptionvoid
batchUpdates
(Connection connection, int writePublisherCount, org.reactivestreams.Publisher<Object> removePublisher, org.reactivestreams.Publisher<NonBlockingStore.SegmentedPublisher<MarshallableEntry<K, V>>> writePublisher) void
deleteAllRows
(Connection connection) boolean
deleteEntry
(Connection connection, int segment, Object key) protected abstract MarshallableEntry<K,
V> entryFromResultSet
(ResultSet rs, Object keyIfProvided, boolean fetchValue, Predicate<? super K> keyPredicate) abstract String
abstract String
abstract String
getSelectAllSql
(IntSet segments) abstract String
abstract String
abstract String
loadEntry
(Connection connection, int segment, Object key) protected abstract void
prepareKeyStatement
(PreparedStatement ps, Object key) protected void
preparePublishStatement
(PreparedStatement ps, IntSet segments) protected void
protected abstract void
prepareValueStatement
(PreparedStatement ps, int segment, MarshallableEntry<? extends K, ? extends V> entry) io.reactivex.rxjava3.core.Flowable<MarshallableEntry<K,
V>> publishEntries
(Supplier<Connection> connectionSupplier, Consumer<Connection> connectionCloser, IntSet segments, Predicate<? super K> filter, boolean fetchValue) long
size
(Connection connection) void
upsertEntry
(Connection connection, int segment, MarshallableEntry<? extends K, ? extends V> entry) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.infinispan.persistence.jdbc.common.TableOperations
publishKeys
-
Field Details
-
fetchSize
protected final int fetchSize -
writeQueryTimeout
protected final int writeQueryTimeout -
readQueryTimeout
protected final int readQueryTimeout
-
-
Constructor Details
-
BaseTableOperations
public BaseTableOperations(int fetchSize, int writeQueryTimeout, int readQueryTimeout)
-
-
Method Details
-
getSelectRowSql
-
getSelectAllSql
-
getDeleteRowSql
-
getDeleteAllSql
-
getUpsertRowSql
-
getSizeSql
-
entryFromResultSet
protected abstract MarshallableEntry<K,V> entryFromResultSet(ResultSet rs, Object keyIfProvided, boolean fetchValue, Predicate<? super K> keyPredicate) throws SQLException - Throws:
SQLException
-
prepareKeyStatement
- Throws:
SQLException
-
prepareValueStatement
protected abstract void prepareValueStatement(PreparedStatement ps, int segment, MarshallableEntry<? extends K, ? extends V> entry) throws SQLException- Throws:
SQLException
-
prepareSizeStatement
- Throws:
SQLException
-
preparePublishStatement
- Throws:
SQLException
-
loadEntry
public MarshallableEntry<K,V> loadEntry(Connection connection, int segment, Object key) throws SQLException - Specified by:
loadEntry
in interfaceTableOperations<K,
V> - Throws:
SQLException
-
deleteEntry
- Specified by:
deleteEntry
in interfaceTableOperations<K,
V> - Throws:
SQLException
-
deleteAllRows
- Specified by:
deleteAllRows
in interfaceTableOperations<K,
V> - Throws:
SQLException
-
upsertEntry
public void upsertEntry(Connection connection, int segment, MarshallableEntry<? extends K, ? extends V> entry) throws SQLException- Specified by:
upsertEntry
in interfaceTableOperations<K,
V> - Throws:
SQLException
-
size
- Specified by:
size
in interfaceTableOperations<K,
V> - Throws:
SQLException
-
batchUpdates
public void batchUpdates(Connection connection, int writePublisherCount, org.reactivestreams.Publisher<Object> removePublisher, org.reactivestreams.Publisher<NonBlockingStore.SegmentedPublisher<MarshallableEntry<K, V>>> writePublisher) throws SQLException- Specified by:
batchUpdates
in interfaceTableOperations<K,
V> - Throws:
SQLException
-
publishEntries
public io.reactivex.rxjava3.core.Flowable<MarshallableEntry<K,V>> publishEntries(Supplier<Connection> connectionSupplier, Consumer<Connection> connectionCloser, IntSet segments, Predicate<? super K> filter, boolean fetchValue) - Specified by:
publishEntries
in interfaceTableOperations<K,
V>
-