Class FSTransactionRoot
- java.lang.Object
-
- org.tmatesoft.svn.core.internal.io.fs.FSRoot
-
- org.tmatesoft.svn.core.internal.io.fs.FSTransactionRoot
-
public class FSTransactionRoot extends FSRoot
- Version:
- 1.3
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classFSTransactionRoot.HashRepresentationStream
-
Field Summary
Fields Modifier and Type Field Description private longmyBaseRevisionprivate java.io.FilemyTxnChangesFileprivate intmyTxnFlagsprivate java.lang.StringmyTxnIDprivate java.io.FilemyTxnRevFilestatic intSVN_FS_TXN_CHECK_LOCKSstatic intSVN_FS_TXN_CHECK_OUT_OF_DATENESS-
Fields inherited from class org.tmatesoft.svn.core.internal.io.fs.FSRoot
myRootRevisionNode
-
-
Constructor Summary
Constructors Constructor Description FSTransactionRoot(FSFS owner, java.lang.String txnID, long baseRevision, int flags)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.lang.StringaddKeys(java.lang.String key1, java.lang.String key2)longallocateItemIndex(long offset)static FSTransactionInfobeginTransaction(long baseRevision, int flags, FSFS owner)static FSTransactionInfobeginTransactionForCommit(long baseRevision, SVNProperties revisionProperties, FSFS owner)FSRevisionNodecloneChild(FSRevisionNode parent, java.lang.String parentPath, java.lang.String childName, java.lang.String copyId, boolean isParentCopyRoot)private static java.lang.StringcreatePre15TxnDir(long revision, FSFS owner)FSIDcreateSuccessor(FSID oldId, FSRevisionNode newRevNode, java.lang.String copyId)private static FSTransactionInfocreateTxn(long baseRevision, FSFS owner)private static java.lang.StringcreateTxnDir(long revision, FSFS owner)voiddeleteEntry(FSRevisionNode parent, java.lang.String entryName)private voiddeleteEntryIfMutable(FSID id)java.util.MapgetChangedPaths()FSCopyInheritancegetCopyInheritance(FSParentPath child)java.lang.StringgetNewTxnNodeId()longgetRevision()FSRevisionNodegetRootRevisionNode()java.io.FilegetTransactionChangesFile()java.io.FilegetTransactionRevNodeChildrenFile(FSID id)java.io.FilegetTransactionRevNodePropsFile(FSID id)FSTransactionInfogetTxn()FSRevisionNodegetTxnBaseRootNode()intgetTxnFlags()java.lang.StringgetTxnID()java.io.FilegetWritableTransactionProtoRevFile()voidincrementMergeInfoCount(FSRevisionNode node, long increment)java.lang.String[]readNextIDs()private voidremoveRevisionNode(FSID id)voidsetEntry(FSRevisionNode parentRevNode, java.lang.String entryName, FSID entryId, SVNNodeKind kind)voidsetProplist(FSRevisionNode node, SVNProperties properties)voidsetTxnFlags(int txnFlags)voidstoreL2PIndexEntry(long offset, long itemIndex)voidstoreP2LIndexEntry(FSP2LEntry entry)SVNPropertiesunparseDirEntries(java.util.Map entries)voidwriteChangeEntry(java.io.OutputStream changesFile, FSPathChange pathChange, boolean includeNodeKind)private voidwriteChanges(CountingOutputStream protoFile, java.util.Map changedPaths, boolean includeNodeKind, boolean terminateList)longwriteFinalChangedPathInfo(CountingOutputStream protoFile)voidwriteFinalCurrentFile(long newRevision, java.lang.String startNodeId, java.lang.String startCopyId)FSIDwriteFinalRevision(FSID newId, CountingOutputStream protoFile, long revision, FSID id, java.lang.String startNodeId, java.lang.String startCopyId, java.util.Collection<FSRepresentation> representations, boolean atRoot)private longwriteHashRepresentation(FSRepresentation representation, SVNProperties hashContents, CountingOutputStream protoFile, java.security.MessageDigest digest, FSP2LProtoIndex.ItemType itemType)-
Methods inherited from class org.tmatesoft.svn.core.internal.io.fs.FSRoot
checkNodeKind, detectChanged, fetchAllChanges, fetchRevNodeFromCache, getFileSize, getFileStreamForPath, getOwner, getRevisionNode, isUseLogAddressing, openPath, putRevNodeToCache, removeRevNodeFromCache, writeIndexData
-
-
-
-
Field Detail
-
SVN_FS_TXN_CHECK_OUT_OF_DATENESS
public static final int SVN_FS_TXN_CHECK_OUT_OF_DATENESS
- See Also:
- Constant Field Values
-
SVN_FS_TXN_CHECK_LOCKS
public static final int SVN_FS_TXN_CHECK_LOCKS
- See Also:
- Constant Field Values
-
myTxnID
private java.lang.String myTxnID
-
myTxnFlags
private int myTxnFlags
-
myTxnChangesFile
private java.io.File myTxnChangesFile
-
myTxnRevFile
private java.io.File myTxnRevFile
-
myBaseRevision
private long myBaseRevision
-
-
Constructor Detail
-
FSTransactionRoot
public FSTransactionRoot(FSFS owner, java.lang.String txnID, long baseRevision, int flags)
-
-
Method Detail
-
getRevision
public long getRevision()
- Specified by:
getRevisionin classFSRoot
-
getCopyInheritance
public FSCopyInheritance getCopyInheritance(FSParentPath child) throws SVNException
- Specified by:
getCopyInheritancein classFSRoot- Throws:
SVNException
-
getRootRevisionNode
public FSRevisionNode getRootRevisionNode() throws SVNException
- Specified by:
getRootRevisionNodein classFSRoot- Throws:
SVNException
-
getTxnBaseRootNode
public FSRevisionNode getTxnBaseRootNode() throws SVNException
- Throws:
SVNException
-
getTxn
public FSTransactionInfo getTxn() throws SVNException
- Throws:
SVNException
-
getChangedPaths
public java.util.Map getChangedPaths() throws SVNException- Specified by:
getChangedPathsin classFSRoot- Throws:
SVNException
-
getTxnFlags
public int getTxnFlags()
-
setTxnFlags
public void setTxnFlags(int txnFlags)
-
getTxnID
public java.lang.String getTxnID()
-
unparseDirEntries
public SVNProperties unparseDirEntries(java.util.Map entries)
-
beginTransactionForCommit
public static FSTransactionInfo beginTransactionForCommit(long baseRevision, SVNProperties revisionProperties, FSFS owner) throws SVNException
- Throws:
SVNException
-
beginTransaction
public static FSTransactionInfo beginTransaction(long baseRevision, int flags, FSFS owner) throws SVNException
- Throws:
SVNException
-
createTxn
private static FSTransactionInfo createTxn(long baseRevision, FSFS owner) throws SVNException
- Throws:
SVNException
-
createTxnDir
private static java.lang.String createTxnDir(long revision, FSFS owner) throws SVNException- Throws:
SVNException
-
createPre15TxnDir
private static java.lang.String createPre15TxnDir(long revision, FSFS owner) throws SVNException- Throws:
SVNException
-
deleteEntry
public void deleteEntry(FSRevisionNode parent, java.lang.String entryName) throws SVNException
- Throws:
SVNException
-
incrementMergeInfoCount
public void incrementMergeInfoCount(FSRevisionNode node, long increment) throws SVNException
- Throws:
SVNException
-
deleteEntryIfMutable
private void deleteEntryIfMutable(FSID id) throws SVNException
- Throws:
SVNException
-
removeRevisionNode
private void removeRevisionNode(FSID id) throws SVNException
- Throws:
SVNException
-
setProplist
public void setProplist(FSRevisionNode node, SVNProperties properties) throws SVNException
- Throws:
SVNException
-
createSuccessor
public FSID createSuccessor(FSID oldId, FSRevisionNode newRevNode, java.lang.String copyId) throws SVNException
- Throws:
SVNException
-
setEntry
public void setEntry(FSRevisionNode parentRevNode, java.lang.String entryName, FSID entryId, SVNNodeKind kind) throws SVNException
- Throws:
SVNException
-
writeChangeEntry
public void writeChangeEntry(java.io.OutputStream changesFile, FSPathChange pathChange, boolean includeNodeKind) throws SVNException, java.io.IOException- Throws:
SVNExceptionjava.io.IOException
-
writeFinalChangedPathInfo
public long writeFinalChangedPathInfo(CountingOutputStream protoFile) throws SVNException, java.io.IOException
- Throws:
SVNExceptionjava.io.IOException
-
writeChanges
private void writeChanges(CountingOutputStream protoFile, java.util.Map changedPaths, boolean includeNodeKind, boolean terminateList) throws SVNException, java.io.IOException
- Throws:
SVNExceptionjava.io.IOException
-
readNextIDs
public java.lang.String[] readNextIDs() throws SVNException- Throws:
SVNException
-
writeFinalCurrentFile
public void writeFinalCurrentFile(long newRevision, java.lang.String startNodeId, java.lang.String startCopyId) throws SVNException, java.io.IOException- Throws:
SVNExceptionjava.io.IOException
-
writeFinalRevision
public FSID writeFinalRevision(FSID newId, CountingOutputStream protoFile, long revision, FSID id, java.lang.String startNodeId, java.lang.String startCopyId, java.util.Collection<FSRepresentation> representations, boolean atRoot) throws SVNException, java.io.IOException
- Throws:
SVNExceptionjava.io.IOException
-
cloneChild
public FSRevisionNode cloneChild(FSRevisionNode parent, java.lang.String parentPath, java.lang.String childName, java.lang.String copyId, boolean isParentCopyRoot) throws SVNException
- Throws:
SVNException
-
getTransactionRevNodePropsFile
public java.io.File getTransactionRevNodePropsFile(FSID id)
-
getTransactionRevNodeChildrenFile
public java.io.File getTransactionRevNodeChildrenFile(FSID id)
-
getWritableTransactionProtoRevFile
public java.io.File getWritableTransactionProtoRevFile() throws SVNException- Throws:
SVNException
-
getTransactionChangesFile
public java.io.File getTransactionChangesFile() throws SVNException- Throws:
SVNException
-
getNewTxnNodeId
public java.lang.String getNewTxnNodeId() throws SVNException- Throws:
SVNException
-
allocateItemIndex
public long allocateItemIndex(long offset) throws SVNException- Throws:
SVNException
-
storeL2PIndexEntry
public void storeL2PIndexEntry(long offset, long itemIndex) throws SVNException- Throws:
SVNException
-
storeP2LIndexEntry
public void storeP2LIndexEntry(FSP2LEntry entry) throws SVNException
- Throws:
SVNException
-
writeHashRepresentation
private long writeHashRepresentation(FSRepresentation representation, SVNProperties hashContents, CountingOutputStream protoFile, java.security.MessageDigest digest, FSP2LProtoIndex.ItemType itemType) throws java.io.IOException, SVNException
- Throws:
java.io.IOExceptionSVNException
-
addKeys
private static java.lang.String addKeys(java.lang.String key1, java.lang.String key2)
-
-