Class SubjectSourceCacheItem

java.lang.Object
edu.internet2.middleware.grouper.subj.cache.SubjectSourceCacheItem
All Implemented Interfaces:
Serializable

public class SubjectSourceCacheItem extends Object implements Serializable
item in the subject source cache
See Also:
  • Constructor Details

    • SubjectSourceCacheItem

      public SubjectSourceCacheItem()
  • Method Details

    • getNumberOfTimesRetrieved

      public int getNumberOfTimesRetrieved()
      Returns:
      the numberOfTimesRetrieved
    • setNumberOfTimesRetrieved

      public void setNumberOfTimesRetrieved(int numberOfTimesRetrieved1)
      number of times this has been accessed since last retrieved
      Parameters:
      numberOfTimesRetrieved1 - the numberOfTimesRetrieved to set
    • getNumberOfTimesAccessed

      public int getNumberOfTimesAccessed()
      number of times this has been accessed total
      Returns:
      the numberOfTimesRetrieved
    • setNumberOfTimesAccessed

      public void setNumberOfTimesAccessed(int numberOfTimesAccessed1)
      number of times this has been accessed total
      Parameters:
      numberOfTimesAccessed1 - the numberOfTimesAccessed to set
    • expired

      public boolean expired()
      if this is expired
      Returns:
      true if expired
    • timeToLiveNotFoundSeconds

      public static int timeToLiveNotFoundSeconds()
      Returns:
      time to live of not found
    • timeToLiveSeconds

      public static int timeToLiveSeconds()
      Returns:
      time to live seconds
    • timeToLiveSecondsPercentageToResolveSubjectsIfNecessary

      public static int timeToLiveSecondsPercentageToResolveSubjectsIfNecessary()
      Resolve subjects again if necessary, after this percent of time to live
      Returns:
      time to live seconds
    • timeToLiveNotFoundPercentageToResolveSubjectsIfNecessary

      public static int timeToLiveNotFoundPercentageToResolveSubjectsIfNecessary()
      Resolve subjects again if necessary, after this percent of time to live for not found subjects. note if the time to live for not found subjects is low, this has to be low too so there is time to resolve...
      Returns:
      time to live seconds
    • minUseInCycleToAutoRefresh

      public static int minUseInCycleToAutoRefresh()
      if the subject has been used at least this many times in the last cycle then auto refresh the subject or else just remove the subject set to 0 to refresh all
      Returns:
      the min use
    • needsToBeResolved

      public boolean needsToBeResolved()
      Returns:
      subject needs to be resolved
    • needsToBeResolvedHelper

      public boolean needsToBeResolvedHelper(int timeToLiveSeconds, int timeToLiveSecondsPercentageToResolveSubjectsIfNecessary, int timeToLiveNotFoundSeconds, int timeToLiveNotFoundPercentageToResolveSubjectsIfNecessary, int minUseInCycleToAutoRefresh)
      if this is needs to be resolved
      Parameters:
      timeToLiveSeconds -
      timeToLiveSecondsPercentageToResolveSubjectsIfNecessary -
      timeToLiveNotFoundSeconds -
      timeToLiveNotFoundPercentageToResolveSubjectsIfNecessary -
      minUseInCycleToAutoRefresh -
      Returns:
      true if expired
    • expiredHelper

      public boolean expiredHelper(int timeToLiveSeconds, int timeToLiveNotFoundSeconds)
      if this is expired
      Parameters:
      timeToLiveSeconds -
      timeToLiveNotFoundSeconds -
      Returns:
      true if expired
    • getSubject

      public Subject getSubject()
      the subject
      Returns:
      the subject
    • setSubject

      public void setSubject(Subject subject1)
      the subject
      Parameters:
      subject1 - the subject to set
    • getLastRetrieved

      public long getLastRetrieved()
      millis since 1970 last retrieved from system of record
      Returns:
      the lastRetrieved
    • setLastRetrieved

      public void setLastRetrieved(long lastRetrieved1)
      millis since 1970 last retrieved from system of record
      Parameters:
      lastRetrieved1 - the lastRetrieved to set
    • getLastAccessed

      public long getLastAccessed()
      millis since 1970 last accessed from cache or system of record
      Returns:
      the lastAccessed
    • setLastAccessed

      public void setLastAccessed(long lastAccessed1)
      millis since 1970 last accessed from cache or system of record
      Parameters:
      lastAccessed1 - the lastAccessed to set
    • getNumberOfTimesAccessedSinceLastRetrieved

      public int getNumberOfTimesAccessedSinceLastRetrieved()
      number of time this has been accessed since last retrieved
      Returns:
      the numberOfTimesAccessedSinceLastRetrieved
    • setNumberOfTimesAccessedSinceLastRetrieved

      public void setNumberOfTimesAccessedSinceLastRetrieved(int numberOfTimesAccessedSinceLastRetrieved1)
      number of time this has been accessed since last retrieved
      Parameters:
      numberOfTimesAccessedSinceLastRetrieved1 - the numberOfTimesAccessedSinceLastRetrieved to set