public interface NPMRegistryUpdate
NPMRegistry
modules in an efficient way.
The motivation for this interface is the need to be able to update several
JSModule
s without triggering a cache update, which is a quite costly
operation.
Note that NPMRegistryUpdate
s 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.Modifier and Type | Method and Description |
---|---|
void |
finish()
Call this method when all modules have been updated so that the
NPMRegistry can refresh its caches. |
JSModule |
registerJSModule(JSPackage jsPackage,
java.lang.String moduleName,
java.util.Collection<java.lang.String> dependencies,
java.lang.String js,
java.lang.String map) |
void |
unregisterJSModule(JSModule jsModule) |
void |
updateJSModule(JSModule jsModule,
java.util.Collection<java.lang.String> dependencies,
java.lang.String js,
java.lang.String map) |
void finish()
NPMRegistry
can refresh its caches.JSModule registerJSModule(JSPackage jsPackage, java.lang.String moduleName, java.util.Collection<java.lang.String> dependencies, java.lang.String js, java.lang.String map)
void unregisterJSModule(JSModule jsModule)
void updateJSModule(JSModule jsModule, java.util.Collection<java.lang.String> dependencies, java.lang.String js, java.lang.String map)