jnr.posix.POSIX.getpid()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(193)

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

POSIX.getpid介绍

暂无

代码示例

代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core

/**
  * Returns the JVM's process identifier (PID) via a system call to {@code getpid}.
  *
  * @return the JVM's process identifier (PID).
  * @throws UnsupportedOperationException if JNR POSIX library is not loaded or {@code getpid} is
  *     not available.
  */
 public static int processId() {
  if (!isGetpidAvailable())
   throw new UnsupportedOperationException(
     "JNR POSIX library not loaded or getpid not available");
  return PosixLoader.POSIX.getpid();
 }
}

代码示例来源:origin: com.datastax.oss/java-driver-core-shaded

public static int getProcessId() {
 if (!isGetProcessIdAvailable()) {
  throw new IllegalStateException(
    "Native call not available. "
      + "Check isGetProcessIdAvailable() before calling this method.");
 }
 return PosixLoader.POSIX.getpid();
}

代码示例来源:origin: com.yugabyte/cassandra-driver-core

/**
 * Returns the JVM's process identifier (PID)
 * via a system call to {@code getpid}.
 *
 * @return the JVM's process identifier (PID).
 * @throws UnsupportedOperationException if JNR POSIX library is not loaded or {@code getpid} is not available.
 */
public static int processId() {
  if (!isGetpidAvailable())
    throw new UnsupportedOperationException("JNR POSIX library not loaded or getpid not available");
  return PosixLoader.POSIX.getpid();
}

代码示例来源:origin: jerlang/jerlang

/**
 * Returns the process identifier of the current Erlang emulator in the
 * format most commonly used by the operating system environment.
 * Value is returned as a string containing the (usually) numerical
 * identifier for a process.
 *
 * http://www.erlang.org/doc/man/os.html#getpid-0
 */
public static Str getpid_0() {
  return Str.of(String.valueOf(posix.getpid()));
}

代码示例来源:origin: io.prestosql.cassandra/cassandra-driver

/**
 * Returns the JVM's process identifier (PID)
 * via a system call to {@code getpid}.
 *
 * @return the JVM's process identifier (PID).
 * @throws UnsupportedOperationException if JNR POSIX library is not loaded or {@code getpid} is not available.
 */
public static int processId() {
  if (!isGetpidAvailable())
    throw new UnsupportedOperationException("JNR POSIX library not loaded or getpid not available");
  return PosixLoader.POSIX.getpid();
}

代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver

/**
 * Returns the JVM's process identifier (PID)
 * via a system call to {@code getpid}.
 *
 * @return the JVM's process identifier (PID).
 * @throws UnsupportedOperationException if JNR POSIX library is not loaded or {@code getpid} is not available.
 */
public static int processId() {
  if (!isGetpidAvailable())
    throw new UnsupportedOperationException("JNR POSIX library not loaded or getpid not available");
  return PosixLoader.POSIX.getpid();
}

代码示例来源:origin: proofpoint/platform

static int getpid()
{
  return getPosix().getpid();
}

代码示例来源:origin: org.python/jython

@Hide(posixImpl = PosixImpl.JAVA)
public static int getpid() {
  return posix.getpid();
}

代码示例来源:origin: com.github.jnr/jnr-posix

public int getpid() {
  try { return posix.getpid(); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); }
}

代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver

public int getpid() {
  return posix().getpid();
}

代码示例来源:origin: io.prestosql.cassandra/cassandra-driver

public int getpid() {
  try { return posix.getpid(); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); }
}

代码示例来源:origin: io.prestosql.cassandra/cassandra-driver

public int getpid() {
  return posix().getpid();
}

代码示例来源:origin: com.cloudbees.util/jnr-unixsocket-nodep

public int getpid() {
  try { return posix.getpid(); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); }
}

代码示例来源:origin: org.jruby/jruby-complete

public static IRubyObject pid(Ruby runtime) {
  return runtime.newFixnum(runtime.getPosix().getpid());
}

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

public static IRubyObject pid(Ruby runtime) {
  return runtime.newFixnum(runtime.getPosix().getpid());
}

代码示例来源:origin: org.jruby/jruby-core

public IRubyObject getValue() {
  return pid != null ? pid : (pid = runtime.newFixnum(runtime.getPosix().getpid()));
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

public IRubyObject getValue() {
  return pid != null ? pid : (pid = runtime.newFixnum(runtime.getPosix().getpid()));
}

代码示例来源:origin: org.jruby/jruby-core

public static IRubyObject pid(Ruby runtime) {
  return runtime.newFixnum(runtime.getPosix().getpid());
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

public static IRubyObject pid(Ruby runtime) {
  return runtime.newFixnum(runtime.getPosix().getpid());
}

代码示例来源:origin: org.jruby/jruby-complete

public IRubyObject getValue() {
  return pid != null ? pid : (pid = runtime.newFixnum(runtime.getPosix().getpid()));
}

相关文章

POSIX类方法