okkeeper.statelib.4.17.1.source-code.kv.proto Maven / Gradle / Ivy
/*
* 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.
*/
syntax = "proto3";
package distributedlog.proto.statestore.kv;
option java_multiple_files = true;
option java_package = "org.apache.bookkeeper.proto.statestore.kv";
enum ValueType {
BYTES = 0;
NUMBER = 1; // this is to support increment
}
message NopRequest {
}
message PutRequest {
bytes key = 1;
bytes value = 2;
}
message PutIfAbsentRequest {
bytes key = 1;
bytes value = 2;
}
message DeleteRequest {
bytes key = 1;
}
message IncrementRequest {
bytes key = 1;
int64 amount = 2;
}
message Command {
oneof req {
NopRequest nop_req = 11;
PutRequest put_req = 12;
PutIfAbsentRequest put_if_absent_req = 13;
DeleteRequest del_req = 14;
IncrementRequest incr_req = 15;
}
}