Class FSFS
java.lang.Object
org.tmatesoft.svn.core.internal.io.fs.FSFS
- Version:
- 1.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final int
static final String
static final int
static final int
static final boolean
static final String
static final String
private static final String
private static long
static final int
static final String
static final String
static final String
static final String
static final String
static final String
static final int
static final String
static final String
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final String
static final String
private long
private boolean
private SVNConfigFile
private File
private int
private File
private File
private String
private File
private boolean
private boolean
private long
private File
private long
private File
private long
private long
private File
private long
private IFSRepresentationCacheManager
private int
private File
private File
private File
private File
private File
private long
private File
private File
private File
private File
private boolean
private String
private File
private File
private long
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final int
static final int
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate byte[]
applyDeltaFromFSFile
(FSFile revisionFile, int deltaSize, InputStream baseStream, StringBuilder outputChecksum) void
changeTransactionProperties
(String txnId, SVNProperties txnProperties) void
close()
compoundMetaProperties
(long revision) void
createNewTxnNodeRevisionFromRevision
(String txnID, FSRevisionNode sourceNode) createRevisionRoot
(long revision) private static long
decodeUncompressedSize
(InputStream inputStream, int lengthRecordSize, int[] outputBytesRead) void
deleteLock
(SVNLock lock) private boolean
ensureDirExists
(File dir, boolean create) private void
ensureRevisionsExists
(long revision) fetchLockFromDigestFile
(File digestFile, String repositoryPath, Collection children) static File
findRepositoryRoot
(File path) static String
findRepositoryRoot
(String host, String path) protected File
getAbsoluteRevisionPath
(long revision) long
long
getDatedRevision
(Date date) int
static long
long
getDeletedRevision
(String path, long startRev, long endRev) getDigestFileFromRepositoryPath
(String repositoryPath) getDigestFromRepositoryPath
(String repositoryPath) getDirContents
(FSRevisionNode revNode) long
getLockHelper
(String repositoryPath, boolean haveWriteLock) protected File
getManifestFile
(long revision) long
long
protected File
long
getNewRevisionFile
(long newRevision) getNewRevisionPropertiesFile
(long newRevision) getNextIDsFile
(String txnID) String[]
getNodeOrigin
(String nodeID) protected File
getNodeOriginFile
(String nodeID) private SVNProperties
getNodeOriginsFromFile
(String nodeID) long
protected File
getPackDir
(long revision) long
getPackedBaseRevision
(long revision) protected long
getPackedOffset
(long revision) protected File
getPackedRevPath
(long revision, String kind) private File
getPackedRevPropFile
(long revision) protected File
getPackedRevPropsShardPath
(long revision) protected File
getPackFile
(long revision) protected FSFile
getPackOrRevisionFSFile
(long revision) getPreviousLocation
(String path, long revision, long[] appearedRevision) getProperties
(FSRevisionNode revNode) int
protected File
getRevisionFile
(long revision) protected FSFile
getRevisionFSFile
(long revision) getRevisionNode
(FSID id) getRevisionProperties
(long revision) getRevisionPropertiesFile
(long revision, boolean returnMissing) private Date
getRevisionTime
(long revision) protected long
protected FSFile
getTransactionChangesFile
(String txnID) protected File
protected File
getTransactionDir
(String txnID) getTransactionProperties
(String txnID) getTransactionProtoRevFile
(String txnID) protected FSFile
protected FSFile
protected FSFile
getUUID()
long
boolean
boolean
boolean
isPackedRevision
(long revision) private boolean
isPackedRevisionProperties
(long revision) private static boolean
isRepositoryRoot
(File candidatePath) boolean
boolean
private SVNConfigFile
private SVNLock
lock
(String path, String token, String username, String comment, Date expirationDate, long currentRevision, boolean stealLock, boolean isDAVComment) lockPath
(String path, String token, String username, String comment, Date expirationDate, long currentRevision, boolean stealLock, boolean isDAVComment) protected long
lookupOffsetInIndex
(FSFile file, long revision, long itemIndex) protected long
lookupOffsetInProtoIndex
(FSFile file, String txnId, long itemIndex) void
open()
private FSFile
openAndSeekRevision
(long revision, long itemIndex) private FSFile
void
openDB()
void
void
openRoot()
private Map
parsePlainRepresentation
(SVNProperties entries, boolean mayContainNulls) private SVNProperties
parseProperties
(FSRepresentation txtRep) private byte[]
parseRawDeltaProperties
(FSRepresentation txtRep, StringBuilder outputChecksum) private FSEntry
parseRepEntryValue
(String name, String value) void
void
putTxnRevisionNode
(FSID id, FSRevisionNode revNode) int
private static long
readNumber
(BufferedReader reader) private static long
readNumber
(InputStream inputStream) void
readOptions
(FSFile formatFile, int formatNumber) private SVNProperties
readPackedRevisionProperties
(long revision) private static SVNProperties
readProperties
(byte[] propsData) private SVNProperties
readRevisionProperties
(long revision) static void
setDefaultMaxFilesPerDirectory
(long maxFilesPerDirectory) void
setHooksEnabled
(boolean enabled) private void
void
setNodeOrigin
(String nodeID, FSID nodeRevisionID) void
setRevisionProperty
(long revision, String propertyName, SVNPropertyValue propertyValue) void
setTransactionProperty
(String txnID, String name, SVNPropertyValue propertyValue) void
void
setYoungestRevisionCache
(long revision) boolean
private void
void
unlockPath
(String path, String token, String username, boolean breakLock, boolean enableHooks) void
void
upgrade()
private void
verifyBlockSize
(long blockSize, long itemSize, String name) void
walkDigestFiles
(File digestFile, ISVNLockHandler getLocksHandler, boolean haveWriteLock) protected void
writeCurrentFile
(long revision, String nextNodeID, String nextCopyID) void
writeDBFormat
(int format, long maxFilesPerDir, boolean overwrite) private void
writeDigestLockFile
(SVNLock lock, Collection children, String repositoryPath, boolean isDAVComment) void
writeNextIDs
(String txnID, String nodeID, String copyID) void
writeTxnNodeRevision
(OutputStream revNodeFile, FSRevisionNode revNode)
-
Field Details
-
DB_DIR
- See Also:
-
REVS_DIR
- See Also:
-
REPOS_FORMAT_FILE
- See Also:
-
DB_FORMAT_FILE
- See Also:
-
DB_LOGS_LOCK_FILE
- See Also:
-
DB_LOCK_FILE
- See Also:
-
CURRENT_FILE
- See Also:
-
UUID_FILE
- See Also:
-
FS_TYPE_FILE
- See Also:
-
TXN_CURRENT_FILE
- See Also:
-
MIN_UNPACKED_REV_FILE
- See Also:
-
TXN_CURRENT_LOCK_FILE
- See Also:
-
REVISION_PROPERTIES_DIR
- See Also:
-
WRITE_LOCK_FILE
- See Also:
-
LOCKS_DIR
- See Also:
-
DAV_DIR
- See Also:
-
TRANSACTIONS_DIR
- See Also:
-
TRANSACTION_PROTOS_DIR
- See Also:
-
NODE_ORIGINS_DIR
- See Also:
-
MANIFEST_FILE
- See Also:
-
REP_CACHE_DB
- See Also:
-
PACK_EXT
- See Also:
-
PACK_KIND_PACK
- See Also:
-
PACK_KIND_MANIFEST
- See Also:
-
ENABLE_REP_SHARING_OPTION
- See Also:
-
REP_SHARING_SECTION
- See Also:
-
PACKED_REVPROPS_SECTION
- See Also:
-
COMPRESS_PACKED_REVPROPS_OPTION
- See Also:
-
REVPROP_PACK_SIZE_OPTION
- See Also:
-
IO_SECTION
- See Also:
-
BLOCK_SIZE_OPTION
- See Also:
-
L2P_PAGE_SIZE_OPTION
- See Also:
-
P2L_PAGE_SIZE_OPTION
- See Also:
-
PATH_CONFIG
- See Also:
-
TXN_PATH_EXT
- See Also:
-
TXN_MERGEINFO_PATH
- See Also:
-
TXN_PATH_EXT_CHILDREN
- See Also:
-
PATH_PREFIX_NODE
- See Also:
-
TXN_PATH_EXT_PROPS
- See Also:
-
SVN_OPAQUE_LOCK_TOKEN
- See Also:
-
TXN_PATH_REV
- See Also:
-
PATH_LOCK_KEY
- See Also:
-
CHILDREN_LOCK_KEY
- See Also:
-
TOKEN_LOCK_KEY
- See Also:
-
OWNER_LOCK_KEY
- See Also:
-
IS_DAV_COMMENT_LOCK_KEY
- See Also:
-
CREATION_DATE_LOCK_KEY
- See Also:
-
EXPIRATION_DATE_LOCK_KEY
- See Also:
-
COMMENT_LOCK_KEY
- See Also:
-
PRE_12_COMPAT_UNNEEDED_FILE_CONTENTS
- See Also:
-
DIGEST_SUBDIR_LEN
public static final int DIGEST_SUBDIR_LEN- See Also:
-
REPOSITORY_FORMAT
public static final int REPOSITORY_FORMAT- See Also:
-
REPOSITORY_FORMAT_LEGACY
public static final int REPOSITORY_FORMAT_LEGACY- See Also:
-
DB_FORMAT_PRE_17
public static final int DB_FORMAT_PRE_17- See Also:
-
DB_FORMAT
public static final int DB_FORMAT- See Also:
-
DB_FORMAT_LOW
public static final int DB_FORMAT_LOW- See Also:
-
MIN_SVNDIFF1_FORMAT
public static final int MIN_SVNDIFF1_FORMAT- See Also:
-
LAYOUT_FORMAT_OPTION_MINIMAL_FORMAT
public static final int LAYOUT_FORMAT_OPTION_MINIMAL_FORMAT- See Also:
-
MIN_CURRENT_TXN_FORMAT
public static final int MIN_CURRENT_TXN_FORMAT- See Also:
-
MIN_PROTOREVS_DIR_FORMAT
public static final int MIN_PROTOREVS_DIR_FORMAT- See Also:
-
MIN_NO_GLOBAL_IDS_FORMAT
public static final int MIN_NO_GLOBAL_IDS_FORMAT- See Also:
-
MIN_MERGE_INFO_FORMAT
public static final int MIN_MERGE_INFO_FORMAT- See Also:
-
MIN_REP_SHARING_FORMAT
public static final int MIN_REP_SHARING_FORMAT- See Also:
-
MIN_PACKED_FORMAT
public static final int MIN_PACKED_FORMAT- See Also:
-
MIN_KIND_IN_CHANGED_FORMAT
public static final int MIN_KIND_IN_CHANGED_FORMAT- See Also:
-
MIN_PACKED_REVPROP_SQLITE_DEV_FORMAT
public static final int MIN_PACKED_REVPROP_SQLITE_DEV_FORMAT- See Also:
-
MIN_PACKED_REVPROP_FORMAT
public static final int MIN_PACKED_REVPROP_FORMAT- See Also:
-
MIN_LOG_ADDRESSING_MINIMAL_FORMAT
public static final int MIN_LOG_ADDRESSING_MINIMAL_FORMAT- See Also:
-
MIN_MERGEINFO_IN_CHANGED_FORMAT
public static final int MIN_MERGEINFO_IN_CHANGED_FORMAT- See Also:
-
DEFAULT_MAX_FILES_PER_DIRECTORY
private static long DEFAULT_MAX_FILES_PER_DIRECTORY -
DB_TYPE
- See Also:
-
REVISION_PROPERTIES_DB
- See Also:
-
REVISION_PROPERTIES_TABLE
- See Also:
-
MIN_UNPACKED_REV
- See Also:
-
DB_FORMAT_PRE_17_USE_AS_DEFAULT
public static final boolean DB_FORMAT_PRE_17_USE_AS_DEFAULT- See Also:
-
myDBFormat
private int myDBFormat -
myReposFormat
private int myReposFormat -
myUUID
-
myFSType
-
myRepositoryRoot
-
myRevisionsRoot
-
myRevisionPropertiesRoot
-
myTransactionsRoot
-
myLocksRoot
-
myDBRoot
-
myWriteLockFile
-
myCurrentFile
-
myTransactionCurrentFile
-
myTransactionCurrentLockFile
-
myTransactionProtoRevsRoot
-
myNodeOriginsDir
-
myRepositoryFormatFile
-
myDBFormatFile
-
myUUIDFile
-
myFSTypeFile
-
myMinUnpackedRevFile
-
myRepositoryCacheFile
-
myMaxFilesPerDirectory
private long myMaxFilesPerDirectory -
myYoungestRevisionCache
private long myYoungestRevisionCache -
myMinUnpackedRevision
private long myMinUnpackedRevision -
myUseLogAddressing
private boolean myUseLogAddressing -
myConfig
-
myReposCacheManager
-
myMinUnpackedRevProp
private long myMinUnpackedRevProp -
myIsHooksEnabled
private boolean myIsHooksEnabled -
myCompressPackedRevprops
private boolean myCompressPackedRevprops -
myIsRepSharingAllowed
private boolean myIsRepSharingAllowed -
myRevpropPackSize
private long myRevpropPackSize -
myBlockSize
private long myBlockSize -
myL2PPageSize
private long myL2PPageSize -
myP2LPageSize
private long myP2LPageSize
-
-
Constructor Details
-
FSFS
-
-
Method Details
-
setHooksEnabled
public void setHooksEnabled(boolean enabled) -
isHooksEnabled
public boolean isHooksEnabled() -
getDBFormat
public int getDBFormat() -
getMaxFilesPerDirectory
public long getMaxFilesPerDirectory() -
getReposFormat
public int getReposFormat() -
isUseLogAddressing
public boolean isUseLogAddressing() -
open
- Throws:
SVNException
-
close
- Throws:
SVNException
-
openForRecovery
- Throws:
SVNException
-
openRoot
- Throws:
SVNException
-
openDB
- Throws:
SVNException
-
verifyBlockSize
- Throws:
SVNException
-
getFSType
- Throws:
SVNException
-
readDBFormat
- Throws:
SVNException
-
getUUID
- Throws:
SVNException
-
getDBRoot
-
getWriteLockFile
-
getUUIDFile
-
getDBRevsDir
-
getDBLocksDir
-
getFSTypeFile
-
getTransactionsParentDir
-
getRepositoryRoot
-
getRevisionPropertiesRoot
-
getRepositoryFormatFile
-
getDBFormatFile
-
getNodeOriginsDir
-
getCurrentFile
-
getRepositoryCacheFile
-
getDBLogsLockFile
- Throws:
SVNException
-
getDatedRevision
- Throws:
SVNException
-
getYoungestRevision
- Throws:
SVNException
-
getMinUnpackedRev
- Throws:
SVNException
-
upgrade
- Throws:
SVNException
-
writeDBFormat
- Throws:
SVNException
-
getRevisionProperties
- Throws:
SVNException
-
readRevisionProperties
- Throws:
SVNException
-
readPackedRevisionProperties
- Throws:
SVNException
-
getPackedRevPropFile
- Throws:
SVNException
-
decodeUncompressedSize
private static long decodeUncompressedSize(InputStream inputStream, int lengthRecordSize, int[] outputBytesRead) throws SVNException - Throws:
SVNException
-
readProperties
- Throws:
SVNException
-
readNumber
- Throws:
SVNException
IOException
-
readNumber
- Throws:
SVNException
-
isPackedRevisionProperties
private boolean isPackedRevisionProperties(long revision) -
createRevisionRoot
- Throws:
SVNException
-
createTransactionRoot
- Throws:
SVNException
-
openTxn
- Throws:
SVNException
-
getRevisionNode
- Throws:
SVNException
-
getDirContents
- Throws:
SVNException
-
parseRawDeltaProperties
private byte[] parseRawDeltaProperties(FSRepresentation txtRep, StringBuilder outputChecksum) throws SVNException - Throws:
SVNException
-
applyDeltaFromFSFile
private byte[] applyDeltaFromFSFile(FSFile revisionFile, int deltaSize, InputStream baseStream, StringBuilder outputChecksum) throws IOException, SVNException - Throws:
IOException
SVNException
-
parseProperties
- Throws:
SVNException
-
getProperties
- Throws:
SVNException
-
getNextRevisionIDs
- Throws:
SVNException
-
getAndIncrementTxnKey
- Throws:
SVNException
-
listTransactions
-
getNewRevisionFile
-
getNewRevisionPropertiesFile
-
getTransactionDir
-
setYoungestRevisionCache
public void setYoungestRevisionCache(long revision) -
setUUID
- Throws:
SVNException
-
getRevisionPropertiesFile
- Throws:
SVNException
-
openAndSeekRepresentation
- Throws:
SVNException
-
getNextIDsFile
-
writeNextIDs
- Throws:
SVNException
-
changeTransactionProperties
public void changeTransactionProperties(String txnId, SVNProperties txnProperties) throws SVNException - Throws:
SVNException
-
setTransactionProperty
public void setTransactionProperty(String txnID, String name, SVNPropertyValue propertyValue) throws SVNException - Throws:
SVNException
-
setRevisionProperty
public void setRevisionProperty(long revision, String propertyName, SVNPropertyValue propertyValue) throws SVNException - Throws:
SVNException
-
getRevPropPackSize
protected long getRevPropPackSize() -
isRepSharingAllowed
public boolean isRepSharingAllowed() -
getBlockSize
public long getBlockSize() -
getL2PPageSize
public long getL2PPageSize() -
getP2LPageSize
public long getP2LPageSize() -
getTransactionProperties
- Throws:
SVNException
-
getTransactionPropertiesFile
-
getTransactionProtoRevsDir
-
getTransactionProtoRevFile
-
getTransactionProtoRevLockFile
-
purgeTxn
- Throws:
SVNException
-
createNewTxnNodeRevisionFromRevision
public void createNewTxnNodeRevisionFromRevision(String txnID, FSRevisionNode sourceNode) throws SVNException - Throws:
SVNException
-
putTxnRevisionNode
- Throws:
SVNException
-
getTransactionRevNodeFile
-
writeTxnNodeRevision
public void writeTxnNodeRevision(OutputStream revNodeFile, FSRevisionNode revNode) throws IOException - Throws:
IOException
-
getLock
public SVNLock getLock(String repositoryPath, boolean haveWriteLock, boolean throwError) throws SVNException - Throws:
SVNException
-
deleteLock
- Throws:
SVNException
-
walkDigestFiles
public void walkDigestFiles(File digestFile, ISVNLockHandler getLocksHandler, boolean haveWriteLock) throws SVNException - Throws:
SVNException
-
getLockHelper
- Throws:
SVNException
-
fetchLockFromDigestFile
public SVNLock fetchLockFromDigestFile(File digestFile, String repositoryPath, Collection children) throws SVNException - Throws:
SVNException
-
getDigestFileFromRepositoryPath
- Throws:
SVNException
-
getDigestFromRepositoryPath
- Throws:
SVNException
-
unlockPath
public void unlockPath(String path, String token, String username, boolean breakLock, boolean enableHooks) throws SVNException - Throws:
SVNException
-
lockPath
public SVNLock lockPath(String path, String token, String username, String comment, Date expirationDate, long currentRevision, boolean stealLock, boolean isDAVComment) throws SVNException - Throws:
SVNException
-
compoundMetaProperties
- Throws:
SVNException
-
getDeletedRevision
- Throws:
SVNException
-
getPreviousLocation
public SVNLocationEntry getPreviousLocation(String path, long revision, long[] appearedRevision) throws SVNException - Throws:
SVNException
-
getNodeOrigin
- Throws:
SVNException
-
setNodeOrigin
- Throws:
SVNException
-
supportsMergeInfo
public boolean supportsMergeInfo() -
readOptions
- Throws:
SVNException
-
getRepositoryCacheManager
-
findRepositoryRoot
-
findRepositoryRoot
-
getDefaultMaxFilesPerDirectory
public static long getDefaultMaxFilesPerDirectory() -
setDefaultMaxFilesPerDirectory
public static void setDefaultMaxFilesPerDirectory(long maxFilesPerDirectory) -
isPackedRevision
public boolean isPackedRevision(long revision) -
getPackedBaseRevision
public long getPackedBaseRevision(long revision) -
getNodeOriginFile
-
getTransactionRevisionPrototypeFile
-
getTransactionChangesFile
-
getTransactionRevisionNodeChildrenFile
-
getRevisionFSFile
- Throws:
SVNException
-
getPackOrRevisionFSFile
- Throws:
SVNException
-
getAbsoluteRevisionPath
- Throws:
SVNException
-
getTransactionRevisionNodePropertiesFile
-
getPackedRevPath
- Throws:
SVNException
-
getPackedRevPropsShardPath
- Throws:
SVNException
-
getPackDir
-
getPackFile
-
getManifestFile
-
getRevisionFile
- Throws:
SVNException
-
getMinUnpackedRevFile
-
getTransactionCurrentFile
-
getTransactionCurrentLockFile
-
getConfigFile
-
writeCurrentFile
protected void writeCurrentFile(long revision, String nextNodeID, String nextCopyID) throws SVNException, IOException - Throws:
SVNException
IOException
-
getPackedOffset
- Throws:
SVNException
-
loadConfig
-
ensureRevisionsExists
- Throws:
SVNException
-
getNodeOriginsFromFile
- Throws:
SVNException
-
unlock
private void unlock(String path, String token, String username, boolean breakLock) throws SVNException - Throws:
SVNException
-
lock
private SVNLock lock(String path, String token, String username, String comment, Date expirationDate, long currentRevision, boolean stealLock, boolean isDAVComment) throws SVNException - Throws:
SVNException
-
setLock
- Throws:
SVNException
-
ensureDirExists
-
writeDigestLockFile
private void writeDigestLockFile(SVNLock lock, Collection children, String repositoryPath, boolean isDAVComment) throws SVNException - Throws:
SVNException
-
openAndSeekTransaction
- Throws:
SVNException
-
openAndSeekRevision
- Throws:
SVNException
-
lookupOffsetInIndex
- Throws:
SVNException
-
lookupOffsetInProtoIndex
protected long lookupOffsetInProtoIndex(FSFile file, String txnId, long itemIndex) throws SVNException - Throws:
SVNException
-
parsePlainRepresentation
private Map parsePlainRepresentation(SVNProperties entries, boolean mayContainNulls) throws SVNException - Throws:
SVNException
-
parseRepEntryValue
-
getRevisionTime
- Throws:
SVNException
-
isRepositoryRoot
-
getRevisionPropertiesDbPath
-
getMinUnpackedRevPropPath
-
updateMinUnpackedRevProp
- Throws:
SVNException
-
getMinUnpackedRevProp
- Throws:
SVNException
-
isCompressPackedRevprops
public boolean isCompressPackedRevprops()
-