See: Description
| Interface | Description |
|---|---|
| IJavetEngine<R extends V8Runtime> |
The interface Javet engine.
|
| IJavetEnginePool<R extends V8Runtime> |
The interface Javet engine pool.
|
| Class | Description |
|---|---|
| JavetEngine<R extends V8Runtime> |
The type Javet engine.
|
| JavetEngineConfig |
The type Javet engine config.
|
| JavetEnginePool<R extends V8Runtime> |
The type Javet engine pool.
|
| JavetEngineUsage |
Tracks usage statistics for a Javet engine instance.
|
Creating V8 runtimes is expensive. Use the engine pool to amortize that cost:
JavetEnginePool - Thread-safe pool of reusable runtimes with automatic lifecycle management.JavetEngineConfig - Pool configuration: pool size, runtime type, timeout, auto-reset, etc.JavetEngine - A pooled runtime wrapper with usage tracking. Obtain via pool.getEngine() and use with try-with-resources.Usage:
try (JavetEnginePool<V8Runtime> pool = new JavetEnginePool<>()) {
try (IJavetEngine<V8Runtime> engine = pool.getEngine()) {
V8Runtime runtime = engine.getV8Runtime();
runtime.getExecutor("1 + 1").executeInteger();
}
}