// // 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.apollo.broker.store.hawtdb.model; option java_multiple_files = true; enum Type { //| option java_create_message="true"; ADD_MESSAGE = 1; ADD_QUEUE_ENTRY = 2; REMOVE_QUEUE_ENTRY = 3; ADD_QUEUE = 10; REMOVE_QUEUE = 11; ADD_MAP = 30; REMOVE_MAP = 31; PUT_MAP_ENTRY = 32; REMOVE_MAP_ENTRY = 33; ADD_SUBSCRIPTION = 50; REMOVE_SUBSCRIPTION = 51; PURGE = 90; ADD_TRACE = 100; } message Purge { required int64 messageKey=1; } message AddTrace { required bytes message = 2 [java_override_type = "AsciiBuffer"]; } /////////////////////////////////////////////////////////////// // Message related operations. /////////////////////////////////////////////////////////////// message AddMessage { required int64 messageKey=1; required bytes protocol = 2 [java_override_type = "AsciiBuffer"]; required int32 size = 3; optional bytes value = 4; optional int64 streamKey = 5; optional int64 expiration = 6; } /////////////////////////////////////////////////////////////// // Queue related operations. /////////////////////////////////////////////////////////////// message AddQueue { required int64 key=1; optional bytes binding_kind = 2 [java_override_type = "AsciiBuffer"]; optional bytes binding_data = 3; } message RemoveQueue { required int64 key=1; } message AddQueueEntry { required int64 queueKey=1; required int64 queueSeq=2; required int64 messageKey=3; optional int32 size=4; optional bytes attachment=5; optional int32 redeliveries = 6; } message RemoveQueueEntry { required int64 queueKey=1; required int64 queueSeq=2; } /////////////////////////////////////////////////////////////// // Client related operations. /////////////////////////////////////////////////////////////// message AddSubscription { required bytes name = 1 [java_override_type = "AsciiBuffer"]; optional bytes selector = 2 [java_override_type = "AsciiBuffer"]; optional bytes destination = 3 [java_override_type = "AsciiBuffer"]; optional bool durable = 4 [default = false]; optional int64 tte = 5 [default = -1]; optional bytes attachment = 6; } message RemoveSubscription { required bytes name = 1 [java_override_type = "AsciiBuffer"]; } /////////////////////////////////////////////////////////////// // Map related operations. /////////////////////////////////////////////////////////////// message AddMap { optional bytes mapName = 1 [java_override_type = "AsciiBuffer"]; } message RemoveMap { optional bytes mapName = 1 [java_override_type = "AsciiBuffer"]; } message PutMapEntry { optional bytes mapName = 1 [java_override_type = "AsciiBuffer"]; optional bytes id = 2 [java_override_type = "AsciiBuffer"]; optional bytes value = 3; } message RemoveMapEntry { optional bytes mapName = 1 [java_override_type = "AsciiBuffer"]; optional bytes id = 2 [java_override_type = "AsciiBuffer"]; } /////////////////////////////////////////////////////////////// // Records Stored used in the Indexes /////////////////////////////////////////////////////////////// message DatabaseRootRecord { optional fixed64 firstBatchLocation=1; optional fixed64 lastUpdateLocation=2; optional fixed64 lastMessageKey=3; optional fixed64 lastQueueKey=4; optional fixed32 dataFileRefIndexPage=50; optional fixed32 messageKeyIndexPage=51; optional fixed32 messageRefsIndexPage=52; optional fixed32 queueIndexPage=53; optional fixed32 subscriptionIndexPage=54; optional fixed32 mapIndexPage=55; } message QueueRootRecord { optional AddQueue info=1; optional fixed32 entryIndexPage=2; optional fixed32 trackingIndexPage=3; }