public class BranchManager extends Object
Branch
.Modifier and Type | Field and Description |
---|---|
static String |
BRANCH_PREFIX |
static String |
DEFAULT_MAIN_BRANCH |
Constructor and Description |
---|
BranchManager(FileIO fileIO,
Path path,
SnapshotManager snapshotManager,
TagManager tagManager,
SchemaManager schemaManager) |
Modifier and Type | Method and Description |
---|---|
Path |
branchDirectory()
Return the root Directory of branch.
|
List<String> |
branches()
Get all branches for the table.
|
boolean |
branchExists(String branchName)
Check if a branch exists.
|
static String |
branchPath(Path tablePath,
String branch)
Return the path string of a branch.
|
Path |
branchPath(String branchName)
Return the path of a branch.
|
void |
createBranch(String branchName)
Create empty branch.
|
void |
createBranch(String branchName,
String tagName) |
void |
deleteBranch(String branchName) |
void |
fastForward(String branchName) |
boolean |
fileExists(Path path)
Check if path exists.
|
static boolean |
isMainBranch(String branch) |
public static final String BRANCH_PREFIX
public static final String DEFAULT_MAIN_BRANCH
public BranchManager(FileIO fileIO, Path path, SnapshotManager snapshotManager, TagManager tagManager, SchemaManager schemaManager)
public Path branchDirectory()
public static boolean isMainBranch(String branch)
public static String branchPath(Path tablePath, String branch)
public void createBranch(String branchName)
public void deleteBranch(String branchName)
public boolean fileExists(Path path)
public void fastForward(String branchName)
public boolean branchExists(String branchName)
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.