public class MetaStorage extends Object implements CheckpointListener, ReadWriteMetastorage
Modifier and Type | Class and Description |
---|---|
static class |
MetaStorage.TmpStorage
Temporary storage
|
CheckpointListener.Context
Modifier and Type | Field and Description |
---|---|
static int |
METASTORAGE_CACHE_ID |
static String |
METASTORAGE_CACHE_NAME |
static boolean |
PRESERVE_LEGACY_METASTORAGE_PARTITION_ID
This flag is used ONLY FOR TESTING the migration of a metastorage from Part 0 to Part 1.
|
Constructor and Description |
---|
MetaStorage(GridCacheSharedContext<?,?> cctx,
DataRegion dataRegion,
DataRegionMetricsImpl regionMetrics,
boolean readOnly) |
Modifier and Type | Method and Description |
---|---|
void |
applyUpdate(String key,
byte[] value) |
void |
beforeCheckpointBegin(CheckpointListener.Context ctx)
Do some actions before checkpoint write lock.
|
void |
init(GridCacheDatabaseSharedManager db) |
void |
iterate(String keyPrefix,
BiConsumer<String,? super Serializable> cb,
boolean unmarshal)
Read all key/value pairs where key has provided prefix.
|
Marshaller |
marshaller() |
void |
onCheckpointBegin(CheckpointListener.Context ctx) |
void |
onMarkCheckpointBegin(CheckpointListener.Context ctx) |
PageMemory |
pageMemory() |
Serializable |
read(String key) |
byte[] |
readRaw(String key) |
void |
remove(@NotNull String key) |
void |
removeData(String key) |
void |
write(@NotNull String key,
@NotNull Serializable val) |
void |
writeRaw(String key,
byte[] data) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
afterCheckpointEnd
public static final String METASTORAGE_CACHE_NAME
public static final int METASTORAGE_CACHE_ID
public static boolean PRESERVE_LEGACY_METASTORAGE_PARTITION_ID
public MetaStorage(GridCacheSharedContext<?,?> cctx, DataRegion dataRegion, DataRegionMetricsImpl regionMetrics, boolean readOnly)
public void init(GridCacheDatabaseSharedManager db) throws IgniteCheckedException
IgniteCheckedException
public Serializable read(String key) throws IgniteCheckedException
read
in interface ReadOnlyMetastorage
IgniteCheckedException
public void iterate(String keyPrefix, BiConsumer<String,? super Serializable> cb, boolean unmarshal) throws IgniteCheckedException
iterate
in interface ReadOnlyMetastorage
keyPrefix
- Key prefix.cb
- Callback to invoke on each matching key/value pair.unmarshal
- True
if object passed into cb
should be unmarshalled.IgniteCheckedException
- If failed.public void write(@NotNull @NotNull String key, @NotNull @NotNull Serializable val) throws IgniteCheckedException
write
in interface ReadWriteMetastorage
IgniteCheckedException
public void remove(@NotNull @NotNull String key) throws IgniteCheckedException
remove
in interface ReadWriteMetastorage
IgniteCheckedException
public void writeRaw(String key, byte[] data) throws IgniteCheckedException
writeRaw
in interface ReadWriteMetastorage
IgniteCheckedException
public byte[] readRaw(String key) throws IgniteCheckedException
readRaw
in interface ReadOnlyMetastorage
IgniteCheckedException
public void removeData(String key) throws IgniteCheckedException
IgniteCheckedException
public PageMemory pageMemory()
public void onMarkCheckpointBegin(CheckpointListener.Context ctx) throws IgniteCheckedException
onMarkCheckpointBegin
in interface CheckpointListener
IgniteCheckedException
- If failed.public void beforeCheckpointBegin(CheckpointListener.Context ctx) throws IgniteCheckedException
beforeCheckpointBegin
in interface CheckpointListener
IgniteCheckedException
- If failed.public void onCheckpointBegin(CheckpointListener.Context ctx) throws IgniteCheckedException
onCheckpointBegin
in interface CheckpointListener
IgniteCheckedException
- If failed.public void applyUpdate(String key, byte[] value) throws IgniteCheckedException
IgniteCheckedException
public Marshaller marshaller()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.10.0 Release Date : March 10 2021