Interface NPMRegistryUpdate
public interface NPMRegistryUpdate
An object to update the
NPMRegistry modules in an efficient way.
The motivation for this interface is the need to be able to update several
JSModules without triggering a cache update, which is a quite costly
operation.
Note that NPMRegistryUpdates are not thread safe.
Also note that the update is not performed atomically, it just groups
operations so that just one cache update is triggered for all of them, but
even if finish() is not called, the updates take
place and will eventually be seen in the NPMRegistry as soon as it
triggers a cache refresh.-
Method Summary
Modifier and TypeMethodDescriptionvoidfinish()Call this method when all modules have been updated so that theNPMRegistrycan refresh its caches.registerJSModule(JSPackage jsPackage, String moduleName, Collection<String> dependencies, String js, String map) voidunregisterJSModule(JSModule jsModule) voidupdateJSModule(JSModule jsModule, Collection<String> dependencies, String js, String map)
-
Method Details
-
finish
void finish()Call this method when all modules have been updated so that theNPMRegistrycan refresh its caches. -
registerJSModule
-
unregisterJSModule
-
updateJSModule
-