1 /*
2  * Copyright (C) 2023 The Android Open Source Project
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 #pragma once
18 
19 #include <jni.h>
20 
21 #include <optional>
22 #include <string>
23 
24 #include "fcp/client/flags.h"
25 
26 namespace fcp {
27 namespace client {
28 namespace engine {
29 namespace jni {
30 
31 class FlagsImpl : public fcp::client::Flags {
32  public:
use_tflite_training()33   bool use_tflite_training() const override { return true; }
use_http_federated_compute_protocol()34   bool use_http_federated_compute_protocol() const override { return true; }
enable_opstats()35   bool enable_opstats() const override { return false; }
36 
condition_polling_period_millis()37   int64_t condition_polling_period_millis() const override { return 1000; }
tf_execution_teardown_grace_period_millis()38   int64_t tf_execution_teardown_grace_period_millis() const override {
39     return 1000;
40   }
tf_execution_teardown_extended_period_millis()41   int64_t tf_execution_teardown_extended_period_millis() const override {
42     return 2000;
43   }
grpc_channel_deadline_seconds()44   int64_t grpc_channel_deadline_seconds() const override { return 0; }
log_tensorflow_error_messages()45   bool log_tensorflow_error_messages() const override { return true; }
enable_example_query_plan_engine()46   bool enable_example_query_plan_engine() const override { return true; }
47 };
48 
49 }  // namespace jni
50 }  // namespace engine
51 }  // namespace client
52 }  // namespace fcp
53