Alpha Lam | 79adf59 | 2016-02-10 15:38:59 +0000 | [diff] [blame] | 1 | // Copyright 2016 The Bazel Authors. All rights reserved. |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
Alpha Lam | 79adf59 | 2016-02-10 15:38:59 +0000 | [diff] [blame] | 14 | package com.google.devtools.build.lib.remote; |
| 15 | |
ulfjack | 19befaf | 2017-07-24 11:09:40 +0200 | [diff] [blame] | 16 | import com.google.devtools.build.lib.exec.AbstractSpawnStrategy; |
Googler | eee813c | 2023-03-15 02:47:45 -0700 | [diff] [blame] | 17 | import com.google.devtools.build.lib.exec.ExecutionOptions; |
ulfjack | 3fbd7c4 | 2017-07-10 13:19:19 +0200 | [diff] [blame] | 18 | import com.google.devtools.build.lib.exec.SpawnRunner; |
tomlu | 1a19b62 | 2018-01-11 15:17:28 -0800 | [diff] [blame] | 19 | import com.google.devtools.build.lib.vfs.Path; |
Alpha Lam | 79adf59 | 2016-02-10 15:38:59 +0000 | [diff] [blame] | 20 | |
| 21 | /** |
Ola Rozenfeld | 72d117d | 2016-09-19 15:02:32 +0000 | [diff] [blame] | 22 | * Strategy that uses a distributed cache for sharing action input and output files. Optionally this |
| 23 | * strategy also support offloading the work to a remote worker. |
Alpha Lam | 79adf59 | 2016-02-10 15:38:59 +0000 | [diff] [blame] | 24 | */ |
ulfjack | 19befaf | 2017-07-24 11:09:40 +0200 | [diff] [blame] | 25 | final class RemoteSpawnStrategy extends AbstractSpawnStrategy { |
Googler | eee813c | 2023-03-15 02:47:45 -0700 | [diff] [blame] | 26 | RemoteSpawnStrategy(Path execRoot, SpawnRunner spawnRunner, ExecutionOptions executionOptions) { |
| 27 | super(execRoot, spawnRunner, executionOptions); |
Ola Rozenfeld | 72d117d | 2016-09-19 15:02:32 +0000 | [diff] [blame] | 28 | } |
| 29 | |
Ola Rozenfeld | c3d5c68 | 2016-11-24 15:34:30 +0000 | [diff] [blame] | 30 | @Override |
| 31 | public String toString() { |
| 32 | return "remote"; |
| 33 | } |
Alpha Lam | 79adf59 | 2016-02-10 15:38:59 +0000 | [diff] [blame] | 34 | } |