| /** |
| * Copyright 2016 Yahoo Inc. |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| option java_package = "org.apache.bookkeeper.mledger.proto"; |
| option optimize_for = SPEED; |
| |
| message ManagedLedgerInfo { |
| message LedgerInfo { |
| required int64 ledgerId = 1; |
| optional int64 entries = 2; |
| optional int64 size = 3; |
| optional int64 timestamp = 4; |
| } |
| |
| repeated LedgerInfo ledgerInfo = 1; |
| } |
| |
| message PositionInfo { |
| required int64 ledgerId = 1; |
| required int64 entryId = 2; |
| repeated MessageRange individualDeletedMessages = 3; |
| } |
| |
| message NestedPositionInfo { |
| required int64 ledgerId = 1; |
| required int64 entryId = 2; |
| } |
| |
| message MessageRange { |
| required NestedPositionInfo lowerEndpoint = 1; |
| required NestedPositionInfo upperEndpoint = 2; |
| } |
| |
| message ManagedCursorInfo { |
| // If the ledger id is -1, then the mark-delete position is |
| // the one from the (ledgerId, entryId) snapshot below |
| required int64 cursorsLedgerId = 1; |
| |
| // Last snapshot of the mark-delete position |
| optional int64 markDeleteLedgerId = 2; |
| optional int64 markDeleteEntryId = 3; |
| repeated MessageRange individualDeletedMessages = 4; |
| } |