protected boolean isOld( int maxAge, StorageItem item, boolean shouldCalculate ) { if ( !shouldCalculate ) { // simply say "is old" always return true; } // if item is manually expired, true if ( item.isExpired() ) { return true; } // a directory is not "aged" if ( StorageCollectionItem.class.isAssignableFrom( item.getClass() ) ) { return false; } // if repo is non-expirable, false if ( maxAge < 0 ) { return false; } // else check age else { return ( ( System.currentTimeMillis() - item.getRemoteChecked() ) > ( maxAge * 60L * 1000L ) ); } }
result.addProperty("remoteUrl=" + item.getRemoteUrl()); result.addProperty("storedLocally=" + item.getStoredLocally()); result.addProperty("isExpired=" + item.isExpired()); result.addProperty("readable=" + item.isReadable()); result.addProperty("writable=" + item.isWritable());
result.addProperty( "remoteUrl=" + item.getRemoteUrl() ); result.addProperty( "storedLocally=" + item.getStoredLocally() ); result.addProperty( "isExpired=" + item.isExpired() ); result.addProperty( "readable=" + item.isReadable() ); result.addProperty( "writable=" + item.isWritable() );