/** * Returns the cache status. An error status indicates the remote connection is not available. * <p> * @return The status value */ @Override public CacheStatus getStatus() { return getRemoteCacheService() instanceof IZombie ? CacheStatus.ERROR : CacheStatus.ALIVE; }
/** * Returns the cache status. An error status indicates the remote connection is not available. * <p> * @return The status value */ @Override public CacheStatus getStatus() { return getRemoteCacheService() instanceof IZombie ? CacheStatus.ERROR : CacheStatus.ALIVE; }
/** * Return the keys in this cache. * <p> * @see org.apache.commons.jcs.auxiliary.AuxiliaryCache#getKeySet() */ @Override public Set<K> getKeySet() throws java.rmi.RemoteException, IOException { return getRemoteCacheService().getKeySet(cacheName); }
/** * Return the keys in this cache. * <p> * @see org.apache.commons.jcs.auxiliary.AuxiliaryCache#getKeySet() */ @Override public Set<K> getKeySet() throws IOException { return getRemoteCacheService().getKeySet(cacheName); }
@Override public ICacheElement<K, V> call() throws IOException { return getRemoteCacheService().get( cacheName, key, getListenerId() ); } };
@Override public ICacheElement<K, V> call() throws IOException { return getRemoteCacheService().get( cacheName, key, getListenerId() ); } };
if ( getRemoteCacheService() != null && getRemoteCacheService() instanceof ZombieCacheServiceNonLocal ) ZombieCacheServiceNonLocal<K, V> zombie = (ZombieCacheServiceNonLocal<K, V>) getRemoteCacheService(); setRemoteCacheService( remote ); try
if ( getRemoteCacheService() instanceof ZombieCacheServiceNonLocal ) Integer.valueOf(( (ZombieCacheServiceNonLocal<K, V>) getRemoteCacheService() ).getQueueSize()) ) );
if ( getRemoteCacheService() instanceof ZombieCacheServiceNonLocal ) Integer.valueOf(( (ZombieCacheServiceNonLocal<K, V>) getRemoteCacheService() ).getQueueSize()) ) );
try Map<K, ICacheElement<K, V>> rawResults = getRemoteCacheService().getMatching( cacheName, pattern, getListenerId() );
try Map<K, ICacheElement<K, V>> rawResults = getRemoteCacheService().getMatching( cacheName, pattern, getListenerId() );
/** * Synchronously remove from the remote cache; if failed, replace the remote handle with a * zombie. * <p> * @param key * @return boolean, whether or not the item was removed * @throws IOException */ @Override protected boolean processRemove( K key ) throws IOException { if ( !this.getRemoteCacheAttributes().getGetOnly() ) { if ( log.isDebugEnabled() ) { log.debug( "remove> key=" + key ); } try { getRemoteCacheService().remove( cacheName, key, getListenerId() ); } catch ( Exception ex ) { handleException( ex, "Failed to remove " + key + " from " + cacheName, ICacheEventLogger.REMOVE_EVENT ); } return true; } return false; }
/** * Synchronously remove from the remote cache; if failed, replace the remote handle with a * zombie. * <p> * @param key * @return boolean, whether or not the item was removed * @throws IOException */ @Override protected boolean processRemove( K key ) throws IOException { if ( !this.getRemoteCacheAttributes().getGetOnly() ) { if ( log.isDebugEnabled() ) { log.debug( "remove> key=" + key ); } try { getRemoteCacheService().remove( cacheName, key, getListenerId() ); } catch ( Exception ex ) { handleException( ex, "Failed to remove " + key + " from " + cacheName, ICacheEventLogger.REMOVE_EVENT ); } return true; } return false; }
/** * Synchronously removeAll from the remote cache; if failed, replace the remote handle with a * zombie. * <p> * @throws IOException */ @Override protected void processRemoveAll() throws IOException { if ( !this.getRemoteCacheAttributes().getGetOnly() ) { try { getRemoteCacheService().removeAll( cacheName, getListenerId() ); } catch ( Exception ex ) { handleException( ex, "Failed to remove all from " + cacheName, ICacheEventLogger.REMOVEALL_EVENT ); } } }
ICacheServiceNonLocal<K, V> prevRemote = getRemoteCacheService(); if ( prevRemote instanceof ZombieCacheServiceNonLocal )
/** * Synchronously removeAll from the remote cache; if failed, replace the remote handle with a * zombie. * <p> * @throws IOException */ @Override protected void processRemoveAll() throws IOException { if ( !this.getRemoteCacheAttributes().getGetOnly() ) { try { getRemoteCacheService().removeAll( cacheName, getListenerId() ); } catch ( Exception ex ) { handleException( ex, "Failed to remove all from " + cacheName, ICacheEventLogger.REMOVEALL_EVENT ); } } }
retVal = getRemoteCacheService().get( cacheName, key, getListenerId() );
retVal = getRemoteCacheService().get( cacheName, key, getListenerId() );