Klasse HomeProtectionCache
java.lang.Object
de.delinkedde.areashopreborn.application.HomeProtectionCache
Maintains a lock-free destination authorization snapshot for synchronous teleport events.
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungHomeProtectionCache(Database database, HomeProtectionRepository repository, int maximumRegions, int maximumAuthorizationLinks) Creates the cache. -
Methodenübersicht
-
Konstruktordetails
-
HomeProtectionCache
public HomeProtectionCache(Database database, HomeProtectionRepository repository, int maximumRegions, int maximumAuthorizationLinks) Creates the cache.- Parameter:
database- asynchronous database executorrepository- snapshot repositorymaximumRegions- maximum complete region snapshot sizemaximumAuthorizationLinks- maximum complete authorization-link count
-
-
Methodendetails
-
refresh
Rebuilds the complete cache asynchronously and swaps it atomically.- Gibt zurück:
- future containing the loaded region count
-
isReady
public boolean isReady()Reports whether at least one complete snapshot has been published.- Gibt zurück:
trueafter the first successful refresh
-
find
Finds the most specific managed region containing a destination.- Parameter:
worldKey- destination world keyx- block Xy- block Yz- block Z- Gibt zurück:
- parcel-first, smallest-volume match
-