Class WalStateManager.WALDisableContext
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.WalStateManager.WALDisableContext
-
- All Implemented Interfaces:
MetastorageLifecycleListener
- Enclosing class:
- WalStateManager
public static class WalStateManager.WALDisableContext extends Object implements MetastorageLifecycleListener
Temporary storage for disabled WALs of group.
-
-
Field Summary
Fields Modifier and Type Field Description static StringWAL_DISABLED
-
Constructor Summary
Constructors Constructor Description WALDisableContext(IgniteCacheDatabaseSharedManager dbMgr, IgnitePageStoreManager pageStoreMgr, @Nullable IgniteLogger log)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheck()protected voiddisableWAL(boolean disable)voidexecute(IgniteRunnable cls)voidonReadyForRead(ReadOnlyMetastorage ms)Is called when metastorage is made ready for read-only operations very early on node startup phase.voidonReadyForReadWrite(ReadWriteMetastorage ms)Fully functional metastore capable of performing reading and writing operations.protected voidremoveMetaStoreDisableWALFlag()protected voidwriteMetaStoreDisableWALFlag()
-
-
-
Field Detail
-
WAL_DISABLED
public static final String WAL_DISABLED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WALDisableContext
public WALDisableContext(IgniteCacheDatabaseSharedManager dbMgr, IgnitePageStoreManager pageStoreMgr, @Nullable @Nullable IgniteLogger log)
- Parameters:
dbMgr- Database manager.pageStoreMgr- Page store manager.log-
-
-
Method Detail
-
execute
public void execute(IgniteRunnable cls) throws IgniteCheckedException
- Parameters:
cls- Closure to execute with disabled WAL.- Throws:
IgniteCheckedException- If execution failed.
-
writeMetaStoreDisableWALFlag
protected void writeMetaStoreDisableWALFlag() throws IgniteCheckedException- Throws:
IgniteCheckedException- If write meta store flag failed.
-
removeMetaStoreDisableWALFlag
protected void removeMetaStoreDisableWALFlag() throws IgniteCheckedException- Throws:
IgniteCheckedException- If remove meta store flag failed.
-
disableWAL
protected void disableWAL(boolean disable) throws IgniteCheckedException- Parameters:
disable- Flag wal disable.- Throws:
IgniteCheckedException
-
onReadyForRead
public void onReadyForRead(ReadOnlyMetastorage ms) throws IgniteCheckedException
Is called when metastorage is made ready for read-only operations very early on node startup phase. Reference for read-only metastorage should be used only within this method and shouldn't be stored to any field.- Specified by:
onReadyForReadin interfaceMetastorageLifecycleListener- Parameters:
ms- Read-only meta storage.- Throws:
IgniteCheckedException
-
onReadyForReadWrite
public void onReadyForReadWrite(ReadWriteMetastorage ms) throws IgniteCheckedException
Fully functional metastore capable of performing reading and writing operations. Components interested in using metastore are allowed to keep reference passed into the method in their fields.- Specified by:
onReadyForReadWritein interfaceMetastorageLifecycleListener- Parameters:
ms- Fully functional meta storage.- Throws:
IgniteCheckedException
-
check
public boolean check()
- Returns:
trueIf WAL is disabled.
-
-