Class ResourceStore

java.lang.Object
com._1c.g5.v8.dt.internal.compare.ResourceStore
All Implemented Interfaces:
IResourceStore

public class ResourceStore extends Object implements IResourceStore
A resource store. Current implementation relies on a LRU cache.
  • Constructor Details

    • ResourceStore

      public ResourceStore()
  • Method Details

    • getResource

      public IResource getResource(ComparisonProcessHandle handle, long nodeId)
      Description copied from interface: IResourceStore
      Returns the resource for the specified comparison process handle and node identifier.
      Specified by:
      getResource in interface IResourceStore
      Parameters:
      handle - comparison process handle, not null
      nodeId - model node identifier, not null
      Returns:
      the resource or null if not available
    • putResource

      public void putResource(ComparisonProcessHandle handle, long nodeId, IResource resource)
      Description copied from interface: IResourceStore
      Puts the specified resource in the store for the specified comparison process handle and model node identifier.
      Specified by:
      putResource in interface IResourceStore
      Parameters:
      handle - comparison process handle, not null
      nodeId - model node identifier, not null
      resource - the resource to put, null to remove the resource from the store
    • clear

      public void clear(ComparisonProcessHandle handle)
      Description copied from interface: IResourceStore
      Clears all resources of the specified comparison process.
      Specified by:
      clear in interface IResourceStore
      Parameters:
      handle - the handle specifying the comparison process
    • reduceCacheUsageTemporarily

      public void reduceCacheUsageTemporarily()
      Description copied from interface: IResourceStore
      Reduces the cache usage temporarily (depends on the implementation) to reduce overall resource strain on the system during high-load operations
      Specified by:
      reduceCacheUsageTemporarily in interface IResourceStore