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, waitafterCheckpointEndpublic 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
IgniteCheckedExceptionpublic Serializable read(String key) throws IgniteCheckedException
read in interface ReadOnlyMetastorageIgniteCheckedExceptionpublic void iterate(String keyPrefix, BiConsumer<String,? super Serializable> cb, boolean unmarshal) throws IgniteCheckedException
iterate in interface ReadOnlyMetastoragekeyPrefix - 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 ReadWriteMetastorageIgniteCheckedExceptionpublic void remove(@NotNull
@NotNull String key)
throws IgniteCheckedException
remove in interface ReadWriteMetastorageIgniteCheckedExceptionpublic void writeRaw(String key, byte[] data) throws IgniteCheckedException
writeRaw in interface ReadWriteMetastorageIgniteCheckedExceptionpublic byte[] readRaw(String key) throws IgniteCheckedException
readRaw in interface ReadOnlyMetastorageIgniteCheckedExceptionpublic void removeData(String key) throws IgniteCheckedException
IgniteCheckedExceptionpublic PageMemory pageMemory()
public void onMarkCheckpointBegin(CheckpointListener.Context ctx) throws IgniteCheckedException
onMarkCheckpointBegin in interface CheckpointListenerIgniteCheckedException - If failed.public void beforeCheckpointBegin(CheckpointListener.Context ctx) throws IgniteCheckedException
beforeCheckpointBegin in interface CheckpointListenerIgniteCheckedException - If failed.public void onCheckpointBegin(CheckpointListener.Context ctx) throws IgniteCheckedException
onCheckpointBegin in interface CheckpointListenerIgniteCheckedException - If failed.public void applyUpdate(String key, byte[] value) throws IgniteCheckedException
IgniteCheckedExceptionpublic Marshaller marshaller()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.10.0 Release Date : March 10 2021