Class QueryCache
java.lang.Object
com.sk89q.worldguard.protection.regions.QueryCache
Keeps a cache of
RegionResultSets. The contents of the cache
must be externally invalidated occasionally (and frequently).
This class is fully concurrent.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidInvalidate the cache and clear its contents.queryContains(RegionManager manager, com.sk89q.worldedit.util.Location location)Get from the cache aApplicableRegionSetif an entry exists; otherwise, query the given manager for a result and cache it.
-
Constructor Details
-
QueryCache
public QueryCache()
-
-
Method Details
-
queryContains
public ApplicableRegionSet queryContains(RegionManager manager, com.sk89q.worldedit.util.Location location)Get from the cache aApplicableRegionSetif an entry exists; otherwise, query the given manager for a result and cache it.- Parameters:
manager- the region managerlocation- the location- Returns:
- a result
-
invalidateAll
public void invalidateAll()Invalidate the cache and clear its contents.
-