public class ReadonlyTableStore<T extends Metadata> extends Object 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() |
void |
close() |
<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 |
metadata() |
boolean |
readOnly() |
long |
refCount() |
void |
release() |
void |
reserve() |
@NotNull String |
shortDump() |
boolean |
tryReserve() |
void |
writeMarshallable(@NotNull net.openhft.chronicle.wire.WireOut wire) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitacquireValueForpublic ReadonlyTableStore(T metadata)
public T metadata()
metadata in interface TableStore<T extends Metadata>public void close()
close in interface Closeableclose in interface AutoCloseablepublic net.openhft.chronicle.core.values.LongValue acquireValueFor(CharSequence key, long defaultValue)
acquireValueFor in interface TableStore<T extends Metadata>public <R> R doWithExclusiveLock(Function<TableStore<T>,? extends R> code)
TableStoreTableStore.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 CommonStorepublic void reserve()
throws IllegalStateException
reserve in interface net.openhft.chronicle.core.ReferenceCountedIllegalStateExceptionpublic void release()
throws IllegalStateException
release in interface net.openhft.chronicle.core.ReferenceCountedIllegalStateExceptionpublic long refCount()
refCount in interface net.openhft.chronicle.core.ReferenceCountedpublic boolean tryReserve()
tryReserve in interface net.openhft.chronicle.core.ReferenceCountedpublic void writeMarshallable(@NotNull
@NotNull net.openhft.chronicle.wire.WireOut wire)
writeMarshallable in interface net.openhft.chronicle.wire.WriteMarshallablepublic boolean readOnly()
readOnly in interface TableStore<T extends Metadata>Copyright © 2020. All rights reserved.