Package ai.djl.serving.wlm.util
Class EventManager
java.lang.Object
ai.djl.serving.wlm.util.EventManager
A class manages model server events.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(ModelServerListener listener) Adds the listener to theEventManager.static EventManagerReturns a singletonEventManagerinstance.voidonAdapterLoaded(ModelInfo<?, ?> model, Adapter adapter) Invoked when adapter loading finished.voidonAdapterLoading(ModelInfo<?, ?> model, Path adapterPath) Invoked when adapter loading start.voidonModelConfigured(ModelInfo<?, ?> model) Invoked when model properties configuration finished.voidonModelConverted(ModelInfo<?, ?> model, String type) Invoked when model conversion finished.voidonModelConverting(ModelInfo<?, ?> model, String type) Invoked when model conversion started.voidonModelDownloaded(ModelInfo<?, ?> model, Path downloadPath) Invoked when model downloading finished.voidonModelDownloading(ModelInfo<?, ?> model) Invoked when model downloading started.voidonModelLoaded(ModelInfo<?, ?> model) Invoked when model loading finished.voidonModelLoading(ModelInfo<?, ?> model, ai.djl.Device device) Invoked when model loading start.
-
Method Details
-
getInstance
Returns a singletonEventManagerinstance.- Returns:
- ths
EventManagerinstance
-
addListener
Adds the listener to theEventManager.- Parameters:
listener- theModelServerListener
-
onModelDownloading
Invoked when model downloading started.- Parameters:
model- the model
-
onModelDownloaded
Invoked when model downloading finished.- Parameters:
model- the modeldownloadPath- the model download directory
-
onModelConverting
Invoked when model conversion started.- Parameters:
model- the modeltype- the conversion type
-
onModelConverted
Invoked when model conversion finished.- Parameters:
model- the modeltype- the conversion type
-
onModelConfigured
Invoked when model properties configuration finished.- Parameters:
model- the model
-
onModelLoading
Invoked when model loading start.- Parameters:
model- the modeldevice- the device to load the model
-
onModelLoaded
Invoked when model loading finished.- Parameters:
model- the model
-
onAdapterLoading
Invoked when adapter loading start.- Parameters:
model- the modeladapterPath- the adapter path
-
onAdapterLoaded
Invoked when adapter loading finished.- Parameters:
model- the modeladapter- the adapter
-