- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.jvnet.solaris.libzfs.ZFSPool
类的一些代码示例,展示了ZFSPool
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZFSPool
类的具体详情如下:
包路径:org.jvnet.solaris.libzfs.ZFSPool
类名称:ZFSPool
[英]zpool, which is a storage abstraction.
[中]zpool是一种存储抽象。
代码示例来源:origin: org.kohsuke/libzfs
public int callback(zpool_handle_t handle, Pointer arg) {
r.add(new ZFSPool(LibZFS.this, handle));
return 0;
}
}, null);
代码示例来源:origin: org.jvnet.libzfs/libzfs
@Override
protected void finalize() throws Throwable {
dispose();
super.finalize();
}
}
代码示例来源:origin: org.kohsuke/libzfs
/**
* Gets the size of this pool that's already used in bytes.
*
* <p>
* Because of the way libzfs report the size information
* (as strings like 1.2G), the precision of this information is low.
*/
public long getUsedSize() {
return Math.max(0, getSize()-getAvailableSize());
}
代码示例来源:origin: org.kohsuke/libzfs
/**
* Gets the total size of this pool in bytes.
*
* <p>
* Because of the way libzfs report the size information
* (as strings like 1.2G), the precision of this information is low.
*/
public long getSize() {
return toSize(getProperty(zpool_prop_t.ZPOOL_PROP_SIZE));
}
代码示例来源:origin: org.jvnet.libzfs/libzfs
/**
* Does "zpool export".
*/
public void export(boolean force, boolean hardForce) {
disableDatasets(force);
if(hardForce)
check(LIBZFS.zpool_export_force(handle));
else
check(LIBZFS.zpool_export(handle,force));
}
代码示例来源:origin: org.kohsuke/libzfs
/**
* Disables datasets within a pool by unmounting/unsharing them all.
*
* @param force
* Not exactly sure what this does.
*/
public void disableDatasets(boolean force) {
check(LIBZFS.zpool_disable_datasets(handle,force));
}
代码示例来源:origin: org.jvnet.libzfs/libzfs
/**
* Gets the size of this pool that's already used in bytes.
*
* <p>
* Because of the way libzfs report the size information
* (as strings like 1.2G), the precision of this information is low.
*/
public long getUsedSize() {
return toSize(getProperty(zpool_prop_t.ZPOOL_PROP_USED));
}
代码示例来源:origin: org.kohsuke/libzfs
/**
* Does "zpool export".
*/
public void export(boolean force, boolean hardForce) {
disableDatasets(force);
if(hardForce)
check(LIBZFS.zpool_export_force(handle));
else
check(LIBZFS.zpool_export(handle,force));
}
代码示例来源:origin: org.jvnet.libzfs/libzfs
/**
* Disables datasets within a pool by unmounting/unsharing them all.
*
* @param force
* Not exactly sure what this does.
*/
public void disableDatasets(boolean force) {
check(LIBZFS.zpool_disable_datasets(handle,force));
}
代码示例来源:origin: org.jvnet.libzfs/libzfs
/**
* Gets the total size of this pool in bytes.
*
* <p>
* Because of the way libzfs report the size information
* (as strings like 1.2G), the precision of this information is low.
*/
public long getSize() {
return toSize(getProperty(zpool_prop_t.ZPOOL_PROP_SIZE));
}
代码示例来源:origin: org.jenkins-ci.plugins/ec2
@Override
protected void doRun() {
ZFSFileSystem fs=null;
try {
if(isInsideEC2())
fs = new LibZFS().getFileSystemByMountPoint(Hudson.getInstance().getRootDir());
} catch (LinkageError e) {
// probably not running on OpenSolaris
}
if(fs==null) {
cancel();
return;
}
ZFSPool pool = fs.getPool();
long a = pool.getAvailableSize();
long t = pool.getSize();
// if the disk is 90% filled up and the available space is less than 1GB,
// notify the user
ZPoolExpandNotice zen = AdministrativeMonitor.all().get(ZPoolExpandNotice.class);
zen.activated = t/a>10 && a<1000L*1000*1000;
}
代码示例来源:origin: org.jvnet.libzfs/libzfs
public int callback(zpool_handle_t handle, Pointer arg) {
r.add(new ZFSPool(LibZFS.this, handle));
return 0;
}
}, null);
代码示例来源:origin: org.kohsuke/libzfs
@Override
protected void finalize() throws Throwable {
dispose();
super.finalize();
}
}
代码示例来源:origin: org.jvnet.libzfs/libzfs
/**
* Gets the remaining free space size of this pool in bytes.
*
* <p>
* Because of the way libzfs report the size information
* (as strings like 1.2G), the precision of this information is low.
*/
public long getAvailableSize() {
return toSize(getProperty(zpool_prop_t.ZPOOL_PROP_AVAILABLE));
}
代码示例来源:origin: jenkinsci/ec2-plugin
@Override
protected void doRun() {
ZPoolExpandNotice zen = AdministrativeMonitor.all().get(ZPoolExpandNotice.class);
Jenkins jenkinsInstance = Jenkins.getInstance();
ZFSFileSystem fs = null;
try {
if (isInsideEC2() && jenkinsInstance != null)
fs = new LibZFS().getFileSystemByMountPoint(jenkinsInstance.getRootDir());
} catch (LinkageError e) {
// probably not running on OpenSolaris
}
if (fs == null || zen == null) {
cancel();
return;
}
ZFSPool pool = fs.getPool();
long a = pool.getAvailableSize();
long t = pool.getSize();
// if the disk is 90% filled up and the available space is less than
// 1GB,
// notify the user
zen.activated = t / a > 10 && a < 1000L * 1000 * 1000;
}
代码示例来源:origin: org.kohsuke/libzfs
/**
* Gets the pool of the given name.
*/
public ZFSPool getPool(String name) {
zpool_handle_t h = LIBZFS.zpool_open(handle, name);
if(h==null) return null; // not found
return new ZFSPool(this,h);
}
代码示例来源:origin: org.kohsuke/libzfs
/**
* Gets the remaining free space size of this pool in bytes.
*
* <p>
* Because of the way libzfs report the size information
* (as strings like 1.2G), the precision of this information is low.
*/
public long getAvailableSize() {
return toSize(getProperty(zpool_prop_t.ZPOOL_PROP_FREE));
}
代码示例来源:origin: org.jvnet.libzfs/libzfs
/**
* Gets the pool of the given name.
*/
public ZFSPool getPool(String name) {
zpool_handle_t h = LIBZFS.zpool_open(handle, name);
if(h==null) return null; // not found
return new ZFSPool(this,h);
}
代码示例来源:origin: org.jvnet.libzfs/libzfs
/**
* Lists up all the ZFS pools.
*
* @return can be empty but never null.
*/
public List<ZFSPool> pools() {
final List<ZFSPool> r = new ArrayList<ZFSPool>();
LIBZFS.zpool_iter(handle, new zpool_iter_f() {
public int callback(zpool_handle_t handle, Pointer arg) {
r.add(new ZFSPool(LibZFS.this, handle));
return 0;
}
}, null);
return r;
}
代码示例来源:origin: org.kohsuke/libzfs
/**
* Lists up all the ZFS pools.
*
* @return can be empty but never null.
*/
public List<ZFSPool> pools() {
final List<ZFSPool> r = new ArrayList<ZFSPool>();
LIBZFS.zpool_iter(handle, new zpool_iter_f() {
public int callback(zpool_handle_t handle, Pointer arg) {
r.add(new ZFSPool(LibZFS.this, handle));
return 0;
}
}, null);
return r;
}
Solaris 中的“\t”或“\r\t”是制表符吗?换行字符序列\n 或\r\n ? 谢谢 最佳答案 \t = 制表符 \r = 回车 \n =换行 Solaris 标准行分隔符是\n 关于sola
我需要找出 Solaris 盒子的硬盘驱动器名称,但我不清楚设备名称是什么。在 Linux 上,它类似于 /dev/hda 或 /dev/sda,但在 Solaris 上,我对分区和设备的名称有点迷失
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 关闭 11 年前。 Improve thi
我使用 mmap(只是尝试了解 mmap 的工作原理)来分配 96k 匿名内存,但看起来它将 96k 分成了 64k 和 32k。但是当分配960k时,它只分配一个大小为960k的chunk。什么时候
可用于 OpenSolaris 的源代码对于了解 Solaris 的内部结构(以及 dtrace 和 mdb)非常有用。然而,据我所知,没有办法准确地找出 OpenSolaris 源代码与作为 Sol
我在configure.ac中声明了一个变量: MY_VERSION="0:0:0" AC_SUBST(MY_VERSION) AC_MSG_NOTICE([$MY_VERSION]) 变量的值在./
我试过使用 /string1\|string2 没用。 尝试过 /字符串1|字符串2 没用。 有什么帮助吗? 最佳答案 您必须将“交替”放在\(...\) 的“分组”中。这应该有效: /\(strin
Solaris 中的某些命令(如 iostat)使用磁盘名称(如 sd0 或 sdd2)报告磁盘相关信息。是否有一致的方法将这些名称映射回标准/dev/dsk/c?t?d?s? Solaris 中的磁
已关闭。这个问题是 off-topic 。目前不接受答案。 想要改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 已关闭11 年前。 Improve th
如何在solaris 11中生成UUID? 在 Solaris 10 中,我使用 makeuuid 命令生成。 我在 solaris 11 中找不到它,而它根据 oracle 文档存在 https:/
我正在将 Solaris 10 应用程序迁移到 RHEL。该应用程序使用某些特定于 Solaris 的函数,我在 Linux 上找不到等效函数。 void double_to_decimal(doub
在 Solaris 上,我似乎需要单引号 'a match the beginning of line' 表达式: > sh $ echo offset 0.000000 2>&1 | grep
我正在尝试运行一个旧的 Solaris SPARC 应用程序。 我从this question中学到了x86 Solaris 不会削减它。我最近了解到 VM virtualbox 不能模拟 SPARC
我正在将我们的应用程序从solaris sparc 移植到solaris x86,并且我遇到了这两种体系结构之间的结构大小差异。例如;我有一个类似的结构 typedef struct mystruct
在 linx CShell 上工作时,您可以选择按向上/向下箭头来选择最后键入的命令或命令缓冲区。这甚至适用于 Windows。 但是,在我最近切换到的 Solaris 上工作时,这不起作用。我猜 s
在 Solaris 上,我似乎需要单引号 'a match the beginning of line' 表达式: > sh $ echo offset 0.000000 2>&1 | grep
我正在尝试运行一个旧的 Solaris SPARC 应用程序。 我从this question中学到了x86 Solaris 不会削减它。我最近了解到 VM virtualbox 不能模拟 SPARC
Qt 页面没有列出用于 Solaris 的预编译 Qt 5 包。四处搜索,它似乎也没有包含在流行的软件包存储库 OpenCSW 中。一些谷歌搜索表明在 Solaris 下构建 Qt 5 涉及在 Sol
全部, 我们正在 WebLogic 服务器 9.2 MP2 上运行 J2EE 应用程序,并在 Solaris 10 上使用 jrockit 64 位 JVM (27.3.1)。 我们调用userunt
我正在尝试从 http://ftp.gnu.org/gnu/binutils 构建 binutils 2.21.1a在 Solaris sun4u sparc SunOS 5.10 上。我正在使用 g
我是一名优秀的程序员,十分优秀!