directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r915126 - in /directory/apacheds/trunk/jdbm/src/main/java/jdbm/recman: BlockIo.java RecordFile.java
Date Tue, 23 Feb 2010 01:33:51 GMT
Author: akarasulu
Date: Tue Feb 23 01:33:50 2010
New Revision: 915126

URL: http://svn.apache.org/viewvc?rev=915126&view=rev
Log:
formatting

Modified:
    directory/apacheds/trunk/jdbm/src/main/java/jdbm/recman/BlockIo.java
    directory/apacheds/trunk/jdbm/src/main/java/jdbm/recman/RecordFile.java

Modified: directory/apacheds/trunk/jdbm/src/main/java/jdbm/recman/BlockIo.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm/src/main/java/jdbm/recman/BlockIo.java?rev=915126&r1=915125&r2=915126&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm/src/main/java/jdbm/recman/BlockIo.java (original)
+++ directory/apacheds/trunk/jdbm/src/main/java/jdbm/recman/BlockIo.java Tue Feb 23 01:33:50
2010
@@ -53,13 +53,13 @@
 
 
 /**
- *  This class wraps a page-sized byte array and provides methods
- *  to read and write data to and from it. The readers and writers
- *  are just the ones that the rest of the toolkit needs, nothing else.
- *  Values written are compatible with java.io routines.
+ * This class wraps a page-sized byte array and provides methods to read and 
+ * write data to and from it. The readers and writers are just the ones that 
+ * the rest of the toolkit needs, nothing else. Values written are compatible 
+ * with java.io routines.
  *
- *  @see java.io.DataInput
- *  @see java.io.DataOutput
+ * @see java.io.DataInput
+ * @see java.io.DataOutput
  */
 public final class BlockIo implements java.io.Externalizable 
 {
@@ -99,7 +99,7 @@
 
     
     /**
-     *  Returns the underlying array
+     * Returns the underlying array
      */
     byte[] getData() 
     {
@@ -108,7 +108,7 @@
 
     
     /**
-     *  Sets the block number. Should only be called by RecordFile.
+     * Sets the block number. Should only be called by RecordFile.
      */
     void setBlockId( long id ) 
     {
@@ -128,7 +128,7 @@
 
     
     /**
-     *  Returns the block number.
+     * Returns the block number.
      */
     long getBlockId() 
     {
@@ -137,7 +137,7 @@
 
     
     /**
-     *  Returns the current view of the block.
+     * Returns the current view of the block.
      */
     public BlockView getView() 
     {
@@ -146,7 +146,7 @@
 
     
     /**
-     *  Sets the current view of the block.
+     * Sets the current view of the block.
      */
     public void setView( BlockView view ) 
     {
@@ -155,7 +155,7 @@
 
     
     /**
-     *  Sets the dirty flag
+     * Sets the dirty flag
      */
     void setDirty() 
     {
@@ -164,7 +164,7 @@
 
     
     /**
-     *  Clears the dirty flag
+     * Clears the dirty flag
      */
     void setClean() 
     {
@@ -173,7 +173,7 @@
 
     
     /**
-     *  Returns true if the dirty flag is set.
+     * Returns true if the dirty flag is set.
      */
     boolean isDirty() 
     {
@@ -182,8 +182,8 @@
 
     
     /**
-     *  Returns true if the block is still dirty with respect to the 
-     *  transaction log.
+     * Returns true if the block is still dirty with respect to the 
+     * transaction log.
      */
     boolean isInTransaction() 
     {
@@ -192,9 +192,9 @@
 
 
     /**
-     *  Increments transaction count for this block, to signal that this
-     *  block is in the log but not yet in the data file. The method also
-     *  takes a snapshot so that the data may be modified in new transactions.
+     * Increments transaction count for this block, to signal that this
+     * block is in the log but not yet in the data file. The method also
+     * takes a snapshot so that the data may be modified in new transactions.
      */
     synchronized void incrementTransactionCount() 
     {
@@ -206,8 +206,8 @@
 
     
     /**
-     *  Decrements transaction count for this block, to signal that this
-     *  block has been written from the log to the data file.
+     * Decrements transaction count for this block, to signal that this
+     * block has been written from the log to the data file.
      */
     synchronized void decrementTransactionCount() 
     {
@@ -220,7 +220,7 @@
     
 
     /**
-     *  Reads a byte from the indicated position
+     * Reads a byte from the indicated position
      */
     public byte readByte( int pos ) 
     {
@@ -229,7 +229,7 @@
     
 
     /**
-     *  Writes a byte to the indicated position
+     * Writes a byte to the indicated position
      */
     public void writeByte( int pos, byte value ) 
     {
@@ -239,7 +239,7 @@
 
     
     /**
-     *  Reads a short from the indicated position
+     * Reads a short from the indicated position
      */
     public short readShort( int pos ) 
     {
@@ -250,7 +250,7 @@
 
     
     /**
-     *  Writes a short to the indicated position
+     * Writes a short to the indicated position
      */
     public void writeShort( int pos, short value ) 
     {
@@ -261,7 +261,7 @@
 
     
     /**
-     *  Reads an int from the indicated position
+     * Reads an int from the indicated position
      */
     public int readInt( int pos ) 
     {
@@ -274,7 +274,7 @@
 
     
     /**
-     *  Writes an int to the indicated position
+     * Writes an int to the indicated position
      */
     public void writeInt( int pos, int value ) 
     {
@@ -287,7 +287,7 @@
 
     
     /**
-     *  Reads a long from the indicated position
+     * Reads a long from the indicated position
      */
     public long readLong( int pos )
     {
@@ -317,7 +317,7 @@
 
     
     /**
-     *  Writes a long to the indicated position
+     * Writes a long to the indicated position
      */
     public void writeLong(int pos, long value) {
         data[pos+0] = (byte)(0xff & (value >> 56));

Modified: directory/apacheds/trunk/jdbm/src/main/java/jdbm/recman/RecordFile.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm/src/main/java/jdbm/recman/RecordFile.java?rev=915126&r1=915125&r2=915126&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm/src/main/java/jdbm/recman/RecordFile.java (original)
+++ directory/apacheds/trunk/jdbm/src/main/java/jdbm/recman/RecordFile.java Tue Feb 23 01:33:50
2010
@@ -89,13 +89,13 @@
 
     
     /**
-     *  Creates a new object on the indicated filename. The file is
-     *  opened in read/write mode.
+     * Creates a new object on the indicated filename. The file is
+     * opened in read/write mode.
      *
-     *  @param fileName the name of the file to open or create, without
-     *         an extension.
-     *  @throws IOException whenever the creation of the underlying
-     *          RandomAccessFile throws it.
+     * @param fileName the name of the file to open or create, without
+     *        an extension.
+     * @throws IOException whenever the creation of the underlying
+     *         RandomAccessFile throws it.
      */
     RecordFile ( String fileName ) throws IOException 
     {
@@ -106,7 +106,7 @@
 
     
     /**
-     *  Returns the file name.
+     * Returns the file name.
      */
     String getFileName() 
     {
@@ -115,8 +115,8 @@
 
     
     /**
-     *  Disables transactions: doesn't sync and doesn't use the
-     *  transaction manager.
+     * Disables transactions: doesn't sync and doesn't use the
+     * transaction manager.
      */
     void disableTransactions() 
     {
@@ -125,12 +125,11 @@
 
     
     /**
-     *  Gets a block from the file. The returned byte array is
-     *  the in-memory copy of the record, and thus can be written
-     *  (and subsequently released with a dirty flag in order to
-     *  write the block back).
+     * Gets a block from the file. The returned byte array is the in-memory 
+     * copy of the record, and thus can be written (and subsequently released 
+     * with a dirty flag in order to write the block back).
      *
-     *  @param blockid The record number to retrieve.
+     * @param blockid The record number to retrieve.
      */
      BlockIo get( long blockid ) throws IOException 
      {
@@ -189,10 +188,10 @@
 
 
     /**
-     *  Releases a block.
+     * Releases a block.
      *
-     *  @param blockid The record number to release.
-     *  @param isDirty If true, the block was modified since the get().
+     * @param blockid The record number to release.
+     * @param isDirty If true, the block was modified since the get().
      */
     void release( long blockid, boolean isDirty ) throws IOException 
     {
@@ -213,9 +212,9 @@
 
     
     /**
-     *  Releases a block.
+     * Releases a block.
      *
-     *  @param block The block to release.
+     * @param block The block to release.
      */
     void release( BlockIo block ) 
     {
@@ -241,9 +240,9 @@
     
 
     /**
-     *  Discards a block (will not write the block even if it's dirty)
+     * Discards a block (will not write the block even if it's dirty)
      *
-     *  @param block The block to discard.
+     * @param block The block to discard.
      */
     void discard( BlockIo block ) 
     {
@@ -255,7 +254,7 @@
 
     
     /**
-     *  Commits the current transaction by flushing all dirty buffers to disk.
+     * Commits the current transaction by flushing all dirty buffers to disk.
      */
     void commit() throws IOException 
     {
@@ -310,7 +309,7 @@
 
     
     /**
-     *  Rollback the current transaction by discarding all dirty buffers
+     * Rollback the current transaction by discarding all dirty buffers
      */
     void rollback() throws IOException 
     {
@@ -335,7 +334,7 @@
 
     
     /**
-     *  Commits and closes file.
+     * Commits and closes file.
      */
     void close() throws IOException 
     {
@@ -386,7 +385,7 @@
 
     
     /**
-     *  Prints contents of a list
+     * Prints contents of a list
      */
     private void showList( Iterator<BlockIo> i ) 
     {
@@ -400,8 +399,8 @@
 
 
     /**
-     *  Returns a new node. The node is retrieved (and removed) from the 
-     *  released list or created new.
+     * Returns a new node. The node is retrieved (and removed) from the 
+     * released list or created new.
      */
     private BlockIo getNewNode( long blockid ) throws IOException 
     {
@@ -424,8 +423,8 @@
     
 
     /**
-     *  Synchronizes a node to disk. This is called by the transaction manager's
-     *  synchronization code.
+     * Synchronizes a node to disk. This is called by the transaction manager's
+     * synchronization code.
      */
     void synch( BlockIo node ) throws IOException 
     {
@@ -440,10 +439,9 @@
 
     
     /**
-     *  Releases a node from the transaction list, if it was sitting
-     *  there.
+     * Releases a node from the transaction list, if it was sitting there.
      *
-     *  @param recycle true if block data can be reused
+     * @param recycle true if block data can be reused
      */
     void releaseFromTransaction( BlockIo node, boolean recycle ) throws IOException 
     {
@@ -455,7 +453,7 @@
     
 
     /**
-     *  Synchronizes the file.
+     * Synchronizes the file.
      */
     void sync() throws IOException 
     {



Mime
View raw message