// Licensed to the Apache Software Foundation (ASF) under one or more
// contributor license agreements.  See the NOTICE file distributed with
// this work for additional information regarding copyright ownership.
// The ASF licenses this file to You 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.
// 
package org.apache.activemq.leveldb.record;

option java_multiple_files = true;

//
// We create a collection record for each
// transaction, queue, topic.
//
message CollectionKey {
  required int64 key = 1;
}
message CollectionRecord {
  optional int64 key = 1;
  optional int32 type = 2;
  optional bytes meta = 3 [java_override_type = "Buffer"];
}

//
// We create a entry record for each message, subscription,
// and subscription position.
//
message EntryKey {
  required int64 collection_key = 1;
  required bytes entry_key = 2 [java_override_type = "Buffer"];
}
message EntryRecord {
  optional int64 collection_key = 1;
  optional bytes entry_key = 2 [java_override_type = "Buffer"];
  optional int64 value_location = 3;
  optional int32 value_length = 4;
  optional bytes value = 5 [java_override_type = "Buffer"];
  optional bytes meta = 6 [java_override_type = "Buffer"];
}

message SubscriptionRecord {
  optional int64 topic_key = 1;
  optional string client_id = 2;
  optional string subscription_name = 3;
  optional string selector = 4;
  optional string destination_name = 5;
}