|
32 | 32 |
|
33 | 33 | /** |
34 | 34 | * An append-only hash map where keys and values are contiguous regions of bytes. |
35 | | - * |
36 | | - * This class is not thread-safe. |
37 | | - * |
| 35 | + * <p> |
38 | 36 | * This is backed by a power-of-2-sized hash table, using quadratic probing with triangular numbers, |
39 | 37 | * which is guaranteed to exhaust the space. |
40 | | - * |
| 38 | + * <p> |
41 | 39 | * Note that even though we use long for indexing, the map can support up to 2^31 keys because |
42 | 40 | * we use 32 bit MurmurHash. In either case, if the key cardinality is so high, you should probably |
43 | 41 | * be using sorting instead of hashing for better cache locality. |
| 42 | + * <p> |
| 43 | + * This class is not thread safe. |
44 | 44 | */ |
45 | 45 | public final class BytesToBytesMap { |
46 | 46 |
|
@@ -389,21 +389,21 @@ public int getValueLength() { |
389 | 389 | * Store a new key and value. This method may only be called once for a given key; if you want |
390 | 390 | * to update the value associated with a key, then you can directly manipulate the bytes stored |
391 | 391 | * at the value address. |
392 | | - * |
| 392 | + * <p> |
393 | 393 | * It is only valid to call this method immediately after calling `lookup()` using the same key. |
394 | | - * |
| 394 | + * <p> |
395 | 395 | * After calling this method, calls to `get[Key|Value]Address()` and `get[Key|Value]Length` |
396 | 396 | * will return information on the data stored by this `putNewKey` call. |
397 | | - * |
| 397 | + * <p> |
398 | 398 | * As an example usage, here's the proper way to store a new key: |
399 | | - * |
400 | | - * <code> |
| 399 | + * <p> |
| 400 | + * <pre> |
401 | 401 | * Location loc = map.lookup(keyBaseOffset, keyBaseObject, keyLengthInBytes); |
402 | 402 | * if (!loc.isDefined()) { |
403 | 403 | * loc.putNewKey(keyBaseOffset, keyBaseObject, keyLengthInBytes, ...) |
404 | 404 | * } |
405 | | - * </code> |
406 | | - * |
| 405 | + * </pre> |
| 406 | + * <p> |
407 | 407 | * Unspecified behavior if the key is not defined. |
408 | 408 | */ |
409 | 409 | public void putNewKey( |
|
0 commit comments