@NotThreadSafe public final class Fingerprint extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Fingerprint.Tag
The possible tags within the fingerprint.
|
static class |
Fingerprint.Type
The possible types of the fingerprint.
|
Modifier and Type | Field and Description |
---|---|
static String |
UNDERSCORE |
Modifier and Type | Method and Description |
---|---|
static Fingerprint |
create(String ufsName,
UfsStatus status)
Parses the input string and returns the fingerprint object.
|
static Fingerprint |
create(String ufsName,
UfsStatus status,
AccessControlList acl)
Parses the input string and returns the fingerprint object.
|
String |
getTag(Fingerprint.Tag tag) |
boolean |
isValid()
Checks if the fingerprint object was generated from an INVALID_UFS_FINGERPRINT.
|
boolean |
matchContent(Fingerprint fp)
Returns true if the serialized fingerprint matches the fingerprint in the content part.
|
boolean |
matchMetadata(Fingerprint fp)
Returns true if the serialized fingerprint matches the fingerprint in metadata.
|
static Fingerprint |
parse(String input)
Parses the input string and returns the fingerprint object.
|
void |
putTag(Fingerprint.Tag tag,
String value)
Updates a specific tag in the fingerprint.
|
String |
serialize() |
public static final String UNDERSCORE
public static Fingerprint create(String ufsName, UfsStatus status)
ufsName
- the name of the ufs, should be UnderFileSystem.getUnderFSType()
status
- the UfsStatus
to create the fingerprint frompublic static Fingerprint create(String ufsName, UfsStatus status, AccessControlList acl)
ufsName
- the name of the ufs, should be UnderFileSystem.getUnderFSType()
status
- the UfsStatus
to create the fingerprint fromacl
- the AccessControlList
to create the fingerprint from@Nullable public static Fingerprint parse(String input)
input
- the string to parsepublic boolean isValid()
public String serialize()
public boolean matchMetadata(Fingerprint fp)
fp
- a parsed fingerprint objectpublic boolean matchContent(Fingerprint fp)
fp
- a parsed fingerprint objectpublic void putTag(Fingerprint.Tag tag, String value)
tag
- the tag to updatevalue
- the new value of the tagpublic String getTag(Fingerprint.Tag tag)
tag
- the tag to getCopyright © 2023. All Rights Reserved.