org.wildfly.swarm.config.infinispan.cache_container

## Class JDBCStore<T extends JDBCStore<T>>

- java.lang.Object
- - org.wildfly.swarm.config.infinispan.cache_container.JDBCStore<T>

-     public class JDBCStore<T extends JDBCStore<T>>
      extends Object

  The cache JDBC store configuration.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `JDBCStore.JDBCStoreResources` Child mutators for JDBCStore

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JDBCStore()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addPropertyChangeListener(PropertyChangeListener listener)` Adds a property change listener
    `T` | `behindWrite()` Configures a cache store as write-behind instead of write-through.
    `T` | `behindWrite(BehindWrite value)` Configures a cache store as write-behind instead of write-through.
    `T` | `behindWrite(BehindWriteConsumer consumer)` Configures a cache store as write-behind instead of write-through.
    `T` | `behindWrite(BehindWriteSupplier supplier)` Configures a cache store as write-behind instead of write-through.
    `Long` | `cacheLoaderLoads()` The number of cache loader node loads.
    `T` | `cacheLoaderLoads(Long value)` The number of cache loader node loads.
    `Long` | `cacheLoaderMisses()` The number of cache loader node misses.
    `T` | `cacheLoaderMisses(Long value)` The number of cache loader node misses.
    `String` | `datasource()` The jndi name of the data source used to connect to this store.
    `String` | `dataSource()` References the data source used to connect to this store.
    `T` | `datasource(String value)` The jndi name of the data source used to connect to this store.
    `T` | `dataSource(String value)` References the data source used to connect to this store.
    `Dialect` | `dialect()` The dialect of this datastore.
    `T` | `dialect(Dialect value)` The dialect of this datastore.
    `Boolean` | `fetchState()` If true, fetch persistent state when joining a cluster.
    `T` | `fetchState(Boolean value)` If true, fetch persistent state when joining a cluster.
    `String` | `getKey()`
    `Boolean` | `passivation()` If true, data is only written to the cache store when it is evicted from memory, a phenomenon known as 'passivation'.
    `T` | `passivation(Boolean value)` If true, data is only written to the cache store when it is evicted from memory, a phenomenon known as 'passivation'.
    `Boolean` | `preload()` If true, when the cache starts, data stored in the cache store will be pre-loaded into memory.
    `T` | `preload(Boolean value)` If true, when the cache starts, data stored in the cache store will be pre-loaded into memory.
    `Map` | `properties()` A list of cache store properties.
    `T` | `properties(List<Property> value)` Add all Property objects to this subresource
    `T` | `properties(Map value)` A list of cache store properties.
    `T` | `property(Property value)` Add the Property object to the list of subresources
    `T` | `property(PropertySupplier supplier)` Install a supplied Property object to the list of subresources
    `T` | `property(String childKey)` Create and configure a Property object to the list of subresources
    `T` | `property(String key, Object value)` A list of cache store properties.
    `T` | `property(String childKey, PropertyConsumer consumer)` Create and configure a Property object to the list of subresources
    `Boolean` | `purge()` If true, purges this cache store when it starts up.
    `T` | `purge(Boolean value)` If true, purges this cache store when it starts up.
    `void` | `removePropertyChangeListener(PropertyChangeListener listener)` Removes a property change listener
    `Boolean` | `shared()` This setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times.
    `T` | `shared(Boolean value)` This setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times.
    `Boolean` | `singleton()` If true, the singleton store cache store is enabled.
    `T` | `singleton(Boolean value)` If true, the singleton store cache store is enabled.
    `Map` | `stringKeyedTable()` Defines a table used to store persistent cache entries.
    `T` | `stringKeyedTable(Map value)` Defines a table used to store persistent cache entries.
    `T` | `stringKeyedTable(String key, Object value)` Defines a table used to store persistent cache entries.
    `T` | `stringTable()` Defines a table used to store cache entries whose keys can be expressed as strings.
    `T` | `stringTable(StringTable value)` Defines a table used to store cache entries whose keys can be expressed as strings.
    `T` | `stringTable(StringTableConsumer consumer)` Defines a table used to store cache entries whose keys can be expressed as strings.
    `T` | `stringTable(StringTableSupplier supplier)` Defines a table used to store cache entries whose keys can be expressed as strings.
    `JDBCStore.JDBCStoreResources` | `subresources()`
    `T` | `throughWrite()` Configures a cache store as write-through.
    `T` | `throughWrite(ThroughWrite value)` Configures a cache store as write-through.
    `T` | `throughWrite(ThroughWriteConsumer consumer)` Configures a cache store as write-through.
    `T` | `throughWrite(ThroughWriteSupplier supplier)` Configures a cache store as write-through.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JDBCStore

          public JDBCStore()

  - ### Method Detail

    - #### getKey

          public String getKey()

    - #### addPropertyChangeListener

          public void addPropertyChangeListener(PropertyChangeListener listener)

      Adds a property change listener

    - #### removePropertyChangeListener

          public void removePropertyChangeListener(PropertyChangeListener listener)

      Removes a property change listener

    - #### subresources

          public JDBCStore.JDBCStoreResources subresources()

    - #### properties

          public T properties(List<Property> value)

      Add all Property objects to this subresource
      Parameters:
        `value` - List of Property objects.
      Returns:
        this

    - #### property

          public T property(Property value)

      Add the Property object to the list of subresources
      Parameters:
        `value` - The Property to add
      Returns:
        this

    - #### property

          public T property(String childKey,
                            PropertyConsumer consumer)

      Create and configure a Property object to the list of subresources
      Parameters:
        `key` - The key for the Property resource
        `config` - The PropertyConsumer to use
      Returns:
        this

    - #### property

          public T property(String childKey)

      Create and configure a Property object to the list of subresources
      Parameters:
        `key` - The key for the Property resource
      Returns:
        this

    - #### property

          public T property(PropertySupplier supplier)

      Install a supplied Property object to the list of subresources

    - #### throughWrite

          public T throughWrite(ThroughWrite value)

      Configures a cache store as write-through.

    - #### throughWrite

          public T throughWrite(ThroughWriteConsumer consumer)

      Configures a cache store as write-through.

    - #### throughWrite

          public T throughWrite()

      Configures a cache store as write-through.

    - #### throughWrite

          public T throughWrite(ThroughWriteSupplier supplier)

      Configures a cache store as write-through.

    - #### behindWrite

          public T behindWrite(BehindWrite value)

      Configures a cache store as write-behind instead of write-through.

    - #### behindWrite

          public T behindWrite(BehindWriteConsumer consumer)

      Configures a cache store as write-behind instead of write-through.

    - #### behindWrite

          public T behindWrite()

      Configures a cache store as write-behind instead of write-through.

    - #### behindWrite

          public T behindWrite(BehindWriteSupplier supplier)

      Configures a cache store as write-behind instead of write-through.

    - #### stringTable

          public T stringTable(StringTable value)

      Defines a table used to store cache entries whose keys can be expressed as strings.

    - #### stringTable

          public T stringTable(StringTableConsumer consumer)

      Defines a table used to store cache entries whose keys can be expressed as strings.

    - #### stringTable

          public T stringTable()

      Defines a table used to store cache entries whose keys can be expressed as strings.

    - #### stringTable

          public T stringTable(StringTableSupplier supplier)

      Defines a table used to store cache entries whose keys can be expressed as strings.

    - #### cacheLoaderLoads

          public Long cacheLoaderLoads()

      The number of cache loader node loads. May return null if the cache is not started.

    - #### cacheLoaderLoads

          public T cacheLoaderLoads(Long value)

      The number of cache loader node loads. May return null if the cache is not started.

    - #### cacheLoaderMisses

          public Long cacheLoaderMisses()

      The number of cache loader node misses. May return null if the cache is not started.

    - #### cacheLoaderMisses

          public T cacheLoaderMisses(Long value)

      The number of cache loader node misses. May return null if the cache is not started.

    - #### dataSource

          public String dataSource()

      References the data source used to connect to this store.

    - #### dataSource

          public T dataSource(String value)

      References the data source used to connect to this store.

    - #### datasource

          public String datasource()

      The jndi name of the data source used to connect to this store.

    - #### datasource

          public T datasource(String value)

      The jndi name of the data source used to connect to this store.

    - #### dialect

          public Dialect dialect()

      The dialect of this datastore.

    - #### dialect

          public T dialect(Dialect value)

      The dialect of this datastore.

    - #### fetchState

          public Boolean fetchState()

      If true, fetch persistent state when joining a cluster. If multiple cache stores are chained, only one of them can have this property enabled.

    - #### fetchState

          public T fetchState(Boolean value)

      If true, fetch persistent state when joining a cluster. If multiple cache stores are chained, only one of them can have this property enabled.

    - #### passivation

          public Boolean passivation()

      If true, data is only written to the cache store when it is evicted from memory, a phenomenon known as 'passivation'. Next time the data is requested, it will be 'activated' which means that data will be brought back to memory and removed from the persistent store. If false, the cache store contains a copy of the contents in memory, so writes to cache result in cache store writes. This essentially gives you a 'write-through' configuration.

    - #### passivation

          public T passivation(Boolean value)

      If true, data is only written to the cache store when it is evicted from memory, a phenomenon known as 'passivation'. Next time the data is requested, it will be 'activated' which means that data will be brought back to memory and removed from the persistent store. If false, the cache store contains a copy of the contents in memory, so writes to cache result in cache store writes. This essentially gives you a 'write-through' configuration.

    - #### preload

          public Boolean preload()

      If true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.

    - #### preload

          public T preload(Boolean value)

      If true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.

    - #### properties

          public Map properties()

      A list of cache store properties.

    - #### properties

          public T properties(Map value)

      A list of cache store properties.

    - #### property

          public T property(String key,
                            Object value)

      A list of cache store properties.

    - #### purge

          public Boolean purge()

      If true, purges this cache store when it starts up.

    - #### purge

          public T purge(Boolean value)

      If true, purges this cache store when it starts up.

    - #### shared

          public Boolean shared()

      This setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.

    - #### shared

          public T shared(Boolean value)

      This setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.

    - #### singleton

          public Boolean singleton()

      If true, the singleton store cache store is enabled. SingletonStore is a delegating cache store used for situations when only one instance in a cluster should interact with the underlying store.

    - #### singleton

          public T singleton(Boolean value)

      If true, the singleton store cache store is enabled. SingletonStore is a delegating cache store used for situations when only one instance in a cluster should interact with the underlying store.

    - #### stringKeyedTable

          public Map stringKeyedTable()

      Defines a table used to store persistent cache entries.

    - #### stringKeyedTable

          public T stringKeyedTable(Map value)

      Defines a table used to store persistent cache entries.

    - #### stringKeyedTable

          public T stringKeyedTable(String key,
                                    Object value)

      Defines a table used to store persistent cache entries.

Copyright © 2018 JBoss by Red Hat. All rights reserved.