Package com.github.ambry.store
Interface MessageStoreRecovery
-
public interface MessageStoreRecovery
The recovery component used by the store to recover the index from the log.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<MessageInfo>
recover(Read read, long startOffset, long endOffset, StoreKeyFactory factory)
Recovers the messages from the underlying store using the read interface.
-
-
-
Method Detail
-
recover
java.util.List<MessageInfo> recover(Read read, long startOffset, long endOffset, StoreKeyFactory factory) throws java.io.IOException
Recovers the messages from the underlying store using the read interface. It recovers from the startOffset till the endOffset. The expectation of this interface is that read never blocks- Parameters:
read
- The read interface that represents the underlying storestartOffset
- The start offset from where the recovery needs to beginendOffset
- The end offset where the recovery needs to complete. The recovery can end before this offset if there were malformed messagesfactory
- The store key factory used to create the store key- Returns:
- A list of messages that were successfully recovered
- Throws:
java.io.IOException
-
-