public abstract class ZFSObject extends Object implements Comparable<ZFSObject>, ZFSContainer
| Modifier and Type | Method and Description |
|---|---|
List<ZFSObject> |
children()
List the children of this ZFS object (but not recursively.)
|
<T extends ZFSObject> |
children(Class<T> type)
List the specific kind of children of this ZFS object (but not recursively.)
|
ZFSFileSystem |
clone(String fullDestinationName)
Creates a clone from this snapshot.
|
int |
compareTo(ZFSObject that) |
ZFSFileSystem |
createFileSystem(String name,
Map<String,String> props)
Creates a nested file system.
|
ZFSSnapshot |
createSnapshot(String snapshotName)
Take a snapshot of this ZFS dataset.
|
ZFSSnapshot |
createSnapshot(String snapshotName,
boolean recursive)
Take a snapshot of this ZFS dataset and recursively for all child
datasets.
|
List<ZFSObject> |
descendants()
List the children of this ZFS object recursively, excluding the 'this' object itself.
|
<T extends ZFSObject> |
descendants(Class<T> type) |
void |
destory()
Deprecated.
added by typo
|
void |
destory(boolean recursive)
Deprecated.
added by typo
|
void |
destroy()
Wipes out the dataset and all its data.
|
void |
destroy(boolean recursive)
Wipes out this dataset and all its data, optionally recursively.
|
void |
dispose() |
boolean |
equals(Object o) |
List<ZFSObject> |
filesystems() |
protected void |
finalize() |
List<ZFSObject> |
getChildren() |
LibZFS |
getLibrary() |
String |
getName()
Gets the name of the dataset like "rpool/foo/bar".
|
ZFSPool |
getPool()
Gets the
ZFSPool that contains this ZFS object. |
ZFSType |
getType()
Gets the type of this
ZFSObject. |
Hashtable<String,String> |
getUserProperty(Collection<String> keys) |
String |
getUserProperty(String key) |
Map<zfs_prop_t,String> |
getZfsProperty(Collection<zfs_prop_t> props) |
String |
getZfsProperty(zfs_prop_t prop) |
int |
hashCode() |
void |
inheritProperty(String key)
Clears the given property on this dataset, causing it to be inherited from its parent.
|
boolean |
isShared()
Is this dataset shared.
|
ZFSFileSystem |
openFileSystem(String name)
Opens a nested file system.
|
ZFSObject |
rename(String fullName,
boolean recursive)
Renames this data set to another name.
|
ZFSObject |
rollback(boolean recursive) |
void |
setProperty(String key,
String value)
Sets a user-defined property.
|
Set<ZFSSnapshot> |
snapshots()
Obtain all snapshots for this dataset.
|
String |
toString()
Returns
the name. |
public LibZFS getLibrary()
public ZFSPool getPool()
ZFSPool that contains this ZFS object.public int compareTo(ZFSObject that)
compareTo in interface Comparable<ZFSObject>public List<ZFSObject> children()
ZFSContainerchildren in interface ZFSContainerpublic <T extends ZFSObject> List<T> children(Class<T> type)
ZFSContainerchildren in interface ZFSContainerpublic List<ZFSObject> descendants()
ZFSContainerdescendants in interface ZFSContainerpublic <T extends ZFSObject> List<T> descendants(Class<T> type)
descendants in interface ZFSContainerpublic ZFSFileSystem clone(String fullDestinationName)
ZFSObject is not a snapshot.public ZFSFileSystem createFileSystem(String name, Map<String,String> props)
props - ZFS properties to be attached to the new file system. Can be null.public ZFSFileSystem openFileSystem(String name)
public ZFSSnapshot createSnapshot(String snapshotName)
snapshotName - the name of the Snapshot to create, i.e. 'monday',
'before-test'.public ZFSSnapshot createSnapshot(String snapshotName, boolean recursive)
snapshotName - the name of the Snapshot to create, i.e. 'monday',
'before-test'.recursive - should snapshot recursively create snapshot for all descendant
datasets. Snapshots are taken atomically, so that all
recursive snapshots correspond to the same moment in time.public void destory()
public void destory(boolean recursive)
public void destroy()
If this dataset contains nested datasets, this method fails with
ErrorCode.EZFS_EXISTS.
public void destroy(boolean recursive)
public void dispose()
protected void finalize()
throws Throwable
public String getName()
public Map<zfs_prop_t,String> getZfsProperty(Collection<zfs_prop_t> props)
public String getZfsProperty(zfs_prop_t prop)
public Hashtable<String,String> getUserProperty(Collection<String> keys)
public void inheritProperty(String key)
public boolean isShared()
public ZFSObject rename(String fullName, boolean recursive)
ZFSObject representing the new renamed dataset.public ZFSObject rollback(boolean recursive)
public Set<ZFSSnapshot> snapshots()
Copyright © 2008–2017. All rights reserved.