Package com.hazelcast.config
Class DataPersistenceConfig
java.lang.Object
com.hazelcast.config.DataPersistenceConfig
- All Implemented Interfaces:
- DataSerializable,- IdentifiedDataSerializable
Configures the Persistence per Hazelcast data structure.
 
Note: If either, but not both, data-persistence (
Note: If either, but not both, data-persistence (
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 SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanintReturns type identifier for this class.intReturns DataSerializableFactory factory ID for this class.final inthashCode()booleanReturns whether persistence enabled on related data structure.booleanisFsync()Returns whether disk write should be followed by anfsync()system call.voidReads fields from the input streamsetEnabled(boolean enabled) Sets whether hot restart is enabled on related data structure.setFsync(boolean fsync) Sets whether disk write should be followed by anfsync()system call.toString()voidWrites object fields to output stream
- 
Constructor Details- 
DataPersistenceConfigpublic DataPersistenceConfig()
- 
DataPersistenceConfig
 
- 
- 
Method Details- 
isEnabledpublic boolean isEnabled()Returns whether persistence enabled on related data structure.- Returns:
- true if persistence enabled, false otherwise
 
- 
setEnabledSets whether hot restart is enabled on related data structure.- Returns:
- DataPersistenceConfig
 
- 
isFsyncpublic boolean isFsync()Returns whether disk write should be followed by anfsync()system call.- Returns:
- true if fsync is be called after disk write, false otherwise
 
- 
setFsyncSets whether disk write should be followed by anfsync()system call.- Parameters:
- fsync- fsync
- Returns:
- this DataPersistenceConfig
 
- 
toString
- 
getFactoryIdpublic int getFactoryId()Description copied from interface:IdentifiedDataSerializableReturns DataSerializableFactory factory ID for this class.- Specified by:
- getFactoryIdin interface- IdentifiedDataSerializable
- Returns:
- factory ID
 
- 
getClassIdpublic int getClassId()Description copied from interface:IdentifiedDataSerializableReturns type identifier for this class. It should be unique per DataSerializableFactory.- Specified by:
- getClassIdin interface- IdentifiedDataSerializable
- Returns:
- type ID
 
- 
writeDataDescription copied from interface:DataSerializableWrites object fields to output stream- Specified by:
- writeDatain interface- DataSerializable
- Parameters:
- out- output
- Throws:
- IOException- if an I/O error occurs. In particular, an- IOExceptionmay be thrown if the output stream has been closed.
 
- 
readDataDescription copied from interface:DataSerializableReads fields from the input stream- Specified by:
- readDatain interface- DataSerializable
- Parameters:
- in- input
- Throws:
- IOException- if an I/O error occurs. In particular, an- IOExceptionmay be thrown if the input stream has been closed.
 
- 
equals
- 
hashCodepublic final int hashCode()
 
-