{@link org.infinispan.persistence.spi.AdvancedCacheLoader} implementation that stores the entries in a database. In contrast to the{@link org.infinispan.persistence.jdbc.binary.JdbcBinaryStore}, this cache store will store each entry within a row in the table (rather than grouping multiple entries into an row). This assures a finer grained granularity for all operation, and better performance. In order to be able to store non-string keys, it relies on an {@link org.infinispan.persistence.keymappers.Key2StringMapper}.
Note that only the keys are stored as strings, the values are still saved as binary data. Using a character data type for the value column will result in unmarshalling errors.
The actual storage table is defined through configuration {@link org.infinispan.persistence.jdbc.configuration.JdbcStringBasedStoreConfiguration}. The table can be created/dropped on-the-fly, at deployment time. For more details consult javadoc for {@link org.infinispan.persistence.jdbc.configuration.JdbcStringBasedStoreConfiguration}.
It is recommended to use {@link JdbcStringBasedStore}} over {@link org.infinispan.persistence.jdbc.binary.JdbcBinaryStore}} whenever it is possible, as is has a better performance. One scenario in which this is not possible to use it though, is when you can't write an {@link org.infinispan.persistence.keymappers.Key2StringMapper}} to map the keys to to string objects (e.g. when you don't have control over the types of the keys, for whatever reason).
Preload.In order to support preload functionality the store needs to read the string keys from the database and transform them into the corresponding key objects. {@link org.infinispan.persistence.keymappers.Key2StringMapper} only supportskey to string transformation(one way); in order to be able to use preload one needs to specify an {@link org.infinispan.persistence.keymappers.TwoWayKey2StringMapper}, which extends {@link org.infinispan.persistence.keymappers.Key2StringMapper} andallows bidirectional transformation.
Rehashing. When a node leaves/joins, Infinispan moves around persistent state as part of rehashing process. For this it needs access to the underlaying key objects, so if distribution is used, the mapper needs to be an {@link org.infinispan.persistence.keymappers.TwoWayKey2StringMapper} otherwise the cache won't start (same constraint as with preloading).
@author Mircea.Markus@jboss.com
@see org.infinispan.persistence.keymappers.Key2StringMapper
@see org.infinispan.persistence.keymappers.DefaultTwoWayKey2StringMapper