Skip to content

Commit

Permalink
Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalstain committed Nov 20, 2011
1 parent 2131d45 commit 604abdf
Showing 1 changed file with 23 additions and 1 deletion.
Expand Up @@ -210,7 +210,7 @@ else if ( c == LOG2 )

instantiateCorrectWriteBuffer();
}

private void renameIfExists( String fileName ) throws IOException
{
if ( fileSystem.fileExists( fileName ) )
Expand Down Expand Up @@ -1184,6 +1184,17 @@ public synchronized Pair<Integer, Long> getMasterIdForCommittedTransaction( long
}
}

/**
* Return a file channel over the log file for {@code version} positioned
* at {@code position}. If the log version is the current one all
* committed transactions are guaranteed to be present but nothing that
* hasn't been flushed yet.
*
* @param version The version of the log to get a channel over
* @param position The position to which to set the channel
* @return The channel
* @throws IOException If an IO error occurs when reading the log file
*/
public ReadableByteChannel getLogicalLogOrMyselfCommitted( long version, long position )
throws IOException
{
Expand All @@ -1208,6 +1219,17 @@ public ReadableByteChannel getLogicalLogOrMyselfCommitted( long version, long po
}
}

/**
* Return a file channel over the log file for {@code version} positioned
* at {@code position}. If the log version is the current one all
* content is guaranteed to be present, including content just in the write
* buffer.
*
* @param version The version of the log to get a channel over
* @param position The position to which to set the channel
* @return The channel
* @throws IOException If an IO error occurs when reading the log file
*/
private ReadableByteChannel getLogicalLogOrMyselfPrepared( long version, long position )
throws IOException
{
Expand Down

0 comments on commit 604abdf

Please sign in to comment.