Class QueryCache
java.lang.Object
com.sk89q.worldguard.protection.regions.QueryCache
Keeps a cache of
RegionResultSet
s. The contents of the cache
must be externally invalidated occasionally (and frequently).
This class is fully concurrent.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Invalidate the cache and clear its contents.queryContains
(RegionManager manager, com.sk89q.worldedit.util.Location location, RegionQuery.QueryOption option) Get from the cache aApplicableRegionSet
if 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, RegionQuery.QueryOption option) Get from the cache aApplicableRegionSet
if an entry exists; otherwise, query the given manager for a result and cache it.- Parameters:
manager
- the region managerlocation
- the locationoption
- the option- Returns:
- a result
-
invalidateAll
public void invalidateAll()Invalidate the cache and clear its contents.
-