/** * Nothing right now. This should setup a zombie and initiate recovery. * <p> * @param ex * @param msg * @param eventName * @throws IOException */ @Override protected void handleException( Exception ex, String msg, String eventName ) throws IOException { // we should not switch if the existing is a zombie. if ( !( getRemoteCacheService() instanceof ZombieCacheServiceNonLocal ) ) { String message = "Disabling remote cache due to error: " + msg; logError( cacheName, "", message ); log.error( message, ex ); setRemoteCacheService( new ZombieCacheServiceNonLocal<K, V>( getRemoteCacheAttributes().getZombieQueueMaxSize() ) ); monitor.notifyError( this ); } if ( ex instanceof IOException ) { throw (IOException) ex; } throw new IOException( ex.getMessage() ); }
/** * Constructor for the RemoteCache object. This object communicates with a remote cache server. * One of these exists for each region. This also holds a reference to a listener. The same * listener is used for all regions for one remote server. Holding a reference to the listener * allows this object to know the listener id assigned by the remote cache. * <p> * @param remoteHttpCacheAttributes * @param remote * @param listener */ public RemoteHttpCache( RemoteHttpCacheAttributes remoteHttpCacheAttributes, ICacheServiceNonLocal<K, V> remote, IRemoteCacheListener<K, V> listener ) { super( remoteHttpCacheAttributes, remote, listener ); setRemoteHttpCacheAttributes( remoteHttpCacheAttributes ); }
if ( remoteCache.getStatus() == CacheStatus.ERROR ) RemoteHttpCacheAttributes attributes = remoteCache.getRemoteHttpCacheAttributes(); remoteCache.fixCache( remoteService );
IRemoteCacheClient<K, V> remoteCacheClient = new RemoteHttpCache<K, V>( cattr, remoteService, listener ); remoteCacheClient.setCacheEventLogger( cacheEventLogger ); remoteCacheClient.setElementSerializer( elementSerializer );
if ( remoteCache.getStatus() == CacheStatus.ERROR ) RemoteHttpCacheAttributes attributes = remoteCache.getRemoteHttpCacheAttributes(); remoteCache.fixCache( remoteService );
new RemoteHttpCache<K, V>( rca, remoteService, listener, monitor ); remoteCacheClient.setCacheEventLogger( cacheEventLogger ); remoteCacheClient.setElementSerializer( elementSerializer );
/** * Nothing right now. This should setup a zombie and initiate recovery. * <p> * @param ex * @param msg * @param eventName * @throws IOException */ @Override protected void handleException( Exception ex, String msg, String eventName ) throws IOException { // we should not switch if the existing is a zombie. if ( !( getRemoteCacheService() instanceof ZombieCacheServiceNonLocal ) ) { String message = "Disabling remote cache due to error: " + msg; logError( cacheName, "", message ); log.error( message, ex ); setRemoteCacheService( new ZombieCacheServiceNonLocal<K, V>( getRemoteCacheAttributes().getZombieQueueMaxSize() ) ); RemoteHttpCacheMonitor.getInstance().notifyError( this ); } if ( ex instanceof IOException ) { throw (IOException) ex; } throw new IOException( ex.getMessage() ); }