Loads, stores, and caches SWCs. This is the class to start with when working with SWCs. There's only two public methods for SwcCache, one for getting SWCs and one for saving SWCs- getSwcGroup() and export(). SwcCache takes care of caching and synchronization. There should be only one SwcCache. The class has two levels of caching. There is a cache of SWCs as well as a cache of directories of SWCs. When a directory is asked for, we check the timestamp and return the cached value if its the same. If its not, then we look for SWCs in the directory. If we have a cached SWC, we check the timestampe and return the cache SWC if its the same. For now, we are just synchronizing on the whole cache on each get or export. We could add more logic to do read/write synchronization on specific SwcGroups. From tests though it looks like the two layers of caching will provide enough for performance.
@author Brian Deitte
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.