}
@Override
public void loadAllProcess(ResultSet rs, Set<InternalCacheEntry> result) throws SQLException, CacheLoaderException {
InputStream inputStream = rs.getBinaryStream(1);
InternalCacheValue icv = (InternalCacheValue) JdbcUtil.unmarshall(getMarshaller(), inputStream);
String keyStr = rs.getString(2);
Object key = ((TwoWayKey2StringMapper) key2StringMapper).getKeyMapping(keyStr);
result.add(icv.toInternalCacheEntry(key));
}
@Override
public void loadAllKeysProcess(ResultSet rs, Set<Object> keys, Set<Object> keysToExclude) throws SQLException, CacheLoaderException {
String keyStr = rs.getString(1);
Object key = ((TwoWayKey2StringMapper) key2StringMapper).getKeyMapping(keyStr);
if (includeKey(key, keysToExclude)) {
keys.add(key);
}
}
@Override
public void toStreamProcess(ResultSet rs, InputStream is, ObjectOutput objectOutput) throws CacheLoaderException, SQLException, IOException {
InternalCacheValue icv = (InternalCacheValue) JdbcUtil.unmarshall(getMarshaller(), is);
String key = rs.getString(2);//key is a string
marshaller.objectToObjectStream(icv.toInternalCacheEntry(key), objectOutput);
}
public boolean fromStreamProcess(Object objFromStream, PreparedStatement ps, ObjectInput objectInput) throws SQLException, CacheLoaderException, InterruptedException {
if (objFromStream instanceof InternalCacheEntry) {
InternalCacheEntry se = (InternalCacheEntry) objFromStream;