Class PdsFolderSettings<L extends FileLockHolder>
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.persistence.filename.PdsFolderSettings<L>
-
public class PdsFolderSettings<L extends FileLockHolder> extends Object
Class holds information required for folder generation for ignite persistent store
-
-
Constructor Summary
Constructors Constructor Description PdsFolderSettings(@Nullable File persistentStoreRootPath, @NotNull Serializable consistentId)Creates settings for compatible mode.PdsFolderSettings(@Nullable File persistentStoreRootPath, String folderName, Serializable consistentId, L fileLockHolder, boolean compatible)Creates settings in for new PST(DB) folder mode.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SerializableconsistentId()StringfolderName()LgetLockedFileLockHolder()Returns already locked file lock holder to lock file inpersistentStoreRootPath.booleanisCompatible()FilepersistentStoreNodePath()@Nullable FilepersistentStoreRootPath()StringtoString()
-
-
-
Constructor Detail
-
PdsFolderSettings
public PdsFolderSettings(@Nullable @Nullable File persistentStoreRootPath, String folderName, Serializable consistentId, @Nullable L fileLockHolder, boolean compatible)Creates settings in for new PST(DB) folder mode.- Parameters:
persistentStoreRootPath- Persistent store root path or null if non PDS mode.folderName- Sub folder name containing consistent ID and optionally node index.consistentId- Consistent id.fileLockHolder- File lock holder with prelocked db directory.compatible- Compatible mode flag.
-
PdsFolderSettings
public PdsFolderSettings(@Nullable @Nullable File persistentStoreRootPath, @NotNull @NotNull Serializable consistentId)Creates settings for compatible mode. Folder name is consistent ID (masked), no node prefix is added.- Parameters:
persistentStoreRootPath- root DB path.consistentId- node consistent ID.
-
-
Method Detail
-
folderName
public String folderName()
- Returns:
- sub folders name based on consistent ID. In compatible mode this is escaped consistent ID, in new mode this is UUID based folder name.
-
consistentId
public Serializable consistentId()
- Returns:
- Consistent id to be set to local node.
-
isCompatible
public boolean isCompatible()
- Returns:
- flag indicating if compatible mode is enabled for folder generation. In that case all sub folders names are generated from consistent ID without 'node' and node index prefix. In compatible mode there is no overriding for consistent ID is done for cluster node. Locking files is independent to compatibility mode.
-
getLockedFileLockHolder
@Nullable public L getLockedFileLockHolder()
Returns already locked file lock holder to lock file inpersistentStoreRootPath. Unlock and close this lock is not required.- Returns:
- File lock holder with prelocked db directory.
-
persistentStoreRootPath
@Nullable public @Nullable File persistentStoreRootPath()
- Returns:
- DB storage absolute root path resolved as 'db' folder in Ignite work dir (by default) or using persistent store configuration. Note WAL storage may be configured outside this path. May return null for non pds mode.
-
persistentStoreNodePath
public File persistentStoreNodePath()
- Returns:
- Storage directory for node.
-
-