public class TagManager extends Object
Tag
.Constructor and Description |
---|
TagManager(FileIO fileIO,
Path tablePath) |
TagManager(FileIO fileIO,
Path tablePath,
String branch)
Specify the default branch for data writing.
|
Modifier and Type | Method and Description |
---|---|
List<String> |
allTagNames() |
TagManager |
copyWithBranch(String branchName) |
void |
createTag(Snapshot snapshot,
String tagName,
java.time.Duration timeRetained,
List<TagCallback> callbacks)
Create a tag from given snapshot and save it in the storage.
|
void |
deleteAllTagsOfOneSnapshot(List<String> tagNames,
TagDeletion tagDeletion,
SnapshotManager snapshotManager)
Make sure the tagNames are ALL tags of one snapshot.
|
void |
deleteTag(String tagName,
TagDeletion tagDeletion,
SnapshotManager snapshotManager,
List<TagCallback> callbacks) |
List<String> |
sortTagsOfOneSnapshot(List<String> tagNames) |
Tag |
tag(String tagName)
Read tag for tagName.
|
long |
tagCount() |
Path |
tagDirectory()
Return the root Directory of tags.
|
boolean |
tagExists(String tagName)
Check if a tag exists.
|
Snapshot |
taggedSnapshot(String tagName)
Get the tagged snapshot by name.
|
List<Snapshot> |
taggedSnapshots()
Get all tagged snapshots sorted by snapshot id.
|
List<Pair<Tag,String>> |
tagObjects()
Get all
Tag s. |
Path |
tagPath(String tagName)
Return the path of a tag.
|
SortedMap<Snapshot,List<String>> |
tags()
Get all tagged snapshots with names sorted by snapshot id.
|
SortedMap<Snapshot,List<String>> |
tags(java.util.function.Predicate<String> filter)
Retrieves a sorted map of snapshots filtered based on a provided predicate.
|
public TagManager copyWithBranch(String branchName)
public Path tagDirectory()
public void createTag(Snapshot snapshot, String tagName, @Nullable java.time.Duration timeRetained, List<TagCallback> callbacks)
public void deleteAllTagsOfOneSnapshot(List<String> tagNames, TagDeletion tagDeletion, SnapshotManager snapshotManager)
public void deleteTag(String tagName, TagDeletion tagDeletion, SnapshotManager snapshotManager, List<TagCallback> callbacks)
public boolean tagExists(String tagName)
public long tagCount()
public List<Snapshot> taggedSnapshots()
public SortedMap<Snapshot,List<String>> tags()
public SortedMap<Snapshot,List<String>> tags(java.util.function.Predicate<String> filter)
filter
- A Predicate that tests each tag name. Snapshots with tag names that fail the
test are excluded from the result.RuntimeException
- if an IOException occurs during retrieval of snapshots.@VisibleForTesting public List<String> allTagNames()
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.