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 TypeMethodDescriptionvoid
addListener
(ModelServerListener listener) Adds the listener to theEventManager
.static EventManager
Returns a singletonEventManager
instance.void
onAdapterLoaded
(ModelInfo<?, ?> model, Adapter adapter) Invoked when adapter loading finished.void
onAdapterLoading
(ModelInfo<?, ?> model, Path adapterPath) Invoked when adapter loading start.void
onModelConfigured
(ModelInfo<?, ?> model) Invoked when model properties configuration finished.void
onModelConverted
(ModelInfo<?, ?> model, String type) Invoked when model conversion finished.void
onModelConverting
(ModelInfo<?, ?> model, String type) Invoked when model conversion started.void
onModelDownloaded
(ModelInfo<?, ?> model, Path downloadPath) Invoked when model downloading finished.void
onModelDownloading
(ModelInfo<?, ?> model) Invoked when model downloading started.void
onModelLoaded
(ModelInfo<?, ?> model) Invoked when model loading finished.void
onModelLoading
(ModelInfo<?, ?> model, ai.djl.Device device) Invoked when model loading start.
-
Method Details
-
getInstance
Returns a singletonEventManager
instance.- Returns:
- ths
EventManager
instance
-
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
-