本文整理了Java中jnr.posix.POSIX.getrlimit()
方法的一些代码示例,展示了POSIX.getrlimit()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。POSIX.getrlimit()
方法的具体详情如下:
包路径:jnr.posix.POSIX
类名称:POSIX
方法名:getrlimit
暂无
代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver
public RLimit getrlimit(int resource) {
return posix().getrlimit(resource);
}
代码示例来源:origin: com.github.jnr/jnr-posix
public int getrlimit(int resource, RLimit rlim) {
return posix().getrlimit(resource, rlim);
}
代码示例来源:origin: com.github.jnr/jnr-posix
public int getrlimit(int resource, Pointer rlim) {
return posix().getrlimit(resource, rlim);
}
代码示例来源:origin: io.prestosql.cassandra/cassandra-driver
public int getrlimit(int resource, Pointer rlim) {
return posix().getrlimit(resource, rlim);
}
代码示例来源:origin: io.prestosql.cassandra/cassandra-driver
public RLimit getrlimit(int resource) {
return posix().getrlimit(resource);
}
代码示例来源:origin: com.github.jnr/jnr-posix
public int getrlimit(int resource, RLimit rlim) {
try { return posix.getrlimit(resource, rlim); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); }
}
代码示例来源:origin: com.github.jnr/jnr-posix
public int getrlimit(int resource, Pointer rlim) {
try { return posix.getrlimit(resource, rlim); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); }
}
代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver
public int getrlimit(int resource, RLimit rlim) {
return posix().getrlimit(resource, rlim);
}
代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver
public int getrlimit(int resource, Pointer rlim) {
return posix().getrlimit(resource, rlim);
}
代码示例来源:origin: io.prestosql.cassandra/cassandra-driver
public int getrlimit(int resource, RLimit rlim) {
try { return posix.getrlimit(resource, rlim); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); }
}
代码示例来源:origin: com.github.jnr/jnr-posix
public RLimit getrlimit(int resource) {
return posix().getrlimit(resource);
}
代码示例来源:origin: com.github.jnr/jnr-posix
public RLimit getrlimit(int resource) {
try { return posix.getrlimit(resource); } catch (UnsatisfiedLinkError ule) { return unimplementedNull(); }
}
代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver
public int getrlimit(int resource, Pointer rlim) {
try { return posix.getrlimit(resource, rlim); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); }
}
代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver
public RLimit getrlimit(int resource) {
try { return posix.getrlimit(resource); } catch (UnsatisfiedLinkError ule) { return unimplementedNull(); }
}
代码示例来源:origin: io.prestosql.cassandra/cassandra-driver
public int getrlimit(int resource, Pointer rlim) {
try { return posix.getrlimit(resource, rlim); } catch (UnsatisfiedLinkError ule) { return unimplementedInt(); }
}
代码示例来源:origin: io.prestosql.cassandra/cassandra-driver
public RLimit getrlimit(int resource) {
try { return posix.getrlimit(resource); } catch (UnsatisfiedLinkError ule) { return unimplementedNull(); }
}
代码示例来源:origin: org.jruby/jruby-complete
@JRubyMethod(name = "setrlimit", module = true, visibility = PRIVATE)
public static IRubyObject setrlimit(ThreadContext context, IRubyObject recv, IRubyObject resource, IRubyObject rlimCur, IRubyObject rlimMax) {
Ruby runtime = context.runtime;
RLimit rlim = runtime.getPosix().getrlimit(0);
if (rlimMax == context.nil)
rlimMax = rlimCur;
rlim.init(rlimitResourceValue(runtime, rlimCur), rlimitResourceValue(runtime, rlimMax));
if (runtime.getPosix().setrlimit(rlimitResourceType(runtime, resource), rlim) < 0) {
throw runtime.newErrnoFromInt(runtime.getPosix().errno(), "setrlimit");
}
return context.nil;
}
代码示例来源:origin: org.jruby/jruby-core
@JRubyMethod(name = "setrlimit", module = true, visibility = PRIVATE)
public static IRubyObject setrlimit(ThreadContext context, IRubyObject recv, IRubyObject resource, IRubyObject rlimCur, IRubyObject rlimMax) {
Ruby runtime = context.runtime;
RLimit rlim = runtime.getPosix().getrlimit(0);
if (rlimMax == context.nil)
rlimMax = rlimCur;
rlim.init(rlimitResourceValue(runtime, rlimCur), rlimitResourceValue(runtime, rlimMax));
if (runtime.getPosix().setrlimit(rlimitResourceType(runtime, resource), rlim) < 0) {
throw runtime.newErrnoFromInt(runtime.getPosix().errno(), "setrlimit");
}
return context.nil;
}
代码示例来源:origin: org.jruby/jruby-complete
public static IRubyObject getrlimit(Ruby runtime, IRubyObject arg) {
if (!runtime.getPosix().isNative() || Platform.IS_WINDOWS) {
runtime.getWarnings().warn("Process#getrlimit not supported on this platform");
return runtime.newFixnum(Long.MAX_VALUE);
}
RLimit rlimit = runtime.getPosix().getrlimit(rlimitResourceType(runtime, arg));
return runtime.newArray(runtime.newFixnum(rlimit.rlimCur()), runtime.newFixnum(rlimit.rlimMax()));
}
代码示例来源:origin: org.jruby/jruby-core
public static IRubyObject getrlimit(Ruby runtime, IRubyObject arg) {
if (!runtime.getPosix().isNative() || Platform.IS_WINDOWS) {
runtime.getWarnings().warn("Process#getrlimit not supported on this platform");
return runtime.newFixnum(Long.MAX_VALUE);
}
RLimit rlimit = runtime.getPosix().getrlimit(rlimitResourceType(runtime, arg));
return runtime.newArray(runtime.newFixnum(rlimit.rlimCur()), runtime.newFixnum(rlimit.rlimMax()));
}
内容来源于网络,如有侵权,请联系作者删除!