public class EnvironmentImpl
extends java.lang.Object
implements jetbrains.exodus.env.Environment
| Modifier and Type | Field and Description |
|---|---|
static int |
META_TREE_ID |
| Modifier and Type | Method and Description |
|---|---|
@NotNull jetbrains.exodus.env.Transaction |
beginExclusiveTransaction() |
@NotNull jetbrains.exodus.env.Transaction |
beginExclusiveTransaction(java.lang.Runnable beginHook) |
@NotNull ReadWriteTransaction |
beginGCTransaction() |
@NotNull jetbrains.exodus.env.Transaction |
beginReadonlyTransaction() |
@NotNull TransactionBase |
beginReadonlyTransaction(java.lang.Runnable beginHook) |
@NotNull TransactionBase |
beginTransaction() |
@NotNull TransactionBase |
beginTransaction(java.lang.Runnable beginHook) |
protected @NotNull TransactionBase |
beginTransaction(java.lang.Runnable beginHook,
boolean exclusive,
boolean cloneMeta) |
ReadonlyTransaction |
beginTransactionAt(long highAddress) |
void |
clear() |
void |
close() |
<T> T |
computeInExclusiveTransaction(@NotNull jetbrains.exodus.env.TransactionalComputable<T> computable) |
<T> T |
computeInReadonlyTransaction(@NotNull jetbrains.exodus.env.TransactionalComputable<T> computable) |
<T> T |
computeInTransaction(@NotNull jetbrains.exodus.env.TransactionalComputable<T> computable) |
protected StoreImpl |
createStore(@NotNull java.lang.String name,
@NotNull TreeMetaInfo metaInfo) |
protected StoreImpl |
createTemporaryEmptyStore(java.lang.String name) |
void |
executeBeforeGc(java.lang.Runnable action) |
void |
executeInExclusiveTransaction(@NotNull jetbrains.exodus.env.TransactionalExecutable executable) |
void |
executeInReadonlyTransaction(@NotNull jetbrains.exodus.env.TransactionalExecutable executable) |
void |
executeInTransaction(@NotNull jetbrains.exodus.env.TransactionalExecutable executable) |
void |
executeTransactionSafeTask(@NotNull java.lang.Runnable task) |
protected void |
finishTransaction(@NotNull TransactionBase txn) |
void |
flushAndSync()
Flushes Log's data writer exclusively in commit lock.
|
void |
gc() |
long |
getAllStoreCount() |
@NotNull java.util.List<java.lang.String> |
getAllStoreNames(@NotNull jetbrains.exodus.env.Transaction txn) |
@NotNull jetbrains.exodus.backup.BackupStrategy |
getBackupStrategy() |
BTreeBalancePolicy |
getBTreeBalancePolicy() |
long |
getCipherBasicIV() |
@Nullable byte[] |
getCipherKey() |
@Nullable jetbrains.exodus.crypto.StreamCipherProvider |
getCipherProvider() |
long |
getCreated() |
@NotNull jetbrains.exodus.env.EnvironmentConfig |
getEnvironmentConfig() |
jetbrains.exodus.gc.GarbageCollector |
getGC() |
@NotNull java.lang.String |
getLocation() |
@NotNull jetbrains.exodus.log.Log |
getLog() |
MetaTree |
getMetaTree() |
@NotNull EnvironmentStatistics |
getStatistics() |
float |
getStoreGetCacheHitRate() |
int |
getStuckTransactionCount() |
@Nullable jetbrains.exodus.debug.TxnProfiler |
getTxnProfiler() |
boolean |
isOpen() |
@NotNull jetbrains.exodus.env.BitmapImpl |
openBitmap(@NotNull java.lang.String name,
@NotNull jetbrains.exodus.env.StoreConfig config,
@NotNull jetbrains.exodus.env.Transaction transaction) |
@NotNull StoreImpl |
openStore(@NotNull java.lang.String name,
@NotNull jetbrains.exodus.env.StoreConfig config,
@NotNull jetbrains.exodus.env.Transaction transaction) |
@Nullable StoreImpl |
openStore(@NotNull java.lang.String name,
@NotNull jetbrains.exodus.env.StoreConfig config,
@NotNull jetbrains.exodus.env.Transaction transaction,
boolean creationRequired) |
void |
removeFiles(long[] files,
@NotNull jetbrains.exodus.io.RemoveBlockType rbt) |
void |
removeStore(@NotNull java.lang.String storeName,
@NotNull jetbrains.exodus.env.Transaction txn) |
void |
resumeGC() |
boolean |
storeExists(@NotNull java.lang.String storeName,
@NotNull jetbrains.exodus.env.Transaction txn) |
void |
suspendGC() |
void |
truncateStore(@NotNull java.lang.String storeName,
@NotNull jetbrains.exodus.env.Transaction txn) |
public static final int META_TREE_ID
public long getCreated()
getCreated in interface jetbrains.exodus.env.Environment@NotNull public @NotNull java.lang.String getLocation()
getLocation in interface jetbrains.exodus.env.Environment@NotNull
public @NotNull jetbrains.exodus.env.BitmapImpl openBitmap(@NotNull
@NotNull java.lang.String name,
@NotNull
@NotNull jetbrains.exodus.env.StoreConfig config,
@NotNull
@NotNull jetbrains.exodus.env.Transaction transaction)
openBitmap in interface jetbrains.exodus.env.Environment@NotNull public @NotNull jetbrains.exodus.env.EnvironmentConfig getEnvironmentConfig()
getEnvironmentConfig in interface jetbrains.exodus.env.Environment@NotNull public @NotNull EnvironmentStatistics getStatistics()
getStatistics in interface jetbrains.exodus.env.Environmentpublic jetbrains.exodus.gc.GarbageCollector getGC()
@Nullable public @Nullable jetbrains.exodus.debug.TxnProfiler getTxnProfiler()
@NotNull public @NotNull StoreImpl openStore(@NotNull @NotNull java.lang.String name, @NotNull @NotNull jetbrains.exodus.env.StoreConfig config, @NotNull @NotNull jetbrains.exodus.env.Transaction transaction)
openStore in interface jetbrains.exodus.env.Environment@Nullable public @Nullable StoreImpl openStore(@NotNull @NotNull java.lang.String name, @NotNull @NotNull jetbrains.exodus.env.StoreConfig config, @NotNull @NotNull jetbrains.exodus.env.Transaction transaction, boolean creationRequired)
openStore in interface jetbrains.exodus.env.Environment@NotNull public @NotNull TransactionBase beginTransaction()
beginTransaction in interface jetbrains.exodus.env.Environment@NotNull public @NotNull TransactionBase beginTransaction(java.lang.Runnable beginHook)
beginTransaction in interface jetbrains.exodus.env.Environment@NotNull public @NotNull jetbrains.exodus.env.Transaction beginExclusiveTransaction()
beginExclusiveTransaction in interface jetbrains.exodus.env.Environment@NotNull public @NotNull jetbrains.exodus.env.Transaction beginExclusiveTransaction(java.lang.Runnable beginHook)
beginExclusiveTransaction in interface jetbrains.exodus.env.Environment@NotNull public @NotNull jetbrains.exodus.env.Transaction beginReadonlyTransaction()
beginReadonlyTransaction in interface jetbrains.exodus.env.Environment@NotNull public @NotNull TransactionBase beginReadonlyTransaction(java.lang.Runnable beginHook)
beginReadonlyTransaction in interface jetbrains.exodus.env.Environment@NotNull public @NotNull ReadWriteTransaction beginGCTransaction()
public ReadonlyTransaction beginTransactionAt(long highAddress)
public void executeInTransaction(@NotNull
@NotNull jetbrains.exodus.env.TransactionalExecutable executable)
executeInTransaction in interface jetbrains.exodus.env.Environmentpublic void executeInExclusiveTransaction(@NotNull
@NotNull jetbrains.exodus.env.TransactionalExecutable executable)
executeInExclusiveTransaction in interface jetbrains.exodus.env.Environmentpublic void executeInReadonlyTransaction(@NotNull
@NotNull jetbrains.exodus.env.TransactionalExecutable executable)
executeInReadonlyTransaction in interface jetbrains.exodus.env.Environmentpublic <T> T computeInTransaction(@NotNull
@NotNull jetbrains.exodus.env.TransactionalComputable<T> computable)
computeInTransaction in interface jetbrains.exodus.env.Environmentpublic <T> T computeInExclusiveTransaction(@NotNull
@NotNull jetbrains.exodus.env.TransactionalComputable<T> computable)
computeInExclusiveTransaction in interface jetbrains.exodus.env.Environmentpublic <T> T computeInReadonlyTransaction(@NotNull
@NotNull jetbrains.exodus.env.TransactionalComputable<T> computable)
computeInReadonlyTransaction in interface jetbrains.exodus.env.Environmentpublic void executeTransactionSafeTask(@NotNull
@NotNull java.lang.Runnable task)
executeTransactionSafeTask in interface jetbrains.exodus.env.Environmentpublic int getStuckTransactionCount()
@Nullable public @Nullable jetbrains.exodus.crypto.StreamCipherProvider getCipherProvider()
getCipherProvider in interface jetbrains.exodus.env.Environment@Nullable public @Nullable byte[] getCipherKey()
getCipherKey in interface jetbrains.exodus.env.Environmentpublic long getCipherBasicIV()
getCipherBasicIV in interface jetbrains.exodus.env.Environmentpublic void clear()
clear in interface jetbrains.exodus.env.Environmentpublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface jetbrains.exodus.env.Environmentpublic boolean isOpen()
isOpen in interface jetbrains.exodus.env.Environment@NotNull public @NotNull jetbrains.exodus.backup.BackupStrategy getBackupStrategy()
getBackupStrategy in interface jetbrains.exodus.backup.Backupablepublic void truncateStore(@NotNull
@NotNull java.lang.String storeName,
@NotNull
@NotNull jetbrains.exodus.env.Transaction txn)
truncateStore in interface jetbrains.exodus.env.Environmentpublic void removeStore(@NotNull
@NotNull java.lang.String storeName,
@NotNull
@NotNull jetbrains.exodus.env.Transaction txn)
removeStore in interface jetbrains.exodus.env.Environmentpublic long getAllStoreCount()
@NotNull
public @NotNull java.util.List<java.lang.String> getAllStoreNames(@NotNull
@NotNull jetbrains.exodus.env.Transaction txn)
getAllStoreNames in interface jetbrains.exodus.env.Environmentpublic boolean storeExists(@NotNull
@NotNull java.lang.String storeName,
@NotNull
@NotNull jetbrains.exodus.env.Transaction txn)
storeExists in interface jetbrains.exodus.env.Environment@NotNull public @NotNull jetbrains.exodus.log.Log getLog()
public void gc()
gc in interface jetbrains.exodus.env.Environmentpublic void suspendGC()
suspendGC in interface jetbrains.exodus.env.Environmentpublic void resumeGC()
resumeGC in interface jetbrains.exodus.env.Environmentpublic void executeBeforeGc(java.lang.Runnable action)
executeBeforeGc in interface jetbrains.exodus.env.Environmentpublic BTreeBalancePolicy getBTreeBalancePolicy()
public void flushAndSync()
public void removeFiles(long[] files,
@NotNull
@NotNull jetbrains.exodus.io.RemoveBlockType rbt)
public float getStoreGetCacheHitRate()
protected StoreImpl createStore(@NotNull @NotNull java.lang.String name, @NotNull @NotNull TreeMetaInfo metaInfo)
protected void finishTransaction(@NotNull
@NotNull TransactionBase txn)
@NotNull protected @NotNull TransactionBase beginTransaction(java.lang.Runnable beginHook, boolean exclusive, boolean cloneMeta)
public MetaTree getMetaTree()
protected StoreImpl createTemporaryEmptyStore(java.lang.String name)