Class QueryCache

java.lang.Object
com.sk89q.worldguard.protection.regions.QueryCache

public class QueryCache extends Object
Keeps a cache of RegionResultSets. The contents of the cache must be externally invalidated occasionally (and frequently).

This class is fully concurrent.

  • Constructor Details

    • QueryCache

      public QueryCache()
  • Method Details

    • queryContains

      public ApplicableRegionSet queryContains(RegionManager manager, com.sk89q.worldedit.util.Location location, RegionQuery.QueryOption option)
      Get from the cache a ApplicableRegionSet if an entry exists; otherwise, query the given manager for a result and cache it.
      Parameters:
      manager - the region manager
      location - the location
      option - the option
      Returns:
      a result
    • invalidateAll

      public void invalidateAll()
      Invalidate the cache and clear its contents.