X-Git-Url: http://git.nikiroo.be/?p=fanfix.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Flibrary%2FBasicLibrary.java;h=c6ce22dd24c1c4fa85f60edfdcea7bd5f8de1b05;hp=b92e5b078b01047e4e40375ec401f47b4f6bfe73;hb=4452446c58411c3f8e13f1fb5c3eecd0e9140d15;hpb=1f2a7d5fe14f98b5dd762207eeaff90494fe102e diff --git a/src/be/nikiroo/fanfix/library/BasicLibrary.java b/src/be/nikiroo/fanfix/library/BasicLibrary.java index b92e5b0..c6ce22d 100644 --- a/src/be/nikiroo/fanfix/library/BasicLibrary.java +++ b/src/be/nikiroo/fanfix/library/BasicLibrary.java @@ -345,6 +345,36 @@ abstract public class BasicLibrary { // We will let it fail later } } + + /** + * Check if the {@link Story} denoted by this Library UID is present in the + * cache (if we have no cache, we default to true). + * + * @param luid + * the Library UID + * + * @return TRUE if it is + */ + public boolean isCached(String luid) { + // By default, everything is cached + return true; + } + + /** + * Clear the {@link Story} from the cache, if needed. + *
+ * The next time we try to retrieve the {@link Story}, it may be required to
+ * cache it again.
+ *
+ * @param luid
+ * the story to clear
+ *
+ * @throws IOException
+ * in case of I/O error
+ */
+ public void clearFromCache(String luid) throws IOException {
+ // By default, this is a noop.
+ }
/**
* List all the known types (sources) of stories.
@@ -584,17 +614,11 @@ abstract public class BasicLibrary {
* @throws IOException in case of IOException
*
* @deprecated use {@link BasicLibrary#getList(Progress)} and
- * {@link MetaResultList#filter(List, List, List)}
+ * {@link MetaResultList#filter(String, String, String)}
*/
@Deprecated
public synchronized List