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
CacheLoaderExceptionpublic final void fromStreamSupport(ObjectInput objectInput) throws CacheLoaderException
CacheLoaderExceptionpublic final void toStreamSupport(ObjectOutput objectOutput, byte streamDelimiter, boolean filterExpired) throws CacheLoaderException
CacheLoaderExceptionpublic final Set<InternalCacheEntry> loadAllSupport(boolean filterExpired) throws CacheLoaderException
CacheLoaderExceptionpublic Set<Object> loadAllKeysSupport(Set<Object> keysToExclude) throws CacheLoaderException
CacheLoaderExceptionpublic final Set<InternalCacheEntry> loadSome(int maxEntries) throws CacheLoaderException
CacheLoaderExceptionprotected abstract String getLoadAllKeysSql()
protected abstract void loadAllProcess(ResultSet rs, Set<InternalCacheEntry> result) throws SQLException, CacheLoaderException
SQLExceptionCacheLoaderExceptionprotected abstract void loadAllProcess(ResultSet rs, Set<InternalCacheEntry> result, int maxEntries) throws SQLException, CacheLoaderException
SQLExceptionCacheLoaderExceptionprotected abstract void loadAllKeysProcess(ResultSet rs, Set<Object> keys, Set<Object> keysToExclude) throws SQLException, CacheLoaderException
SQLExceptionCacheLoaderExceptionprotected 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 © 2012 JBoss, a division of Red Hat. All Rights Reserved.