Class FSFS
java.lang.Object
org.tmatesoft.svn.core.internal.io.fs.FSFS
- Version:
- 1.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final Stringstatic final intstatic final intstatic final booleanstatic final Stringstatic final Stringprivate static final Stringprivate static longstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final Stringstatic final Stringstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final Stringstatic final Stringprivate longprivate booleanprivate SVNConfigFileprivate Fileprivate intprivate Fileprivate Fileprivate Stringprivate Fileprivate booleanprivate booleanprivate longprivate Fileprivate longprivate Fileprivate longprivate longprivate Fileprivate longprivate IFSRepresentationCacheManagerprivate intprivate Fileprivate Fileprivate Fileprivate Fileprivate Fileprivate longprivate Fileprivate Fileprivate Fileprivate Fileprivate booleanprivate Stringprivate Fileprivate Fileprivate longstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate byte[]applyDeltaFromFSFile(FSFile revisionFile, int deltaSize, InputStream baseStream, StringBuilder outputChecksum) voidchangeTransactionProperties(String txnId, SVNProperties txnProperties) voidclose()compoundMetaProperties(long revision) voidcreateNewTxnNodeRevisionFromRevision(String txnID, FSRevisionNode sourceNode) createRevisionRoot(long revision) private static longdecodeUncompressedSize(InputStream inputStream, int lengthRecordSize, int[] outputBytesRead) voiddeleteLock(SVNLock lock) private booleanensureDirExists(File dir, boolean create) private voidensureRevisionsExists(long revision) fetchLockFromDigestFile(File digestFile, String repositoryPath, Collection children) static FilefindRepositoryRoot(File path) static StringfindRepositoryRoot(String host, String path) protected FilegetAbsoluteRevisionPath(long revision) longlonggetDatedRevision(Date date) intstatic longlonggetDeletedRevision(String path, long startRev, long endRev) getDigestFileFromRepositoryPath(String repositoryPath) getDigestFromRepositoryPath(String repositoryPath) getDirContents(FSRevisionNode revNode) longgetLockHelper(String repositoryPath, boolean haveWriteLock) protected FilegetManifestFile(long revision) longlongprotected FilelonggetNewRevisionFile(long newRevision) getNewRevisionPropertiesFile(long newRevision) getNextIDsFile(String txnID) String[]getNodeOrigin(String nodeID) protected FilegetNodeOriginFile(String nodeID) private SVNPropertiesgetNodeOriginsFromFile(String nodeID) longprotected FilegetPackDir(long revision) longgetPackedBaseRevision(long revision) protected longgetPackedOffset(long revision) protected FilegetPackedRevPath(long revision, String kind) private FilegetPackedRevPropFile(long revision) protected FilegetPackedRevPropsShardPath(long revision) protected FilegetPackFile(long revision) protected FSFilegetPackOrRevisionFSFile(long revision) getPreviousLocation(String path, long revision, long[] appearedRevision) getProperties(FSRevisionNode revNode) intprotected FilegetRevisionFile(long revision) protected FSFilegetRevisionFSFile(long revision) getRevisionNode(FSID id) getRevisionProperties(long revision) getRevisionPropertiesFile(long revision, boolean returnMissing) private DategetRevisionTime(long revision) protected longprotected FSFilegetTransactionChangesFile(String txnID) protected Fileprotected FilegetTransactionDir(String txnID) getTransactionProperties(String txnID) getTransactionProtoRevFile(String txnID) protected FSFileprotected FSFileprotected FSFilegetUUID()longbooleanbooleanbooleanisPackedRevision(long revision) private booleanisPackedRevisionProperties(long revision) private static booleanisRepositoryRoot(File candidatePath) booleanbooleanprivate SVNConfigFileprivate SVNLocklock(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 longlookupOffsetInIndex(FSFile file, long revision, long itemIndex) protected longlookupOffsetInProtoIndex(FSFile file, String txnId, long itemIndex) voidopen()private FSFileopenAndSeekRevision(long revision, long itemIndex) private FSFilevoidopenDB()voidvoidopenRoot()private MapparsePlainRepresentation(SVNProperties entries, boolean mayContainNulls) private SVNPropertiesparseProperties(FSRepresentation txtRep) private byte[]parseRawDeltaProperties(FSRepresentation txtRep, StringBuilder outputChecksum) private FSEntryparseRepEntryValue(String name, String value) voidvoidputTxnRevisionNode(FSID id, FSRevisionNode revNode) intprivate static longreadNumber(BufferedReader reader) private static longreadNumber(InputStream inputStream) voidreadOptions(FSFile formatFile, int formatNumber) private SVNPropertiesreadPackedRevisionProperties(long revision) private static SVNPropertiesreadProperties(byte[] propsData) private SVNPropertiesreadRevisionProperties(long revision) static voidsetDefaultMaxFilesPerDirectory(long maxFilesPerDirectory) voidsetHooksEnabled(boolean enabled) private voidvoidsetNodeOrigin(String nodeID, FSID nodeRevisionID) voidsetRevisionProperty(long revision, String propertyName, SVNPropertyValue propertyValue) voidsetTransactionProperty(String txnID, String name, SVNPropertyValue propertyValue) voidvoidsetYoungestRevisionCache(long revision) booleanprivate voidvoidunlockPath(String path, String token, String username, boolean breakLock, boolean enableHooks) voidvoidupgrade()private voidverifyBlockSize(long blockSize, long itemSize, String name) voidwalkDigestFiles(File digestFile, ISVNLockHandler getLocksHandler, boolean haveWriteLock) protected voidwriteCurrentFile(long revision, String nextNodeID, String nextCopyID) voidwriteDBFormat(int format, long maxFilesPerDir, boolean overwrite) private voidwriteDigestLockFile(SVNLock lock, Collection children, String repositoryPath, boolean isDAVComment) voidwriteNextIDs(String txnID, String nodeID, String copyID) voidwriteTxnNodeRevision(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:
SVNExceptionIOException
-
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:
IOExceptionSVNException
-
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:
SVNExceptionIOException
-
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()
-