|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jvnet.solaris.libzfs.ZFSObject
public abstract class ZFSObject
Represents ZFS snapshot, file system, volume, or pool.
| Method Summary | ||
|---|---|---|
void |
allow(ACLBuilder acl)
Grants the specified set of permissions to this dataset. |
|
List<ZFSObject> |
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.) |
|
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. |
|
|
descendants(Class<T> type)
|
|
void |
destory()
Wipes out the dataset and all its data. |
|
void |
destory(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. |
|
void |
unallow(ACLBuilder acl)
Revokes the specified set of permissions to this dataset. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
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()
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 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()
If this dataset contains nested datasets, this method fails with
ErrorCode.EZFS_EXISTS.
public void destory(boolean recursive)
public void dispose()
public final boolean equals(Object o)
equals in class Objectpublic List<ZFSObject> filesystems()
protected void finalize()
throws Throwable
finalize in class ObjectThrowablepublic List<ZFSObject> getChildren()
public String getName()
public ZFSType getType()
ZFSObject.
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 String getUserProperty(String key)
public final int hashCode()
hashCode in class Objectpublic 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 void setProperty(String key,
String value)
public Set<ZFSSnapshot> snapshots()
public void allow(ACLBuilder acl)
public void unallow(ACLBuilder acl)
public String toString()
the name.
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||