From: <tho...@us...> - 2010-11-11 14:39:50
|
Revision: 3935 http://bigdata.svn.sourceforge.net/bigdata/?rev=3935&view=rev Author: thompsonbry Date: 2010-11-11 14:39:43 +0000 (Thu, 11 Nov 2010) Log Message: ----------- Removed three files which were not in use (Config, ICommitCallback, DirectOutputStream). Removed several methods from IStore which were not in use. Updated RWStore to remove the concept of a persistent session and updated FixedAllocator to always act without reference to the concept of a persistent session. Modified Paths: -------------- branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/FixedAllocator.java branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/IStore.java branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/RWStore.java Removed Paths: ------------- branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/Config.java branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/DirectOutputStream.java branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/ICommitCallback.java Deleted: branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/Config.java =================================================================== --- branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/Config.java 2010-11-11 14:07:22 UTC (rev 3934) +++ branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/Config.java 2010-11-11 14:39:43 UTC (rev 3935) @@ -1,41 +0,0 @@ -/** - -Copyright (C) SYSTAP, LLC 2006-2010. All rights reserved. - -Contact: - SYSTAP, LLC - 4501 Tower Road - Greensboro, NC 27410 - lic...@bi... - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; version 2 of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -package com.bigdata.rwstore; - -/************************************************************************************************ - * This is a bit of a cludge, but somehow we need to let the stores know whether they need - * a locak file in this context - typically one is not needed in a web-application context. - **/ -public final class Config { - static boolean m_lockFileNeeded = true; - - public static boolean isLockFileNeeded() { - return m_lockFileNeeded; - } - - public static void setLockFileNeeded(boolean isNeeded) { - m_lockFileNeeded = isNeeded; - } -} Deleted: branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/DirectOutputStream.java =================================================================== --- branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/DirectOutputStream.java 2010-11-11 14:07:22 UTC (rev 3934) +++ branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/DirectOutputStream.java 2010-11-11 14:39:43 UTC (rev 3935) @@ -1,57 +0,0 @@ -/** - -Copyright (C) SYSTAP, LLC 2006-2010. All rights reserved. - -Contact: - SYSTAP, LLC - 4501 Tower Road - Greensboro, NC 27410 - lic...@bi... - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; version 2 of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -package com.bigdata.rwstore; - -import java.io.*; - -public class DirectOutputStream extends ByteArrayOutputStream { - - public DirectOutputStream(int size) { - super(size); - } - - public DirectOutputStream() { - } - - public void directWrite(RandomAccessFile file, int size) throws IOException { - file.write(buf, 0, size); - } - - public void directWrite(RandomAccessFile outfile) throws java.io.IOException { - outfile.write(buf, 0, size()); - } - - //------------------------------------------------------------- - - public void directWrite(java.io.OutputStream outstr) throws java.io.IOException { - outstr.write(buf, 0, size()); - } - - //------------------------------------------------------------- - - public void directWrite(java.io.OutputStream outstr, int outSize) throws java.io.IOException { - outstr.write(buf, 0, outSize); - } -} \ No newline at end of file Modified: branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/FixedAllocator.java =================================================================== --- branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/FixedAllocator.java 2010-11-11 14:07:22 UTC (rev 3934) +++ branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/FixedAllocator.java 2010-11-11 14:39:43 UTC (rev 3935) @@ -175,9 +175,9 @@ str.writeInt(block.m_bits[i]); } - if (!m_store.isSessionPreserved()) { +// if (!m_store.isSessionPreserved()) { block.m_transients = block.m_bits.clone(); - } +// } /** * If this allocator is shadowed then copy the new committed @@ -187,8 +187,8 @@ assert block.m_saveCommit != null; block.m_saveCommit = block.m_bits.clone(); - } else if (m_store.isSessionPreserved()) { - block.m_commit = block.m_transients.clone(); +// } else if (m_store.isSessionPreserved()) { +// block.m_commit = block.m_transients.clone(); } else { block.m_commit = block.m_bits.clone(); } @@ -201,19 +201,19 @@ str.close(); } - if (!m_store.isSessionPreserved()) { - m_freeBits += m_freeTransients; +// if (!m_store.isSessionPreserved()) { + m_freeBits += m_freeTransients; - // Handle re-addition to free list once transient frees are - // added back - if ((m_freeTransients == m_freeBits) && (m_freeTransients != 0)) { - m_freeList.add(this); - m_freeWaiting = false; - } - - m_freeTransients = 0; + // Handle re-addition to free list once transient frees are + // added back + if ((m_freeTransients == m_freeBits) && (m_freeTransients != 0)) { + m_freeList.add(this); + m_freeWaiting = false; } + m_freeTransients = 0; +// } + return buf; } catch (IOException e) { throw new StorageTerminalError("Error on write", e); Deleted: branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/ICommitCallback.java =================================================================== --- branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/ICommitCallback.java 2010-11-11 14:07:22 UTC (rev 3934) +++ branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/ICommitCallback.java 2010-11-11 14:39:43 UTC (rev 3935) @@ -1,29 +0,0 @@ -/** - -Copyright (C) SYSTAP, LLC 2006-2010. All rights reserved. - -Contact: - SYSTAP, LLC - 4501 Tower Road - Greensboro, NC 27410 - lic...@bi... - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; version 2 of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -package com.bigdata.rwstore; - -public interface ICommitCallback { - public void CommitCallback(); -} Modified: branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/IStore.java =================================================================== --- branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/IStore.java 2010-11-11 14:07:22 UTC (rev 3934) +++ branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/IStore.java 2010-11-11 14:39:43 UTC (rev 3935) @@ -26,258 +26,109 @@ import java.io.File; - -/************************************************************************************************ - * The IStore interface provides persistent file-backed storage. - * It can be used as a standalone utility, but has been primarily designed - * to support the Generic Persistent Object model. - **/ +/** + * The IStore interface provides persistent file-backed storage. It can be used + * as a standalone utility, but has been primarily designed to support the + * Generic Persistent Object model. + */ public interface IStore { - -// /********************************************************************* -// * Provides a link to an object to carryout any additional data updates -// * before the physical commit - used by the GPO object managers for example -// **/ -// public static interface ICommitCallback { -// public void commitCallback(); -// public void commitComplete(); -// } - public boolean isLongAddress(); - // /************************************************************** -// * Registers a commitCallback object. -// * -// * <p>This method may be called more than once, there maybe several -// * such objects.</p> -// * -// * <p>It is used by the GPO object managers to allow them to store -// * index information and other updated data after a commit -// * cycle.</p> +// * called when used as a server, returns whether facility is enabled // **/ -// public void setCommitCallback(ICommitCallback callback); - - /************************************************************** - * called when used as a server, returns whether facility is enabled - **/ - public boolean preserveSessionData(); +// public boolean preserveSessionData(); -// /************************************************************** -// * the filestore may be explicitly limited -// * - useful when testing, it is all too easy to fill a disk -// * -// * <p>the default is 1GB</p> -// * -// * @param size the new max filesize >> 8 -// **/ -// public void setMaxFileSize(int size); - - /************************************************************** - * the lowest level interface should normally not be used directly. + /** + * Writes data on the store. * * @return the allocated address **/ public long alloc(byte buf[], int size, IAllocationContext context); - - /************************************************************** - * frees allocated storage - * - * @param addr the storage address to be freed - **/ + + /** + * Frees allocated storage + * + * @param addr + * the storage address to be freed + */ public void free(long addr, int size); // /************************************************************** -// * Reallocates storage +// * Odd method needed by PSInputStream to fetch data of unknown +// * size into a buffer // * -// * @param oldAddr is the existing address to be freed -// * @return a stream to write to the store +// * <p>Both RWStore and WOStore store data in either explicit or +// * implicit block sizes.</p> +// * +// * @param addr the address of the data in the IStore +// * buf the buffer to store the data in +// * +// * @returns the size of the data copied // **/ -// public PSOutputStream realloc(long oldAddr, int size); -// -// public PSInputStream getData(long value); +// public int getDataSize(long addr, byte buf[]); - /************************************************************** - * Odd method needed by PSInputStream to fetch data of unknown - * size into a buffer - * - * <p>Both RWStore and WOStore store data in either explicit or - * implicit block sizes.</p> - * - * @param addr the address of the data in the IStore - * buf the buffer to store the data in - * - * &returns the size of the data copied - **/ - public int getDataSize(long addr, byte buf[]); - + /** + * Read data of a known size from the store. + * + * @param l + * the address of the data + * @param buf + * the buffer of the size required! + */ + public void getData(long l, byte buf[]); + // /************************************************************** -// * if the caller can be sure of the size, then a more efficient allocation can be made, -// * but the corresponding getData call must also be made with an explicit size. +// * Given a physical address (byte offset on the store), return true +// * if that address could be managed by an allocated block. // * -// * <p>this should not generally be used - but specific objects can exploit this -// * interface for storing special purpose fixed size structures.</p> -// * -// * <p>Note that the Write Once Store will not automatically preserve historical -// * address information if explicit buffers are used.</p> +// * @param a the storage address to be tested // **/ -// public long realloc(long oldaddr, int oldsze, byte buf[]); - - /************************************************************** - * Used to retrieve data of a known size, typically after having - * been allocated using fixed size reallocation. - * - * @param l the address of the data - * @param buf the buffer of the size required! - **/ - public void getData(long l, byte buf[]); - - /************************************************************** - * a debug method that verifies a storage address as active - * - * @param a the storage address to be tested - **/ - public boolean verify(long a); +// public boolean verify(long a); - /*************************************************************************************** - * this supports the core functionality of a WormStore, other stores should return - * zero, indicating no previous versions available - **/ - public long getPreviousAddress(long addr); - - /*************************************************************************************** - * @return whether the address given is a native IStore address - **/ - public boolean isNativeAddress(long value); - -// /*************************************************************************************** -// * the root address enables the store to be self contained! -// * Along with the allocation information to manage the data, the store by default -// * can store and provide a root address to data needed to initialize the system. -// * -// * @param addr the address to be stored as "root" -// **/ -// public void setRootAddr(long addr); -// -// /*************************************************************************************** -// * @return the root address previously set -// **/ -// public long getRootAddr(); +// /** +// * The {@link RWStore} always generates negative address values. +// * +// * @return whether the address given is a native IStore address +// */ +// public boolean isNativeAddress(long value); -// /*************************************************************************************** -// * A utility equivalent to : store.getData(store.getRootAddr()); +// /** +// * useful in debug situations // * -// * @return an InputStream for any data stored at the root address -// **/ -// public PSInputStream getRoot(); +// * @return store allocation and usage statistics +// */ +// public String getStats(boolean full); -// /*************************************************************************************** -// * clears all data from the store. -// **/ -// public void clear(); - - -// /*************************************************************************************** -// * increments the current nested transaction level -// **/ -// public void startTransaction(); -// -// /*************************************************************************************** -// * decrements the current nested transaction level, if the value is reduced to zero then -// * a physical commit is carried out, if the level is already zero, a runtime exception -// * is thrown. -// **/ -// public void commitTransaction(); -// -// /*************************************************************************************** -// * if the transaction level is greater than one, all modifcations are undone, and the -// * transaction level set to zero. -// **/ -// public void rollbackTransaction(); - - /*************************************************************************************** - * does what it says - **/ - public String getVersionString(); - - /*************************************************************************************** - * useful in debug situations - * - * @return store allocation and usage statistics - **/ - public String getStats(boolean full); - + /** + * Close the file. + */ public void close(); - /*************************************************************************************** - * Needed by PSOutputStream for BLOB buffer chaining. - **/ - public int bufferChainOffset(); - -// public void absoluteWriteLong(long addr, int threshold, long value); -// -// /*************************************************************************************** +// /** // * Needed by PSOutputStream for BLOB buffer chaining. -// **/ -// public void absoluteWriteInt(int addr, int offset, int value); -// -// /*************************************************************************************** -// * Needed to free Blob chains. -// **/ -// public int absoluteReadInt(int addr, int offset); -// -// /*************************************************************************************** -// * Needed to free Blob chains. -// **/ -// public int absoluteReadLong(long addr, int offset); - -// /*************************************************************************************** -// * copies the store to a new file, this is not necessarily a byte for byte copy -// * since the store could write only consolidated data - particulalry relevant for the -// * Write Once store. -// * -// * @param filename specifies the file to be copied to. -// **/ -// public void backup(String filename) throws FileNotFoundException, IOException; -// -// /*************************************************************************************** -// * copies the store to a new file, this is not necessarily a byte for byte copy -// * since the store could write only consolidated data - particulalry relevant for the -// * Write Once store. -// * -// * @param outstr specifies stream to be copied to. -// **/ -// public void backup(OutputStream outstr) throws IOException; -// -// /*************************************************************************************** -// * useful in deployed web services to be able to restore a previously backed-up -// * store. Can also be useful to copy databases, for example, when running -// * a test system that can be simply restored to a backup extracted from a live system. -// * -// * @param instr specifies stream to be restored from. -// **/ -// public void restore(InputStream instr) throws IOException; +// */ +// public int bufferChainOffset(); - /********************************************************************************************* - * Retrieves store file. - * Can be used to delete the store after the IStore has been released - * @return the File object - **/ + /** + * Retrieves store file. Can be used to delete the store after the IStore + * has been released + * + * @return the File object + */ public File getStoreFile(); -// public void absoluteWriteAddress(long addr, int threshold, long addr2); - - public int getAddressSize(); - /** - * Called by the PSOutputStream to register the header bloc of a blob. The store - * must return a new address that is used to retrieve the blob header. This double - * indirection is required to be able to manage the blobs, since the blob header - * itself is of variable size and is handled by the standard FixedAllocators in the - * RWStore. For a WORM implementation the address of the blob header can be returned - * directly + * Called by the PSOutputStream to register the header block of a blob. The + * store must return a new address that is used to retrieve the blob header. + * This double indirection is required to be able to manage the blobs, since + * the blob header itself is of variable size and is handled by the standard + * FixedAllocators in the RWStore. * * @param addr - * @return + * The address of the header block of the blob. + * + * @return The */ public int registerBlob(int addr); + } Modified: branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/RWStore.java =================================================================== --- branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/RWStore.java 2010-11-11 14:07:22 UTC (rev 3934) +++ branches/JOURNAL_HA_BRANCH/bigdata/src/java/com/bigdata/rwstore/RWStore.java 2010-11-11 14:39:43 UTC (rev 3935) @@ -36,10 +36,8 @@ import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; -import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; @@ -300,24 +298,20 @@ // protected int m_transactionCount; // private boolean m_committing; - /** - * When <code>true</code> the allocations will not actually be recycled - * until after a store restart. When <code>false</code>, the allocations are - * recycled once they satisfy the history retention requirement. - * - * FIXME Should this go away or be raised as an option for unlimited - * retention until restart? - */ - private boolean m_preserveSession = false; +// /** +// * When <code>true</code> the allocations will not actually be recycled +// * until after a store restart. When <code>false</code>, the allocations are +// * recycled once they satisfy the history retention requirement. +// */ +// private boolean m_preserveSession = false; // private boolean m_readOnly; - /** - * lists of total alloc blocks. - * - * @todo examine concurrency and lock usage for {@link #m_alloc}, which is - * used by {@link #getStats(boolean)}, and the rest of these lists as - * well. - */ + /** + * lists of total alloc blocks. + * + * @todo examine concurrency and lock usage for {@link #m_alloc} and the + * rest of these lists. + */ private final ArrayList<Allocator> m_allocs; /** lists of free alloc blocks. */ @@ -1295,46 +1289,46 @@ return out.toString(); } - /** - * FIXME: This method is not currently used with BigData, if needed then - * the address mangling needs re-working - */ - public int getDataSize(long addr, byte buf[]) { - throw new UnsupportedOperationException(); - -// synchronized (this) { -// m_writes.flush(); -// -// if (addr == 0) { -// return 0; -// } -// -// try { -// int size = addr2Size((int) addr); -// synchronized (m_raf) { -//// m_raf.seek(physicalAddress((int) addr)); -//// m_raf.readFully(buf, 0, size); -// m_raf.getChannel().read(ByteBuffer.wrap(buf, 0, size), physicalAddress((int) addr)); -// } -// -// return size; -// } catch (IOException e) { -// throw new StorageTerminalError("Unable to read data", e); -// } -// } - } +// /** +// * FIXME: This method is not currently used with BigData, if needed then +// * the address mangling needs re-working +// */ +// public int getDataSize(long addr, byte buf[]) { +// throw new UnsupportedOperationException(); +// +//// synchronized (this) { +//// m_writes.flush(); +//// +//// if (addr == 0) { +//// return 0; +//// } +//// +//// try { +//// int size = addr2Size((int) addr); +//// synchronized (m_raf) { +////// m_raf.seek(physicalAddress((int) addr)); +////// m_raf.readFully(buf, 0, size); +//// m_raf.getChannel().read(ByteBuffer.wrap(buf, 0, size), physicalAddress((int) addr)); +//// } +//// +//// return size; +//// } catch (IOException e) { +//// throw new StorageTerminalError("Unable to read data", e); +//// } +//// } +// } - /** - * Always returns ZERO (0L). - * <p> - * This is intended to support the core functionality of a WormStore, other - * stores should return zero, indicating no previous versions available - */ - public long getPreviousAddress(final long laddr) { - - return 0; - - } +// /** +// * Always returns ZERO (0L). +// * <p> +// * This is intended to support the core functionality of a WormStore, other +// * stores should return zero, indicating no previous versions available +// */ +// public long getPreviousAddress(final long laddr) { +// +// return 0; +// +// } public void free(final long laddr, final int sze) { @@ -1795,12 +1789,12 @@ } } - static final float s_version = 3.0f; +// static final float s_version = 3.0f; +// +// public String getVersionString() { +// return "RWStore " + s_version; +// } - public String getVersionString() { - return "RWStore " + s_version; - } - public void commitChanges(final Journal journal) { assertOpen(); checkCoreAllocations(); @@ -2361,35 +2355,35 @@ return -1; } - // -------------------------------------------------------------------------------------- - private String allocListStats(final List<Allocator> list, final AtomicLong counter) { - final StringBuffer stats = new StringBuffer(); - final Iterator<Allocator> iter = list.iterator(); - while (iter.hasNext()) { - stats.append(iter.next().getStats(counter)); - } - - return stats.toString(); - } - - public String getStats(final boolean full) { - - final AtomicLong counter = new AtomicLong(); - - final StringBuilder sb = new StringBuilder("FileSize : " + m_fileSize - + " allocated : " + m_nextAllocation + "\r\n"); - - if (full) { - - sb.append(allocListStats(m_allocs, counter)); - - sb.append("Allocated : " + counter); - - } - - return sb.toString(); - - } +// // -------------------------------------------------------------------------------------- +// private String allocListStats(final List<Allocator> list, final AtomicLong counter) { +// final StringBuffer stats = new StringBuffer(); +// final Iterator<Allocator> iter = list.iterator(); +// while (iter.hasNext()) { +// stats.append(iter.next().getStats(counter)); +// } +// +// return stats.toString(); +// } +// +// public String getStats(final boolean full) { +// +// final AtomicLong counter = new AtomicLong(); +// +// final StringBuilder sb = new StringBuilder("FileSize : " + m_fileSize +// + " allocated : " + m_nextAllocation + "\r\n"); +// +// if (full) { +// +// sb.append(allocListStats(m_allocs, counter)); +// +// sb.append("Allocated : " + counter); +// +// } +// +// return sb.toString(); +// +// } public static class AllocationStats { public AllocationStats(final int i) { @@ -2510,6 +2504,13 @@ // -------------------------------------------------------------------------------------- + /** + * Given a physical address (byte offset on the store), return true if that + * address could be managed by an allocated block. + * + * @param a + * the storage address to be tested. + */ public boolean verify(final long laddr) { final int addr = (int) laddr; @@ -2594,28 +2595,33 @@ // } // } + /** + * The {@link RWStore} always generates negative address values. + * + * @return whether the address given is a native IStore address + */ public boolean isNativeAddress(final long addr) { return addr <= 0; } - /******************************************************************************* - * called when used as a server, returns whether facility is enabled, this - * is the whole point of the wormStore - so the answer is true - **/ - public boolean preserveSessionData() { - m_preserveSession = true; +// /******************************************************************************* +// * called when used as a server, returns whether facility is enabled, this +// * is the whole point of the wormStore - so the answer is true +// **/ +// public boolean preserveSessionData() { +// m_preserveSession = true; +// +// return true; +// } +// +// /******************************************************************************* +// * called by allocation blocks to determine whether they can re-allocate +// * data within this session. +// **/ +// protected boolean isSessionPreserved() { +// return m_preserveSession || m_contexts.size() > 0; +// } - return true; - } - - /******************************************************************************* - * called by allocation blocks to determine whether they can re-allocate - * data within this session. - **/ - protected boolean isSessionPreserved() { - return m_preserveSession || m_contexts.size() > 0; - } - // /********************************************************************* // * create backup file, copy data to it, and close it. // **/ @@ -2702,21 +2708,21 @@ // } // } - /*************************************************************************************** - * Needed by PSOutputStream for BLOB buffer chaining. - **/ - public int bufferChainOffset() { - return m_maxFixedAlloc - 4; - } +// /*************************************************************************************** +// * Needed by PSOutputStream for BLOB buffer chaining. +// **/ +// public int bufferChainOffset() { +// return m_maxFixedAlloc - 4; +// } public File getStoreFile() { return m_fd; } - public boolean isLongAddress() { - // always ints - return false; - } +// public boolean isLongAddress() { +// // always ints +// return false; +// } // public int absoluteReadLong(long addr, int offset) { // throw new UnsupportedOperationException(); @@ -2730,9 +2736,9 @@ // absoluteWriteInt((int) addr, threshold, (int) addr2); // } - public int getAddressSize() { - return 4; - } +// public int getAddressSize() { +// return 4; +// } // public RandomAccessFile getRandomAccessFile() { // return m_raf; @@ -2838,7 +2844,7 @@ /** * A Blob Allocator maintains a list of Blob headers. The allocator stores - * upto 255 blob headers plus a checksum. When a request is made to read the + * up to 255 blob headers plus a checksum. When a request is made to read the * blob data, the blob allocator retrieves the blob header and reads the * data from that into the passed byte array. */ @@ -2851,8 +2857,8 @@ } if (ba == null) { final Allocator lalloc = (Allocator) m_allocs.get(m_allocs.size() - 1); - final int psa = lalloc.getRawStartAddr(); // previous block - // start address + // previous block start address + final int psa = lalloc.getRawStartAddr(); assert (psa - 1) > m_nextAllocation; ba = new BlobAllocator(this, psa - 1); ba.setFreeList(m_freeBlobs); // will add itself to the free list This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |