public class DataPersistenceConfig extends Object implements IdentifiedDataSerializable
DataPersistenceConfig
) or
hot-restart (HotRestartConfig
) is enabled,
Hazelcast will use the configuration of the enabled element. If both are
enabled, Hazelcast will use the data-persistence (DataPersistenceConfig
)
configuration. hot-restart element (and thus HotRestartConfig
)
will be removed in a future release.Constructor and Description |
---|
DataPersistenceConfig() |
DataPersistenceConfig(DataPersistenceConfig dataPersistenceConfig) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
getClassId()
Returns type identifier for this class.
|
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
int |
hashCode() |
boolean |
isEnabled()
Returns whether persistence enabled on related data structure.
|
boolean |
isFsync()
Returns whether disk write should be followed by an
fsync() system call. |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
DataPersistenceConfig |
setEnabled(boolean enabled)
Sets whether hot restart is enabled on related data structure.
|
DataPersistenceConfig |
setFsync(boolean fsync)
Sets whether disk write should be followed by an
fsync() system call. |
String |
toString() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public DataPersistenceConfig()
public DataPersistenceConfig(DataPersistenceConfig dataPersistenceConfig)
public boolean isEnabled()
public DataPersistenceConfig setEnabled(boolean enabled)
public boolean isFsync()
fsync()
system call.public DataPersistenceConfig setFsync(boolean fsync)
fsync()
system call.fsync
- fsyncpublic int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getClassId()
IdentifiedDataSerializable
getClassId
in interface IdentifiedDataSerializable
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- outputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
output stream has been closed.public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
input stream has been closed.Copyright © 2023 Hazelcast, Inc.. All rights reserved.