/** * Gets the number of records currently stored in the cache, throwing an {@link IllegalStateException} if * the cache is no longer {@link #isValid() valid}. * * @return * @throws IllegalStateException * If the cache is not/no longer {@link #isValid() valid}. */ public final long getRecordCount() { if (isValid()) { return recordCount.get(); } throw new IllegalStateException(); }
/** * Gets the number of records currently stored in the cache, throwing an {@link IllegalStateException} if * the cache is no longer {@link #isValid() valid}. * * @return * @throws IllegalStateException * If the cache is not/no longer {@link #isValid() valid}. */ public final long getRecordCount() { if (isValid()) { return recordCount.get(); } throw new IllegalStateException(); }
/** * Gets all records that are stored in the cache, throwing an {@link IllegalStateException} if the cache * is no longer {@link #isValid() valid}. * * @return An iterator over all records. * @throws IllegalStateException * If the cache is not/no longer {@link #isValid() valid}. */ public final RecordIterator getRecords() { if (isValid()) { return getRecordsInternal(); } throw new IllegalStateException(); }
/** * Gets all records that are stored in the cache, throwing an {@link IllegalStateException} if the cache * is no longer {@link #isValid() valid}. * * @return An iterator over all records. * @throws IllegalStateException * If the cache is not/no longer {@link #isValid() valid}. */ public final RecordIterator getRecords() { if (isValid()) { return getRecordsInternal(); } throw new IllegalStateException(); }
boolean validCache = updatedTriplesCache != null && updatedTriplesCache.isValid();
boolean validCache = updatedTriplesCache != null && updatedTriplesCache.isValid();
boolean validCache = updatedTriplesCache != null && updatedTriplesCache.isValid();
boolean validCache = updatedTriplesCache != null && updatedTriplesCache.isValid();