public class JSContextGroup
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
JSContextGroup.LoopPreserver |
Constructor and Description |
---|
JSContextGroup()
Creates a new context group
|
JSContextGroup(java.io.File snapshot)
Creates a new context group for which all contexts created in it will start from
a snapshot.
|
Modifier and Type | Method and Description |
---|---|
static java.io.File |
createSnapshot(java.lang.String script,
java.io.File snapshotToWrite)
Creates a snapshot of JavaScript code that can be used by the JSContextGroup(File)
constructor to speed up startup of new contexts.
|
boolean |
equals(java.lang.Object other)
Checks if two JSContextGroups refer to the same JS context group
|
long |
groupHash() |
org.liquidplayer.javascript.JNIJSContextGroup |
groupRef()
Gets the JNI context group reference
|
JSContextGroup.LoopPreserver |
keepAlive() |
public JSContextGroup()
public JSContextGroup(java.io.File snapshot)
snapshot
- File generated from previous call to createSnapshot()public static java.io.File createSnapshot(java.lang.String script, java.io.File snapshotToWrite) throws java.io.IOException
script
- Script to create snapshot fromsnapshotToWrite
- File to write (will be overwritten if exists)java.io.IOException
- thrown if taking snapshot or writing to the file fails; check messagepublic org.liquidplayer.javascript.JNIJSContextGroup groupRef()
public long groupHash()
public JSContextGroup.LoopPreserver keepAlive()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- the other object to compare