|
| 1 | +/* |
| 2 | + * DISCLAIMER |
| 3 | + * |
| 4 | + * Copyright 2019 ArangoDB GmbH, Cologne, Germany |
| 5 | + * |
| 6 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | + * you may not use this file except in compliance with the License. |
| 8 | + * You may obtain a copy of the License at |
| 9 | + * |
| 10 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | + * |
| 12 | + * Unless required by applicable law or agreed to in writing, software |
| 13 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | + * See the License for the specific language governing permissions and |
| 16 | + * limitations under the License. |
| 17 | + * |
| 18 | + * Copyright holder is ArangoDB GmbH, Cologne, Germany |
| 19 | + */ |
| 20 | + |
| 21 | +package com.arangodb.model; |
| 22 | + |
| 23 | +import com.arangodb.entity.IndexType; |
| 24 | + |
| 25 | +/** |
| 26 | + * @author Heiko Kernbach |
| 27 | + * |
| 28 | + * This class is used for all index similarities |
| 29 | + */ |
| 30 | +public class IndexOptions { |
| 31 | + |
| 32 | + private Boolean inBackground; |
| 33 | + private String name; |
| 34 | + |
| 35 | + public IndexOptions() { |
| 36 | + super(); |
| 37 | + } |
| 38 | + |
| 39 | + /** |
| 40 | + * @param inBackground |
| 41 | + * create the the index in the background |
| 42 | + * this is a RocksDB only flag. |
| 43 | + * @return options |
| 44 | + */ |
| 45 | + public IndexOptions inBackground(final Boolean inBackground) { |
| 46 | + this.inBackground = inBackground; |
| 47 | + return this; |
| 48 | + } |
| 49 | + |
| 50 | + public Boolean getInBackground() { |
| 51 | + return inBackground; |
| 52 | + } |
| 53 | + |
| 54 | + /** |
| 55 | + * @param name |
| 56 | + * the name of the index |
| 57 | + * @return options |
| 58 | + */ |
| 59 | + public IndexOptions name(final String name) { |
| 60 | + this.name = name; |
| 61 | + return this; |
| 62 | + } |
| 63 | + |
| 64 | + protected String getName() { |
| 65 | + return name; |
| 66 | + } |
| 67 | +} |
0 commit comments