| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| pack-priv static class | FileReftableStack.
A segment is a consecutive list of reftables of the same approximate size. |
| private static class | |
| public static interface | FileReftableStack.
Writer is a callable that writes data to a reftable under construction. |
| Modifier and Type | Field and Description |
|---|---|
| private final Supplier | |
| private long | |
| private MergedReftable | |
| private final Runnable | |
| private static long | |
| private final SecureRandom | |
| private final File | |
| private AtomicReference | |
| private List | |
| private final File | |
| private final FileReftableStack. | |
| private final CoreConfig. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the transaction was successful.writer to write data to a reftable under construction wTries to add a new reftable to the stack. |
| private void | |
| private static Optional | |
| public void | close()
Implements java. Closes this resource, relinquishing any underlying resources. |
| pack-priv void | |
| private File | Returns: the file holding the replacement table.index of first stack entry to be written first, int index of last stack entry to be written last)Write the reftable for the given range into a temp file. |
| pack-priv boolean | Returns: true if a compaction was successfully applied.index of first stack entry to be considered in compaction first, int index of last stack entry to be considered in compaction last)Compacts a range of the stack, following the file locking protocol documented in the spec. |
| private String | |
| public MergedReftable | |
| pack-priv FileReftableStack. | |
| pack-priv boolean | |
| pack-priv static int | Returns: log2the number to compute an approximate log2 for sz)Calculate an approximate log2. |
| private long | |
| private List | |
| private ReftableConfig | |
| pack-priv void | |
| private void | reloadOnce(List<String>
holds the names of the tables to load. names)Reloads the stack, potentially reusing opened reftableReaders. |
| pack-priv static List | |
| private long[] |
| configSupplier | back to summary |
|---|---|
| private final Supplier<Config> configSupplier | |
| lastNextUpdateIndex | back to summary |
|---|---|
| private long lastNextUpdateIndex | |
| mergedReftable | back to summary |
|---|---|
| private MergedReftable mergedReftable | |
| onChange | back to summary |
|---|---|
| private final Runnable onChange | |
| OVERHEAD | back to summary |
|---|---|
| private static long OVERHEAD | |
| random | back to summary |
|---|---|
| private final SecureRandom random | |
| reftableDir | back to summary |
|---|---|
| private final File reftableDir | |
| snapshot | back to summary |
|---|---|
| private AtomicReference<FileSnapshot> snapshot | |
| stack | back to summary |
|---|---|
| private List<FileReftableStack. | |
| stackPath | back to summary |
|---|---|
| private final File stackPath | |
| stats | back to summary |
|---|---|
| private final FileReftableStack. | |
| trustTablesListStat | back to summary |
|---|---|
| private final CoreConfig. | |
| FileReftableStack | back to summary |
|---|---|
| public FileReftableStack(File stackPath, File reftableDir, Runnable onChange, Supplier<Config> configSupplier) throws IOException Creates a stack corresponding to the list of reftables in the argument | |
| addReftable | back to summary |
|---|---|
| public boolean addReftable(FileReftableStack. Tries to add a new reftable to the stack. Returns true if it succeeded, or false if there was a lock failure, due to races with other processes. This is package private so FileReftableDatabase can call into here.
| |
| autoCompact | back to summary |
|---|---|
| private void autoCompact() throws IOException Heuristically tries to compact the stack if the stack has a suitable shape.
| |
| autoCompactCandidate | back to summary |
|---|---|
| private static Optional | |
| close | back to summary |
|---|---|
| public void close() Implements java. Doc from java. Closes this resource, relinquishing any underlying resources.
This method is invoked automatically on objects managed by the
| |
| compactFully | back to summary |
|---|---|
| pack-priv void compactFully() throws IOException | |
| compactLocked | back to summary |
|---|---|
| private File compactLocked(int first, int last) throws IOException Write the reftable for the given range into a temp file.
| |
| compactRange | back to summary |
|---|---|
| pack-priv boolean compactRange(int first, int last) throws IOException Compacts a range of the stack, following the file locking protocol documented in the spec.
| |
| filename | back to summary |
|---|---|
| private String filename(long low, long high) | |
| getMergedReftable | back to summary |
|---|---|
| public MergedReftable getMergedReftable() Get merged reftable
| |
| getStats | back to summary |
|---|---|
| pack-priv FileReftableStack. | |
| isUpToDate | back to summary |
|---|---|
pack-priv boolean isUpToDate() throws IOException
| |
| log | back to summary |
|---|---|
| pack-priv static int log(long sz) Calculate an approximate log2.
| |
| nextUpdateIndex | back to summary |
|---|---|
| private long nextUpdateIndex() throws IOException | |
| readTableNames | back to summary |
|---|---|
| private List | |
| reftableConfig | back to summary |
|---|---|
| private ReftableConfig reftableConfig() | |
| reload | back to summary |
|---|---|
| pack-priv void reload() throws IOException | |
| reloadOnce | back to summary |
|---|---|
| private void reloadOnce(List<String> names) throws IOException, FileNotFoundException Reloads the stack, potentially reusing opened reftableReaders.
| |
| segmentSizes | back to summary |
|---|---|
| pack-priv static List | |
| tableSizes | back to summary |
|---|---|
| private long[] tableSizes() throws IOException | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv int | |
| pack-priv long | |
| pack-priv int | |
| pack-priv long | |
| pack-priv long | |
| pack-priv long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| attempted | back to summary |
|---|---|
| pack-priv int attempted | |
| bytes | back to summary |
|---|---|
| pack-priv long bytes | |
| failed | back to summary |
|---|---|
| pack-priv int failed | |
| logCount | back to summary |
|---|---|
| pack-priv long logCount | |
| refCount | back to summary |
|---|---|
| pack-priv long refCount | |
| tables | back to summary |
|---|---|
| pack-priv long tables | |
| CompactionStats | back to summary |
|---|---|
| pack-priv CompactionStats() | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv long | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. Indicates whether some other object is "equal to" this one. |
| public int | |
| pack-priv int | |
| public String |
| bytes | back to summary |
|---|---|
| pack-priv long bytes | |
| end | back to summary |
|---|---|
| pack-priv int end | |
| log | back to summary |
|---|---|
| pack-priv int log | |
| start | back to summary |
|---|---|
| pack-priv int start | |
| Segment | back to summary |
|---|---|
| pack-priv Segment(int start, int end, int log, long bytes) | |
| Segment | back to summary |
|---|---|
| pack-priv Segment() | |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| size | back to summary |
|---|---|
| pack-priv int size() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv String | |
| pack-priv ReftableReader |
| Access | Constructor and Description |
|---|---|
| private |
| name | back to summary |
|---|---|
| pack-priv String name | |
| reftableReader | back to summary |
|---|---|
| pack-priv ReftableReader reftableReader | |
| StackEntry | back to summary |
|---|---|
| private StackEntry() | |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| call | back to summary |
|---|---|
| public void call(ReftableWriter w) throws IOException Write data to reftable
| |