Guides the allowed concurrency among update operations. Used as a hint for internal sizing. The table is internally partitioned to try to permit the indicated number of concurrent updates without contention. Because assignment of entries to these partitions is not necessarily uniform, the actual con
(int concurrencyLevel)
| 183 | */ |
| 184 | |
| 185 | @CanIgnoreReturnValue |
| 186 | public MapMaker concurrencyLevel(int concurrencyLevel) { |
| 187 | checkState( |
| 188 | this.concurrencyLevel == UNSET_INT, |
| 189 | "concurrency level was already set to %s", |
| 190 | this.concurrencyLevel); |
| 191 | checkArgument(concurrencyLevel > 0); |
| 192 | this.concurrencyLevel = concurrencyLevel; |
| 193 | return this; |
| 194 | } |
| 195 | |
| 196 | int getConcurrencyLevel() { |
| 197 | return (concurrencyLevel == UNSET_INT) ? DEFAULT_CONCURRENCY_LEVEL : concurrencyLevel; |
no test coverage detected