public class LedgerFragment
extends java.lang.Object
Used for checking and recovery
| Modifier and Type | Class and Description |
|---|---|
static class |
LedgerFragment.ReplicateType
ReplicateType.
|
| Constructor and Description |
|---|
LedgerFragment(LedgerFragment lf,
java.util.Set<java.lang.Integer> subset) |
LedgerFragment(LedgerHandle lh,
long firstEntryId,
long lastKnownEntryId,
java.util.Set<java.lang.Integer> bookieIndexes) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.bookkeeper.net.BookieId |
getAddress(int bookieIndex)
Gets the failedBookie address.
|
java.util.Set<org.apache.bookkeeper.net.BookieId> |
getAddresses() |
java.util.Set<java.lang.Integer> |
getBookiesIndexes()
Gets the failedBookie index.
|
java.util.List<org.apache.bookkeeper.net.BookieId> |
getEnsemble()
Gets the ensemble of fragment.
|
long |
getFirstEntryId() |
long |
getFirstStoredEntryId()
Gets the first stored entry id of the fragment in failed bookies.
|
java.lang.Long |
getFirstStoredEntryId(int bookieIndex)
Get the first stored entry id of the fragment in the given failed bookies.
|
long |
getLastKnownEntryId() |
long |
getLastStoredEntryId()
Gets the last stored entry id of the fragment in failed bookie.
|
java.lang.Long |
getLastStoredEntryId(int bookieIndex)
Get the last stored entry id of the fragment in the given failed bookie.
|
long |
getLedgerId() |
LedgerFragment.ReplicateType |
getReplicateType() |
boolean |
isClosed()
Returns true, if and only if the ledger fragment will never be modified
by any of the clients in future, otherwise false.
|
boolean |
isStoredEntryId(long entryId,
int bookieIndex) |
void |
setReplicateType(LedgerFragment.ReplicateType replicateType) |
LedgerFragment |
subset(java.util.Set<java.lang.Integer> subset)
Return a ledger fragment contains subset of bookies.
|
java.lang.String |
toString() |
public LedgerFragment(LedgerHandle lh, long firstEntryId, long lastKnownEntryId, java.util.Set<java.lang.Integer> bookieIndexes)
public LedgerFragment(LedgerFragment lf, java.util.Set<java.lang.Integer> subset)
public LedgerFragment subset(java.util.Set<java.lang.Integer> subset)
subset - subset of bookies.public boolean isClosed()
public long getLedgerId()
public long getFirstEntryId()
public long getLastKnownEntryId()
public org.apache.bookkeeper.net.BookieId getAddress(int bookieIndex)
public java.util.Set<org.apache.bookkeeper.net.BookieId> getAddresses()
public java.util.Set<java.lang.Integer> getBookiesIndexes()
public long getFirstStoredEntryId()
public java.lang.Long getFirstStoredEntryId(int bookieIndex)
bookieIndex - the bookie index in the ensemble.public long getLastStoredEntryId()
public java.lang.Long getLastStoredEntryId(int bookieIndex)
bookieIndex - the bookie index in the ensemble.public boolean isStoredEntryId(long entryId,
int bookieIndex)
public java.util.List<org.apache.bookkeeper.net.BookieId> getEnsemble()
public LedgerFragment.ReplicateType getReplicateType()
public void setReplicateType(LedgerFragment.ReplicateType replicateType)
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2011–2024 The Apache Software Foundation. All rights reserved.