public class DLedgerMmapFileStore extends DLedgerStore
| Modifier and Type | Class and Description |
|---|---|
static interface |
DLedgerMmapFileStore.AppendHook |
| Modifier and Type | Field and Description |
|---|---|
List<DLedgerMmapFileStore.AppendHook> |
appendHooks |
static String |
CHECK_POINT_FILE |
static String |
COMMITTED_INDEX_KEY |
static int |
CURRENT_MAGIC |
static String |
END_INDEX_KEY |
static int |
INDEX_UNIT_SIZE |
static int |
MAGIC_1 |
| Constructor and Description |
|---|
DLedgerMmapFileStore(DLedgerConfig dLedgerConfig,
MemberState memberState) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAppendHook(DLedgerMmapFileStore.AppendHook writeHook) |
DLedgerEntry |
appendAsFollower(DLedgerEntry entry,
long leaderTerm,
String leaderId) |
DLedgerEntry |
appendAsLeader(DLedgerEntry entry) |
void |
flush() |
DLedgerEntry |
get(Long index) |
long |
getCommittedIndex() |
long |
getCommittedPos() |
MmapFileList |
getDataFileList() |
long |
getFlushPos() |
Set<String> |
getFullStorePaths() |
MmapFileList |
getIndexFileList() |
long |
getLedgerBeginIndex() |
long |
getLedgerEndIndex() |
long |
getLedgerEndTerm() |
MemberState |
getMemberState() |
long |
getWritePos() |
void |
load() |
void |
recover() |
void |
setEnableCleanSpaceService(boolean enableCleanSpaceService) |
void |
setFullStorePaths(Set<String> fullStorePaths) |
void |
shutdown() |
void |
shutdownFlushService() |
void |
startup() |
long |
truncate(DLedgerEntry entry,
long leaderTerm,
String leaderId) |
void |
updateCommittedIndex(long term,
long newCommittedIndex) |
updateLedgerEndIndexAndTermpublic static final String CHECK_POINT_FILE
public static final String END_INDEX_KEY
public static final String COMMITTED_INDEX_KEY
public static final int MAGIC_1
public static final int CURRENT_MAGIC
public static final int INDEX_UNIT_SIZE
public List<DLedgerMmapFileStore.AppendHook> appendHooks
public DLedgerMmapFileStore(DLedgerConfig dLedgerConfig, MemberState memberState)
public void startup()
startup in class DLedgerStorepublic void shutdown()
shutdown in class DLedgerStorepublic long getWritePos()
public long getFlushPos()
public void flush()
flush in class DLedgerStorepublic void load()
public void recover()
public DLedgerEntry appendAsLeader(DLedgerEntry entry)
appendAsLeader in class DLedgerStorepublic long truncate(DLedgerEntry entry, long leaderTerm, String leaderId)
truncate in class DLedgerStorepublic DLedgerEntry appendAsFollower(DLedgerEntry entry, long leaderTerm, String leaderId)
appendAsFollower in class DLedgerStorepublic long getLedgerEndIndex()
getLedgerEndIndex in class DLedgerStorepublic long getLedgerBeginIndex()
getLedgerBeginIndex in class DLedgerStorepublic DLedgerEntry get(Long index)
get in class DLedgerStorepublic long getCommittedIndex()
getCommittedIndex in class DLedgerStorepublic void updateCommittedIndex(long term,
long newCommittedIndex)
updateCommittedIndex in class DLedgerStorepublic long getLedgerEndTerm()
getLedgerEndTerm in class DLedgerStorepublic long getCommittedPos()
public void addAppendHook(DLedgerMmapFileStore.AppendHook writeHook)
public MemberState getMemberState()
getMemberState in class DLedgerStorepublic MmapFileList getDataFileList()
public MmapFileList getIndexFileList()
public void shutdownFlushService()
public void setEnableCleanSpaceService(boolean enableCleanSpaceService)
Copyright © 2023. All rights reserved.