public abstract class DataManipulationHelper extends Object
JdbcStringBasedCacheStore
and JdbcBinaryCacheStore
. This class implements GOF's template method pattern.Modifier and Type | Field and Description |
---|---|
protected StreamingMarshaller |
marshaller |
Constructor and Description |
---|
DataManipulationHelper(ConnectionFactory connectionFactory,
TableManipulation tableManipulation,
StreamingMarshaller marshaller) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
protected abstract boolean |
fromStreamProcess(Object objFromStream,
PreparedStatement ps,
ObjectInput objectInput) |
void |
fromStreamSupport(ObjectInput objectInput) |
protected abstract String |
getLoadAllKeysSql() |
protected boolean |
includeKey(Object key,
Set<Object> keysToExclude) |
protected abstract void |
loadAllKeysProcess(ResultSet rs,
Set<Object> keys,
Set<Object> keysToExclude) |
Set<Object> |
loadAllKeysSupport(Set<Object> keysToExclude) |
protected abstract void |
loadAllProcess(ResultSet rs,
Set<InternalCacheEntry> result) |
protected abstract void |
loadAllProcess(ResultSet rs,
Set<InternalCacheEntry> result,
int maxEntries) |
Set<InternalCacheEntry> |
loadAllSupport(boolean filterExpired) |
Set<InternalCacheEntry> |
loadSome(int maxEntries) |
protected abstract void |
toStreamProcess(ResultSet rs,
InputStream is,
ObjectOutput objectOutput) |
void |
toStreamSupport(ObjectOutput objectOutput,
byte streamDelimiter,
boolean filterExpired) |
protected StreamingMarshaller marshaller
public DataManipulationHelper(ConnectionFactory connectionFactory, TableManipulation tableManipulation, StreamingMarshaller marshaller)
public void clear() throws CacheLoaderException
CacheLoaderException
public final void fromStreamSupport(ObjectInput objectInput) throws CacheLoaderException
CacheLoaderException
public final void toStreamSupport(ObjectOutput objectOutput, byte streamDelimiter, boolean filterExpired) throws CacheLoaderException
CacheLoaderException
public final Set<InternalCacheEntry> loadAllSupport(boolean filterExpired) throws CacheLoaderException
CacheLoaderException
public Set<Object> loadAllKeysSupport(Set<Object> keysToExclude) throws CacheLoaderException
CacheLoaderException
public final Set<InternalCacheEntry> loadSome(int maxEntries) throws CacheLoaderException
CacheLoaderException
protected abstract String getLoadAllKeysSql()
protected abstract void loadAllProcess(ResultSet rs, Set<InternalCacheEntry> result) throws SQLException, CacheLoaderException
SQLException
CacheLoaderException
protected abstract void loadAllProcess(ResultSet rs, Set<InternalCacheEntry> result, int maxEntries) throws SQLException, CacheLoaderException
SQLException
CacheLoaderException
protected abstract void loadAllKeysProcess(ResultSet rs, Set<Object> keys, Set<Object> keysToExclude) throws SQLException, CacheLoaderException
SQLException
CacheLoaderException
protected abstract void toStreamProcess(ResultSet rs, InputStream is, ObjectOutput objectOutput) throws CacheLoaderException, SQLException, IOException
protected abstract boolean fromStreamProcess(Object objFromStream, PreparedStatement ps, ObjectInput objectInput) throws SQLException, CacheLoaderException, IOException, ClassNotFoundException, InterruptedException
Copyright © 2017 JBoss, a division of Red Hat. All Rights Reserved.