1 /* 2 * Copyright (C) 2016 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 package com.android.tradefed.host; 18 19 import com.android.tradefed.config.Option; 20 import com.android.tradefed.config.OptionClass; 21 22 /** 23 * Host options holder class. 24 * This class is used to store host-wide options. 25 */ 26 @OptionClass(alias = "host_options", global_namespace = false) 27 public class HostOptions implements IHostOptions { 28 29 @Option(name = "concurrent-flasher-limit", description = 30 "The maximum number of concurrent flashers (may be useful to avoid memory constraints)") 31 private Integer mConcurrentFlasherLimit = null; 32 33 @Option( 34 name = "concurrent-download-limit", 35 description = 36 "The maximum number of concurrent downloads (may be useful to avoid network " 37 + "constraints)" 38 ) 39 private Integer mConcurrentDownloadLimit = null; 40 41 /** 42 * {@inheritDoc} 43 */ 44 @Override 45 public Integer getConcurrentFlasherLimit() { 46 return mConcurrentFlasherLimit; 47 } 48 49 /** {@inheritDoc} */ 50 @Override 51 public Integer getConcurrentDownloadLimit() { 52 return mConcurrentDownloadLimit; 53 } 54 } 55