java.lang.Comparable<byte[]>@Private
public class Snapshot
extends java.lang.Object
implements java.lang.Comparable<byte[]>
| Modifier and Type | Class | Description |
|---|---|---|
static class |
Snapshot.Root |
The root directory of the snapshot.
|
| Modifier and Type | Field | Description |
|---|---|---|
static int |
CURRENT_STATE_ID |
This id is used to indicate the current state (vs.
|
static java.util.Comparator<Snapshot> |
ID_COMPARATOR |
Compare snapshot with IDs, where null indicates the current status thus
is greater than any non-null snapshot.
|
static java.util.Comparator<java.lang.Integer> |
ID_INTEGER_COMPARATOR |
Compare snapshot with IDs, where null indicates the current status thus
is greater than any non-null ID.
|
static int |
NO_SNAPSHOT_ID |
| Modifier and Type | Method | Description |
|---|---|---|
int |
compareTo(byte[] bytes) |
|
boolean |
equals(java.lang.Object that) |
|
static int |
findLatestSnapshot(INode inode,
int anchor) |
Find the latest snapshot that 1) covers the given inode (which means the
snapshot was either taken on the inode or taken on an ancestor of the
inode), and 2) was taken before the given snapshot (if the given snapshot
is not null).
|
static java.lang.String |
generateDefaultSnapshotName() |
|
static java.lang.String |
generateDeletedSnapshotName(Snapshot s) |
|
int |
getId() |
|
Snapshot.Root |
getRoot() |
|
static int |
getSnapshotId(Snapshot s) |
|
static java.lang.String |
getSnapshotPath(java.lang.String snapshottableDir,
java.lang.String snapshotRelativePath) |
|
static java.lang.String |
getSnapshotString(int snapshot) |
|
int |
hashCode() |
|
java.lang.String |
toString() |
public static final int CURRENT_STATE_ID
public static final int NO_SNAPSHOT_ID
public static final java.util.Comparator<Snapshot> ID_COMPARATOR
public static final java.util.Comparator<java.lang.Integer> ID_INTEGER_COMPARATOR
public static java.lang.String generateDefaultSnapshotName()
public static java.lang.String generateDeletedSnapshotName(Snapshot s)
public static java.lang.String getSnapshotPath(java.lang.String snapshottableDir,
java.lang.String snapshotRelativePath)
public static int getSnapshotId(Snapshot s)
public static java.lang.String getSnapshotString(int snapshot)
public static int findLatestSnapshot(INode inode, int anchor)
inode - the given inode that the returned snapshot needs to coveranchor - the returned snapshot should be taken before this given id.public int getId()
public Snapshot.Root getRoot()
public int compareTo(byte[] bytes)
compareTo in interface java.lang.Comparable<byte[]>public boolean equals(java.lang.Object that)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2008–2025 Apache Software Foundation. All rights reserved.