org.apache.ignite.internal.processors.cache

## 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

### Field Summary

Fields
`static String` `WAL_DISABLED`

### Constructor Summary

Constructors
Constructor and Description
`WALDisableContext(IgniteCacheDatabaseSharedManager dbMgr, IgnitePageStoreManager pageStoreMgr, IgniteLogger log)`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `check()`
`protected void` `disableWAL(boolean disable)`
`void` `execute(IgniteRunnable cls)`
`void` `onReadyForRead(ReadOnlyMetastorage ms)` Is called when metastorage is made ready for read-only operations very early on node startup phase.
`void` `onReadyForReadWrite(ReadWriteMetastorage ms)` Fully functional metastore capable of performing reading and writing operations.
`protected void` `removeMetaStoreDisableWALFlag()`
`protected void` `writeMetaStoreDisableWALFlag()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 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
                             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:
  `onReadyForRead` in interface `MetastorageLifecycleListener`
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:
  `onReadyForReadWrite` in interface `MetastorageLifecycleListener`
Parameters:
  `ms` - Fully functional meta storage.
Throws:
  `IgniteCheckedException`

#### check

    public boolean check()

Returns:
  `true` If WAL is disabled.

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.7.0
Release Date | : November 30 2018