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 class
FSTransactionRoot.HashRepresentationStream
-
Field Summary
Fields Modifier and Type Field Description private long
myBaseRevision
private java.io.File
myTxnChangesFile
private int
myTxnFlags
private java.lang.String
myTxnID
private java.io.File
myTxnRevFile
static int
SVN_FS_TXN_CHECK_LOCKS
static int
SVN_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.String
addKeys(java.lang.String key1, java.lang.String key2)
long
allocateItemIndex(long offset)
static FSTransactionInfo
beginTransaction(long baseRevision, int flags, FSFS owner)
static FSTransactionInfo
beginTransactionForCommit(long baseRevision, SVNProperties revisionProperties, FSFS owner)
FSRevisionNode
cloneChild(FSRevisionNode parent, java.lang.String parentPath, java.lang.String childName, java.lang.String copyId, boolean isParentCopyRoot)
private static java.lang.String
createPre15TxnDir(long revision, FSFS owner)
FSID
createSuccessor(FSID oldId, FSRevisionNode newRevNode, java.lang.String copyId)
private static FSTransactionInfo
createTxn(long baseRevision, FSFS owner)
private static java.lang.String
createTxnDir(long revision, FSFS owner)
void
deleteEntry(FSRevisionNode parent, java.lang.String entryName)
private void
deleteEntryIfMutable(FSID id)
java.util.Map
getChangedPaths()
FSCopyInheritance
getCopyInheritance(FSParentPath child)
java.lang.String
getNewTxnNodeId()
long
getRevision()
FSRevisionNode
getRootRevisionNode()
java.io.File
getTransactionChangesFile()
java.io.File
getTransactionRevNodeChildrenFile(FSID id)
java.io.File
getTransactionRevNodePropsFile(FSID id)
FSTransactionInfo
getTxn()
FSRevisionNode
getTxnBaseRootNode()
int
getTxnFlags()
java.lang.String
getTxnID()
java.io.File
getWritableTransactionProtoRevFile()
void
incrementMergeInfoCount(FSRevisionNode node, long increment)
java.lang.String[]
readNextIDs()
private void
removeRevisionNode(FSID id)
void
setEntry(FSRevisionNode parentRevNode, java.lang.String entryName, FSID entryId, SVNNodeKind kind)
void
setProplist(FSRevisionNode node, SVNProperties properties)
void
setTxnFlags(int txnFlags)
void
storeL2PIndexEntry(long offset, long itemIndex)
void
storeP2LIndexEntry(FSP2LEntry entry)
SVNProperties
unparseDirEntries(java.util.Map entries)
void
writeChangeEntry(java.io.OutputStream changesFile, FSPathChange pathChange, boolean includeNodeKind)
private void
writeChanges(CountingOutputStream protoFile, java.util.Map changedPaths, boolean includeNodeKind, boolean terminateList)
long
writeFinalChangedPathInfo(CountingOutputStream protoFile)
void
writeFinalCurrentFile(long newRevision, java.lang.String startNodeId, java.lang.String startCopyId)
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)
private long
writeHashRepresentation(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:
getRevision
in classFSRoot
-
getCopyInheritance
public FSCopyInheritance getCopyInheritance(FSParentPath child) throws SVNException
- Specified by:
getCopyInheritance
in classFSRoot
- Throws:
SVNException
-
getRootRevisionNode
public FSRevisionNode getRootRevisionNode() throws SVNException
- Specified by:
getRootRevisionNode
in 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:
getChangedPaths
in 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:
SVNException
java.io.IOException
-
writeFinalChangedPathInfo
public long writeFinalChangedPathInfo(CountingOutputStream protoFile) throws SVNException, java.io.IOException
- Throws:
SVNException
java.io.IOException
-
writeChanges
private void writeChanges(CountingOutputStream protoFile, java.util.Map changedPaths, boolean includeNodeKind, boolean terminateList) throws SVNException, java.io.IOException
- Throws:
SVNException
java.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:
SVNException
java.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:
SVNException
java.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.IOException
SVNException
-
addKeys
private static java.lang.String addKeys(java.lang.String key1, java.lang.String key2)
-
-