Class BaseTableOperations<K,V>
- java.lang.Object
-
- org.infinispan.persistence.jdbc.common.sql.BaseTableOperations<K,V>
-
- All Implemented Interfaces:
TableOperations<K,V>
public abstract class BaseTableOperations<K,V> extends Object implements TableOperations<K,V>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classBaseTableOperations.FlowableConnectionprotected classBaseTableOperations.ResultSetEntryIterator
-
Field Summary
Fields Modifier and Type Field Description protected intfetchSizeprotected intreadQueryTimeoutprotected intwriteQueryTimeout
-
Constructor Summary
Constructors Constructor Description BaseTableOperations(int fetchSize, int writeQueryTimeout, int readQueryTimeout)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidbatchUpdates(Connection connection, int writePublisherCount, org.reactivestreams.Publisher<Object> removePublisher, org.reactivestreams.Publisher<org.infinispan.persistence.spi.NonBlockingStore.SegmentedPublisher<org.infinispan.persistence.spi.MarshallableEntry<K,V>>> writePublisher)voiddeleteAllRows(Connection connection)booleandeleteEntry(Connection connection, int segment, Object key)protected abstract org.infinispan.persistence.spi.MarshallableEntry<K,V>entryFromResultSet(ResultSet rs, Object keyIfProvided, boolean fetchValue, Predicate<? super K> keyPredicate)abstract StringgetDeleteAllSql()abstract StringgetDeleteRowSql()abstract StringgetSelectAllSql(org.infinispan.commons.util.IntSet segments)abstract StringgetSelectRowSql()abstract StringgetSizeSql()abstract StringgetUpsertRowSql()org.infinispan.persistence.spi.MarshallableEntry<K,V>loadEntry(Connection connection, int segment, Object key)protected abstract voidprepareKeyStatement(PreparedStatement ps, Object key)protected voidpreparePublishStatement(PreparedStatement ps, org.infinispan.commons.util.IntSet segments)protected voidprepareSizeStatement(PreparedStatement ps)protected abstract voidprepareValueStatement(PreparedStatement ps, int segment, org.infinispan.persistence.spi.MarshallableEntry<? extends K,? extends V> entry)io.reactivex.rxjava3.core.Flowable<org.infinispan.persistence.spi.MarshallableEntry<K,V>>publishEntries(Supplier<Connection> connectionSupplier, Consumer<Connection> connectionCloser, org.infinispan.commons.util.IntSet segments, Predicate<? super K> filter, boolean fetchValue)longsize(Connection connection)voidupsertEntry(Connection connection, int segment, org.infinispan.persistence.spi.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
-
-
-
-
Method Detail
-
getSelectRowSql
public abstract String getSelectRowSql()
-
getSelectAllSql
public abstract String getSelectAllSql(org.infinispan.commons.util.IntSet segments)
-
getDeleteRowSql
public abstract String getDeleteRowSql()
-
getDeleteAllSql
public abstract String getDeleteAllSql()
-
getUpsertRowSql
public abstract String getUpsertRowSql()
-
getSizeSql
public abstract String getSizeSql()
-
entryFromResultSet
protected abstract org.infinispan.persistence.spi.MarshallableEntry<K,V> entryFromResultSet(ResultSet rs, Object keyIfProvided, boolean fetchValue, Predicate<? super K> keyPredicate) throws SQLException
- Throws:
SQLException
-
prepareKeyStatement
protected abstract void prepareKeyStatement(PreparedStatement ps, Object key) throws SQLException
- Throws:
SQLException
-
prepareValueStatement
protected abstract void prepareValueStatement(PreparedStatement ps, int segment, org.infinispan.persistence.spi.MarshallableEntry<? extends K,? extends V> entry) throws SQLException
- Throws:
SQLException
-
prepareSizeStatement
protected void prepareSizeStatement(PreparedStatement ps) throws SQLException
- Throws:
SQLException
-
preparePublishStatement
protected void preparePublishStatement(PreparedStatement ps, org.infinispan.commons.util.IntSet segments) throws SQLException
- Throws:
SQLException
-
loadEntry
public org.infinispan.persistence.spi.MarshallableEntry<K,V> loadEntry(Connection connection, int segment, Object key) throws SQLException
- Specified by:
loadEntryin interfaceTableOperations<K,V>- Throws:
SQLException
-
deleteEntry
public boolean deleteEntry(Connection connection, int segment, Object key) throws SQLException
- Specified by:
deleteEntryin interfaceTableOperations<K,V>- Throws:
SQLException
-
deleteAllRows
public void deleteAllRows(Connection connection) throws SQLException
- Specified by:
deleteAllRowsin interfaceTableOperations<K,V>- Throws:
SQLException
-
upsertEntry
public void upsertEntry(Connection connection, int segment, org.infinispan.persistence.spi.MarshallableEntry<? extends K,? extends V> entry) throws SQLException
- Specified by:
upsertEntryin interfaceTableOperations<K,V>- Throws:
SQLException
-
size
public long size(Connection connection) throws SQLException
- Specified by:
sizein interfaceTableOperations<K,V>- Throws:
SQLException
-
batchUpdates
public void batchUpdates(Connection connection, int writePublisherCount, org.reactivestreams.Publisher<Object> removePublisher, org.reactivestreams.Publisher<org.infinispan.persistence.spi.NonBlockingStore.SegmentedPublisher<org.infinispan.persistence.spi.MarshallableEntry<K,V>>> writePublisher) throws SQLException
- Specified by:
batchUpdatesin interfaceTableOperations<K,V>- Throws:
SQLException
-
publishEntries
public io.reactivex.rxjava3.core.Flowable<org.infinispan.persistence.spi.MarshallableEntry<K,V>> publishEntries(Supplier<Connection> connectionSupplier, Consumer<Connection> connectionCloser, org.infinispan.commons.util.IntSet segments, Predicate<? super K> filter, boolean fetchValue)
- Specified by:
publishEntriesin interfaceTableOperations<K,V>
-
-