public class ReadonlyTableStore<T extends Metadata> extends net.openhft.chronicle.core.io.AbstractCloseable implements TableStore<T>
Constructor and Description |
---|
ReadonlyTableStore(T metadata) |
Modifier and Type | Method and Description |
---|---|
net.openhft.chronicle.core.values.LongValue |
acquireValueFor(CharSequence key,
long defaultValue) |
@NotNull net.openhft.chronicle.bytes.MappedBytes |
bytes() |
<R> R |
doWithExclusiveLock(Function<TableStore<T>,? extends R> code)
Acquires file-system level lock on the underlying file, to prevent concurrent access from multiple processes.
|
@NotNull String |
dump() |
@Nullable File |
file() |
<T> void |
forEachKey(T accumulator,
TableStoreIterator<T> tsIterator) |
T |
metadata() |
protected void |
performClose() |
boolean |
readOnly() |
@NotNull String |
shortDump() |
protected boolean |
threadSafetyCheck(boolean isUsed) |
void |
writeMarshallable(@NotNull net.openhft.chronicle.wire.WireOut wire) |
assertCloseablesClosed, clearUsedByThread, close, createdHere, disableCloseableTracing, enableCloseableTracing, isClosed, isClosing, isInUserThread, performCloseInBackground, referenceId, resetUsedByThread, shouldPerformCloseInBackground, shouldWaitForClosed, throwExceptionIfClosed, throwExceptionIfClosedInSetter, toString, unmonitor, waitForCloseablesToClose, waitForClosed, warnAndCloseIfNotClosed
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
acquireValueFor
usesSelfDescribingMessage
close, closeQuietly, closeQuietly, notifyClosing, warnAndCloseIfNotClosed
public ReadonlyTableStore(T metadata)
public T metadata()
metadata
in interface TableStore<T extends Metadata>
protected void performClose()
performClose
in class net.openhft.chronicle.core.io.AbstractCloseable
public net.openhft.chronicle.core.values.LongValue acquireValueFor(CharSequence key, long defaultValue)
acquireValueFor
in interface TableStore<T extends Metadata>
public <T> void forEachKey(T accumulator, TableStoreIterator<T> tsIterator)
forEachKey
in interface TableStore<T extends Metadata>
public <R> R doWithExclusiveLock(Function<TableStore<T>,? extends R> code)
TableStore
TableStore.acquireValueFor(CharSequence)
calls, to atomically acquire
multiple values.doWithExclusiveLock
in interface TableStore<T extends Metadata>
R
- result typecode
- code block to execute using locked table store@Nullable public @Nullable File file()
file
in interface CommonStore
@NotNull public @NotNull net.openhft.chronicle.bytes.MappedBytes bytes()
bytes
in interface CommonStore
@NotNull public @NotNull String dump()
dump
in interface CommonStore
@NotNull public @NotNull String shortDump()
shortDump
in interface CommonStore
public void writeMarshallable(@NotNull @NotNull net.openhft.chronicle.wire.WireOut wire)
writeMarshallable
in interface net.openhft.chronicle.wire.WriteMarshallable
public boolean readOnly()
readOnly
in interface TableStore<T extends Metadata>
protected boolean threadSafetyCheck(boolean isUsed)
threadSafetyCheck
in class net.openhft.chronicle.core.io.AbstractCloseable
Copyright © 2021. All rights reserved.