gov.nasa.pds.registry.cache
Class AssociationCache

java.lang.Object
  extended by gov.nasa.pds.registry.cache.AssociationCache

public class AssociationCache
extends Object

Maintains a cache of associated SearchCoreExtrinsic objects for easy access during reference queries. This improves performance by minimizing queries to the Registry Client

Author:
jpadams

Constructor Summary
AssociationCache()
           
 
Method Summary
static void flush()
          Clear out the cache
static ExtendedExtrinsicObject get(String lidvid)
          Get the object by lidvid
static void push(ExtendedExtrinsicObject searchExt)
          Checks if extrinsic is already in cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssociationCache

public AssociationCache()
Method Detail

push

public static void push(ExtendedExtrinsicObject searchExt)
Checks if extrinsic is already in cache. If so, send the extrinsic back to the caller, remove it, and put it at the end of the queue. If it isn't in the cache, but the cache size is maxed out, pop off the oldest entry.

Parameters:
searchExt -

get

public static ExtendedExtrinsicObject get(String lidvid)
Get the object by lidvid

Parameters:
lidvid -
Returns:

flush

public static void flush()
Clear out the cache



Copyright © 2010–2015 Planetary Data System. All rights reserved.