All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.internet2.middleware.grouper.subj.cache.SubjectSourceSerializer Maven / Gradle / Ivy

There is a newer version: 5.12.2
Show newest version
/**
 * @author mchyzer
 * $Id$
 */
package edu.internet2.middleware.grouper.subj.cache;

import java.util.Map;


/**
 * serialize a cache to storage
 */
public abstract class SubjectSourceSerializer {

  /**
   * 
   */
  public SubjectSourceSerializer() {
  }

  /**
   * store subject cache to serialization mechanism
   * @param subjectSourceCacheBean
   * @param debugMap if not null add debug info
   */
  public abstract void storeSubjectCache(SubjectSourceCacheBean subjectSourceCacheBean, Map debugMap);
  
  /**
   * store subject cache to serialization mechanism
   * @param newerThanMillis
   * @param debugMap if not null add debug info
   * @return subjectSourceCacheBean
   */
  public abstract SubjectSourceCacheBean retrieveLatestSubjectCache(long newerThanMillis, Map debugMap);
  
  /**
   * if there are old caches that can be safely removed, remove them
   * @param keepNewestIfNewerThanMillis 
   * @param debugMap if not null add debug info
   * @return how many caches removed
   */
  public abstract int cleanupOldSubjectCaches(long keepNewestIfNewerThanMillis, Map debugMap);
  
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy