/** * Notifies the cache monitor that an error occurred, and kicks off the error recovery process. * <p> * @param remoteCache */ public void notifyError( RemoteHttpCache<?, ?> remoteCache ) { if ( log.isInfoEnabled() ) { log.info( "Notified of an error. " + remoteCache ); } remoteHttpCaches.put( remoteCache, remoteCache ); notifyError(); }
/** * 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() ); }
/** * 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() ); }