@IgniteSpiNoop @IgniteSpiMultipleInstancesSupport(value=true) public class NoopCheckpointSpi extends IgniteSpiAdapter implements CheckpointSpi
CheckpointSpi
. This is default implementation
since 4.5.0
version.ignite, igniteInstanceName
Constructor and Description |
---|
NoopCheckpointSpi() |
Modifier and Type | Method and Description |
---|---|
@Nullable byte[] |
loadCheckpoint(String key)
Loads checkpoint from storage by its unique key.
|
boolean |
removeCheckpoint(String key)
This method instructs the checkpoint provider to clean saved data for a
given
key . |
boolean |
saveCheckpoint(String key,
byte[] state,
long timeout,
boolean overwrite)
Saves checkpoint to the storage.
|
void |
setCheckpointListener(CheckpointListener lsnr)
Sets the checkpoint listener.
|
NoopCheckpointSpi |
setName(String name)
Sets SPI name.
|
void |
spiStart(@Nullable String igniteInstanceName)
This method is called to start SPI.
|
void |
spiStop()
This method is called to stop SPI.
|
String |
toString() |
addTimeoutObject, assertParameter, checkConfigurationConsistency0, clientFailureDetectionTimeout, configInfo, createSpiAttributeName, failureDetectionTimeout, failureDetectionTimeoutEnabled, failureDetectionTimeoutEnabled, getConsistentAttributeNames, getExceptionRegistry, getLocalNode, getName, getNodeAttributes, getSpiContext, ignite, initFailureDetectionTimeout, injectables, injectResources, isNodeStopping, onBeforeStart, onClientDisconnected, onClientReconnected, onContextDestroyed, onContextDestroyed0, onContextInitialized, onContextInitialized0, registerMBean, removeTimeoutObject, started, startInfo, startStopwatch, stopInfo, unregisterMBean
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getName, getNodeAttributes, onClientDisconnected, onClientReconnected, onContextDestroyed, onContextInitialized
public void spiStart(@Nullable @Nullable String igniteInstanceName) throws IgniteSpiException
spiStart
in interface IgniteSpi
igniteInstanceName
- Name of Ignite instance this SPI is being started for
(null
for default Ignite instance).IgniteSpiException
- Throws in case of any error during SPI start.public void spiStop() throws IgniteSpiException
Note that this method can be called at any point including during recovery of failed start. It should make no assumptions on what state SPI will be in when this method is called.
spiStop
in interface IgniteSpi
IgniteSpiException
- Thrown in case of any error during SPI stop.@Nullable public @Nullable byte[] loadCheckpoint(String key) throws IgniteSpiException
loadCheckpoint
in interface CheckpointSpi
key
- Checkpoint key.null
if there is no data for a given
key.IgniteSpiException
- Thrown in case of any error while loading
checkpoint data. Note that in case when given key
is not
found this method will return null
.public boolean saveCheckpoint(String key, byte[] state, long timeout, boolean overwrite)
saveCheckpoint
in interface CheckpointSpi
key
- Checkpoint unique key.state
- Saved data.timeout
- Every intermediate data stored by checkpoint provider
should have a timeout. Timeout allows for effective resource
management by checkpoint provider by cleaning saved data that are not
needed anymore. Generally, the user should choose the minimum
possible timeout to avoid long-term resource acquisition by checkpoint
provider. Value 0
means that timeout will never expire.overwrite
- Whether or not overwrite checkpoint if it already exists.true
if checkpoint has been actually saved, false
otherwise.public boolean removeCheckpoint(String key)
key
.removeCheckpoint
in interface CheckpointSpi
key
- Key for the checkpoint to remove.true
if data has been actually removed, false
otherwise.public void setCheckpointListener(CheckpointListener lsnr)
setCheckpointListener
in interface CheckpointSpi
lsnr
- The listener to set or null
.public NoopCheckpointSpi setName(String name)
setName
in class IgniteSpiAdapter
name
- SPI name.this
for chaining.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.16.0 Release Date : December 15 2023