Class BaseJdbcStore<K,​V,​C extends AbstractJdbcStoreConfiguration>

  • All Implemented Interfaces:
    org.infinispan.persistence.spi.NonBlockingStore<K,​V>

    public abstract class BaseJdbcStore<K,​V,​C extends AbstractJdbcStoreConfiguration>
    extends Object
    implements org.infinispan.persistence.spi.NonBlockingStore<K,​V>
    • Constructor Detail

      • BaseJdbcStore

        public BaseJdbcStore()
    • Method Detail

      • characteristics

        public Set<org.infinispan.persistence.spi.NonBlockingStore.Characteristic> characteristics()
        Specified by:
        characteristics in interface org.infinispan.persistence.spi.NonBlockingStore<K,​V>
      • createTableOperations

        protected abstract TableOperations<K,​V> createTableOperations​(org.infinispan.persistence.spi.InitializationContext ctx,
                                                                            C config)
                                                                     throws SQLException
        Extension point to allow for initializing and creating a table operations object. All variables in the BaseJdbcStore will be initialized except for tableOperations when this is invoked.
        Parameters:
        ctx - store context
        config - configuration of the store
        Returns:
        the table operations to use for future calls
        Throws:
        SQLException - if any database exception occurs during creation
      • start

        public CompletionStage<Void> start​(org.infinispan.persistence.spi.InitializationContext ctx)
        Specified by:
        start in interface org.infinispan.persistence.spi.NonBlockingStore<K,​V>
      • extraStopSteps

        protected void extraStopSteps()
        Method to extend to add additional steps when the store is shutting down. This is invoked before the connectionFactory is shut down and should not do so.
      • stop

        public CompletionStage<Void> stop()
        Specified by:
        stop in interface org.infinispan.persistence.spi.NonBlockingStore<K,​V>
      • isAvailable

        public CompletionStage<Boolean> isAvailable()
        Specified by:
        isAvailable in interface org.infinispan.persistence.spi.NonBlockingStore<K,​V>
      • load

        public CompletionStage<org.infinispan.persistence.spi.MarshallableEntry<K,​V>> load​(int segment,
                                                                                                 Object key)
        Specified by:
        load in interface org.infinispan.persistence.spi.NonBlockingStore<K,​V>
      • write

        public CompletionStage<Void> write​(int segment,
                                           org.infinispan.persistence.spi.MarshallableEntry<? extends K,​? extends V> entry)
        Specified by:
        write in interface org.infinispan.persistence.spi.NonBlockingStore<K,​V>
      • delete

        public CompletionStage<Boolean> delete​(int segment,
                                               Object key)
        Specified by:
        delete in interface org.infinispan.persistence.spi.NonBlockingStore<K,​V>
      • clear

        public CompletionStage<Void> clear()
        Specified by:
        clear in interface org.infinispan.persistence.spi.NonBlockingStore<K,​V>
      • batch

        public CompletionStage<Void> batch​(int publisherCount,
                                           org.reactivestreams.Publisher<org.infinispan.persistence.spi.NonBlockingStore.SegmentedPublisher<Object>> removePublisher,
                                           org.reactivestreams.Publisher<org.infinispan.persistence.spi.NonBlockingStore.SegmentedPublisher<org.infinispan.persistence.spi.MarshallableEntry<K,​V>>> writePublisher)
        Specified by:
        batch in interface org.infinispan.persistence.spi.NonBlockingStore<K,​V>
      • prepareWithModifications

        public CompletionStage<Void> prepareWithModifications​(Transaction tx,
                                                              int publisherCount,
                                                              org.reactivestreams.Publisher<org.infinispan.persistence.spi.NonBlockingStore.SegmentedPublisher<Object>> removePublisher,
                                                              org.reactivestreams.Publisher<org.infinispan.persistence.spi.NonBlockingStore.SegmentedPublisher<org.infinispan.persistence.spi.MarshallableEntry<K,​V>>> writePublisher)
        Specified by:
        prepareWithModifications in interface org.infinispan.persistence.spi.NonBlockingStore<K,​V>
      • rollback

        public CompletionStage<Void> rollback​(Transaction tx)
        Specified by:
        rollback in interface org.infinispan.persistence.spi.NonBlockingStore<K,​V>
      • destroyTxConnection

        protected void destroyTxConnection​(Transaction tx)
      • publishEntries

        public org.reactivestreams.Publisher<org.infinispan.persistence.spi.MarshallableEntry<K,​V>> publishEntries​(org.infinispan.commons.util.IntSet segments,
                                                                                                                         Predicate<? super K> filter,
                                                                                                                         boolean includeValues)
        Specified by:
        publishEntries in interface org.infinispan.persistence.spi.NonBlockingStore<K,​V>
      • publishKeys

        public org.reactivestreams.Publisher<K> publishKeys​(org.infinispan.commons.util.IntSet segments,
                                                            Predicate<? super K> filter)
        Specified by:
        publishKeys in interface org.infinispan.persistence.spi.NonBlockingStore<K,​V>
      • size

        public CompletionStage<Long> size​(org.infinispan.commons.util.IntSet segments)
        Specified by:
        size in interface org.infinispan.persistence.spi.NonBlockingStore<K,​V>
      • approximateSize

        public CompletionStage<Long> approximateSize​(org.infinispan.commons.util.IntSet segments)
        Specified by:
        approximateSize in interface org.infinispan.persistence.spi.NonBlockingStore<K,​V>