com.eclipsesource.v8.V8.checkThread()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(94)

本文整理了Java中com.eclipsesource.v8.V8.checkThread()方法的一些代码示例,展示了V8.checkThread()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。V8.checkThread()方法的具体详情如下:
包路径:com.eclipsesource.v8.V8
类名称:V8
方法名:checkThread

V8.checkThread介绍

暂无

代码示例

代码示例来源:origin: eclipsesource/J2V8

/**
 * Creates a new V8Array and associates it with the given runtime.
 * V8Arrays have native resources and as such, must be released.
 *
 * @param v8 The runtime on which to associate the V8Array.
 */
public V8Array(final V8 v8) {
  super(v8);
  v8.checkThread();
}

代码示例来源:origin: eclipsesource/J2V8

public final V8ArrayBuffer position(final int newPosition) {
  v8.checkThread();
  checkReleased();
  byteBuffer.position(newPosition);
  return this;
}

代码示例来源:origin: eclipsesource/J2V8

public final V8ArrayBuffer limit(final int newLimit) {
  v8.checkThread();
  checkReleased();
  byteBuffer.limit(newLimit);
  return this;
}

代码示例来源:origin: eclipsesource/J2V8

public final V8ArrayBuffer mark() {
  v8.checkThread();
  checkReleased();
  byteBuffer.mark();
  return this;
}

代码示例来源:origin: eclipsesource/J2V8

public final V8ArrayBuffer flip() {
  v8.checkThread();
  checkReleased();
  byteBuffer.flip();
  return this;
}

代码示例来源:origin: eclipsesource/J2V8

public final int remaining() {
  v8.checkThread();
  checkReleased();
  return byteBuffer.remaining();
}

代码示例来源:origin: eclipsesource/J2V8

public V8ArrayBuffer put(final byte[] src, final int offset, final int length) {
  v8.checkThread();
  checkReleased();
  byteBuffer.put(src, offset, length);
  return this;
}

代码示例来源:origin: eclipsesource/J2V8

public char getChar() {
  v8.checkThread();
  checkReleased();
  return byteBuffer.getChar();
}

代码示例来源:origin: eclipsesource/J2V8

public int getInt() {
  v8.checkThread();
  checkReleased();
  return byteBuffer.getInt();
}

代码示例来源:origin: eclipsesource/J2V8

public V8ArrayBuffer putInt(final int value) {
  v8.checkThread();
  checkReleased();
  byteBuffer.putInt(value);
  return this;
}

代码示例来源:origin: eclipsesource/J2V8

public int getInt(final int index) {
  v8.checkThread();
  checkReleased();
  return byteBuffer.getInt(index);
}

代码示例来源:origin: eclipsesource/J2V8

public long getLong(final int index) {
  v8.checkThread();
  checkReleased();
  return byteBuffer.getLong(index);
}

代码示例来源:origin: eclipsesource/J2V8

public V8ArrayBuffer putDouble(final double value) {
  v8.checkThread();
  checkReleased();
  byteBuffer.putDouble(value);
  return this;
}

代码示例来源:origin: eclipsesource/J2V8

/**
 * Handles the next message in the message loop. Returns True
 * if there are more messages to handle, false otherwise.
 *
 * @return True if there are more messages to handle, false otherwise.
 */
public boolean handleMessage() {
  v8.checkThread();
  return v8.pumpMessageLoop();
}

代码示例来源:origin: eclipsesource/J2V8

public int doubleLimit() {
  v8.checkThread();
  checkReleased();
  return byteBuffer.asDoubleBuffer().limit();
}

代码示例来源:origin: eclipsesource/J2V8

public boolean isReadOnly() {
  v8.checkThread();
  checkReleased();
  return byteBuffer.isReadOnly();
}

代码示例来源:origin: eclipsesource/J2V8

@Override
public void close() {
  v8.checkThread();
  if (!released) {
    try {
      v8.releaseObjRef(this);
    } finally {
      released = true;
      v8.release(v8.getV8RuntimePtr(), objectHandle);
    }
  }
}

代码示例来源:origin: eclipsesource/J2V8

/**
 * Returns the type of element at this given index.
 *
 * @param index The index at which to lookup the type of.
 *
 * @return The type of the element at the index.
 */
public int getType(final int index) {
  v8.checkThread();
  checkReleased();
  return v8.getType(v8.getV8RuntimePtr(), getHandle(), index);
}

代码示例来源:origin: eclipsesource/J2V8

/**
 * Gets the type of the array. Returns a 'type' if all the elements in the array
 * have the same type, otherwise UNDEFINED is returned.
 *
 * @return The type of all the elements of the array, or UNDEFINED if they
 * are not all the same type.
 */
public int getType() {
  v8.checkThread();
  checkReleased();
  return v8.getArrayType(v8.getV8RuntimePtr(), getHandle());
}

代码示例来源:origin: eclipsesource/J2V8

/**
 * Releases the NodeJS runtime.
 */
public void release() {
  v8.checkThread();
  if (!require.isReleased()) {
    require.close();
  }
  if (!v8.isReleased()) {
    v8.close();
  }
}

相关文章

V8类方法