|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jvnet.solaris.libzfs.LibZFS
public class LibZFS
Entry point to ZFS functionality in Java.
| Constructor Summary | |
|---|---|
LibZFS()
|
|
| Method Summary | ||
|---|---|---|
List<ZFSFileSystem> |
children()
List the children of this ZFS object (but not recursively.) |
|
|
children(Class<T> type)
List the specific kind of children of this ZFS object (but not recursively.) |
|
|
create(String dataSetName,
Class<T> type)
Create a ZFS Data Set of a given name and zfs type. |
|
ZFSObject |
create(String dataSetName,
ZFSType type,
Map<String,String> props)
Create a ZFS Data Set of a given name, zfs type and properties. |
|
List<ZFSObject> |
descendants()
List the children of this ZFS object recursively, excluding the 'this' object itself. |
|
|
descendants(Class<T> type)
|
|
void |
dispose()
Eagerly releases the native resource associated with this wrapper, instead of waiting for GC to take care of it. |
|
boolean |
exists(String dataSetName)
Does a zfs dataset of the given name exist? |
|
boolean |
exists(String name,
Set<ZFSType> typeMask)
Does a zfs dataset of the given name and the given types exist? |
|
boolean |
exists(String dataSetName,
ZFSType type)
Does a zfs dataset of the given name and the given type exist? |
|
protected void |
finalize()
|
|
ZFSFileSystem |
getFileSystemByMountPoint(File dir)
Gets a ZFSFileSystem mounted at the given directory. |
|
libzfs_handle_t |
getHandle()
Returns libzfs_handle_t that this object wraps. |
|
ZFSPool |
getPool(String name)
Gets the pool of the given name. |
|
ZFSObject |
open(String dataSetName)
Open a ZFS Data Set of a given name. |
|
|
open(String dataSetName,
Class<T> type)
Opens a ZFS dataset of the given name and type. |
|
ZFSObject |
open(String dataSetName,
int mask)
Open a ZFS Data Set of a given name and type. |
|
List<ZFSPool> |
pools()
Lists up all the ZFS pools. |
|
List<ZFSFileSystem> |
roots()
List up all the root file systems and return them. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LibZFS()
| Method Detail |
|---|
public List<ZFSFileSystem> roots()
In ZFS, each zpool gets a top-level zfs file system automatically. This method returns those top-level file systems.
public List<ZFSPool> pools()
public ZFSPool getPool(String name)
public boolean exists(String dataSetName)
dataSetName - the dataset name of check for.
public boolean exists(String name,
Set<ZFSType> typeMask)
name - the dataset name of check for.typeMask - the specific zfs types to check for.
public boolean exists(String dataSetName,
ZFSType type)
dataSetName - the dataset name of check for.type - the specific zfs type to check for.
public <T extends ZFSObject> T create(String dataSetName,
Class<T> type)
dataSetName - name of the dataset to create.type - the zfs type of dataset to create.
public ZFSObject create(String dataSetName,
ZFSType type,
Map<String,String> props)
dataSetName - Full name of the dataset to create, like "rpool/abc/def".type - the zfs type of dataset to create. Either ZFSType.FILESYSTEM or ZFSType.VOLUME.props - zfs dataset properties. Can be null.
public ZFSObject open(String dataSetName)
dataSetName - name of the dataset to open.
public ZFSObject open(String dataSetName,
int mask)
dataSetName - name of the dataset to open.mask - the zfs type mask of dataset to open.
public <T extends ZFSObject> T open(String dataSetName,
Class<T> type)
public ZFSFileSystem getFileSystemByMountPoint(File dir)
ZFSFileSystem mounted at the given directory.
public List<ZFSFileSystem> children()
ZFSContainer
children in interface ZFSContainerpublic <T extends ZFSObject> List<T> children(Class<T> type)
ZFSContainer
children in interface ZFSContainerpublic List<ZFSObject> descendants()
ZFSContainer
descendants in interface ZFSContainerpublic <T extends ZFSObject> List<T> descendants(Class<T> type)
descendants in interface ZFSContainerpublic libzfs_handle_t getHandle()
libzfs_handle_t that this object wraps.
If the caller wants to use methods that don't yet have a high-level
binding, the returned libzfs_handle_t can be used directly in
conjunction with libzfs.LIBZFS.
protected void finalize()
throws Throwable
finalize in class ObjectThrowablepublic void dispose()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||