| OLD | NEW |
| (Empty) | |
| 1 /* |
| 2 * Copyright 2011 Google Inc. |
| 3 * |
| 4 * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 * you may not use this file except in compliance with the License. |
| 6 * You may obtain a copy of the License at |
| 7 * |
| 8 * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 * |
| 10 * Unless required by applicable law or agreed to in writing, software |
| 11 * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 * See the License for the specific language governing permissions and |
| 14 * limitations under the License. |
| 15 */ |
| 16 // |
| 17 // Specification of protocol buffers that are used to marshall the |
| 18 // in-memory state of an invalidation client. |
| 19 // |
| 20 // Note: unless otherwise specified in a comment, all fields in all messages |
| 21 // are required, even though they are listed as optional. |
| 22 |
| 23 syntax = "proto2"; |
| 24 |
| 25 package com.google.protos.ipc.invalidation; |
| 26 |
| 27 option optimize_for = LITE_RUNTIME; |
| 28 |
| 29 |
| 30 |
| 31 option java_outer_classname = "NanoJavaClient"; |
| 32 option java_package = "com.google.protos.ipc.invalidation"; |
| 33 |
| 34 |
| 35 |
| 36 import 'client.proto'; |
| 37 import 'client_protocol.proto'; |
| 38 |
| 39 // State of the batched messages in the ProtocolHandler. Corresponds to |
| 40 // ProtocolHandler.Batcher. |
| 41 message BatcherState { |
| 42 repeated ObjectIdP registration = 1; |
| 43 repeated ObjectIdP unregistration = 2; |
| 44 repeated InvalidationP acknowledgement = 3; |
| 45 repeated RegistrationSubtree registration_subtree = 4; |
| 46 optional InitializeMessage initialize_message = 5; |
| 47 optional InfoMessage info_message = 6; |
| 48 } |
| 49 |
| 50 // State of the protocol handler. Fields correspond directly to fields in |
| 51 // ProtocolHandler.java. |
| 52 message ProtocolHandlerState { |
| 53 optional int32 message_id = 1; |
| 54 optional int64 last_known_server_time_ms = 2; |
| 55 optional int64 next_message_send_time_ms = 3; |
| 56 optional BatcherState batcher_state = 4; |
| 57 } |
| 58 |
| 59 // State of the registration manager. |
| 60 message RegistrationManagerStateP { |
| 61 repeated ObjectIdP registrations = 1; |
| 62 optional RegistrationSummary last_known_server_summary = 2; |
| 63 repeated RegistrationP pending_operations = 3; |
| 64 } |
| 65 |
| 66 // State of a recurring task. Fields correspond directly to fields in |
| 67 // RecurringTask.java. |
| 68 message RecurringTaskState { |
| 69 optional int32 initial_delay_ms = 1; |
| 70 optional int32 timeout_delay_ms = 2; |
| 71 optional bool scheduled = 3; |
| 72 optional ExponentialBackoffState backoff_state = 4; |
| 73 } |
| 74 |
| 75 // State of the statistics object. Marshalling is done by marshalling the |
| 76 // SimplePairs returned by Statistics.fillWithNonZeroStatistics into |
| 77 // PropertyRecords. |
| 78 message StatisticsState { |
| 79 repeated PropertyRecord counter = 1; |
| 80 } |
| 81 |
| 82 // State of the invalidation client. Fields correspond directly to fields in |
| 83 // InvalidationClientImpl.java. |
| 84 message InvalidationClientState { |
| 85 optional RunStateP run_state = 1; |
| 86 optional bytes client_token = 2; |
| 87 optional bytes nonce = 3; |
| 88 optional bool should_send_registrations = 4; |
| 89 optional int64 last_message_send_time_ms = 5; |
| 90 optional bool is_online = 6; |
| 91 optional ProtocolHandlerState protocol_handler_state = 7; |
| 92 optional RegistrationManagerStateP registration_manager_state = 8; |
| 93 optional RecurringTaskState acquire_token_task_state = 9; |
| 94 optional RecurringTaskState reg_sync_heartbeat_task_state = 10; |
| 95 optional RecurringTaskState persistent_write_task_state = 11; |
| 96 optional RecurringTaskState heartbeat_task_state = 12; |
| 97 optional RecurringTaskState batching_task_state = 13; |
| 98 optional PersistentTiclState last_written_state = 14; |
| 99 optional StatisticsState statistics_state = 15; |
| 100 } |
| OLD | NEW |