com.sun.squawk.rms
Class RecordStoreEntry
java.lang.Object
   com.sun.squawk.rms.RmsEntry
com.sun.squawk.rms.RmsEntry
       com.sun.squawk.rms.RecordStoreEntry
com.sun.squawk.rms.RecordStoreEntry
- All Implemented Interfaces: 
- IRecordStoreEntry, IRmsEntry
- public class RecordStoreEntry 
- extends RmsEntry- implements IRecordStoreEntry
 
 
 
 
 
 
 
TYPE
public static final int TYPE
- See Also:
- Constant Field Values
INSERT_PADDING
protected static final int INSERT_PADDING
- See Also:
- Constant Field Values
manager
protected IRecordStoreManager manager
id
protected int id
recordIds
protected int[] recordIds
recordAddresses
protected Address[] recordAddresses
name
protected String name
numRecords
protected int numRecords
lastRecordId
protected int lastRecordId
lastModifiedTimestamp
protected long lastModifiedTimestamp
version
protected int version
RecordStoreEntry
public RecordStoreEntry(IRecordStoreManager manager)
absorbTempEntry
public void absorbTempEntry(IRecordStoreEntry tempEntry)
- 
- Specified by:
- absorbTempEntryin interface- IRecordStoreEntry
 
- 
 
addRecord
public int addRecord(byte[] bytes,
                     int offset,
                     int length)
              throws RecordStoreException,
                     RecordStoreFullException
- 
- Specified by:
- addRecordin interface- IRecordStoreEntry
 
- 
- Throws:
- RecordStoreException
- RecordStoreFullException
 
changed
protected void changed()
- 
 
- 
 
deleteRecord
public void deleteRecord(int recordId)
                  throws InvalidRecordIDException,
                         RecordStoreException
- 
- Specified by:
- deleteRecordin interface- IRecordStoreEntry
 
- 
- Throws:
- InvalidRecordIDException
- RecordStoreException
 
deleteRecords
public void deleteRecords()
                   throws RecordStoreException
- 
- Specified by:
- deleteRecordsin interface- IRecordStoreEntry
 
- 
- Throws:
- RecordStoreException
 
findRecordAddress
protected Address findRecordAddress(int recordId)
                             throws InvalidRecordIDException,
                                    RecordStoreException
- 
 
- 
- Throws:
- InvalidRecordIDException
- RecordStoreException
 
findRecordIndex
protected int findRecordIndex(int recordId)
- 
 
- 
- Returns:
- index of the search key, if it is contained in the list;
         otherwise, (-(insertion point) - 1).  The
         insertion point is defined as the point at which the
         key would be inserted into the list: the index of the first
         element greater than the key, or list.size(), if all
         elements in the list are less than the specified key.  Note
         that this guarantees that the return value will be >= 0 if
         and only if the key is found.
 
findRecord
protected IRecordEntry findRecord(int recordId)
                           throws InvalidRecordIDException,
                                  RecordStoreException
- 
 
- 
- Throws:
- InvalidRecordIDException
- RecordStoreException
 
getId
public int getId()
- 
- Specified by:
- getIdin interface- IRecordStoreEntry
 
- 
 
getName
public String getName()
- 
- Specified by:
- getNamein interface- IRecordStoreEntry
 
- 
 
getNextRecordId
public int getNextRecordId()
- 
- Specified by:
- getNextRecordIdin interface- IRecordStoreEntry
 
- 
 
getNumRecords
public int getNumRecords()
- 
- Specified by:
- getNumRecordsin interface- IRecordStoreEntry
 
- 
 
getRecord
public byte[] getRecord(int recordId)
                 throws InvalidRecordIDException,
                        RecordStoreException
- 
- Specified by:
- getRecordin interface- IRecordStoreEntry
 
- 
- Throws:
- InvalidRecordIDException
- RecordStoreException
 
getRecord
public int getRecord(int recordId,
                     byte[] buffer,
                     int offset)
              throws InvalidRecordIDException,
                     RecordStoreException
- 
- Specified by:
- getRecordin interface- IRecordStoreEntry
 
- 
- Throws:
- InvalidRecordIDException
- RecordStoreException
 
getRecordIdsCopy
public int[] getRecordIdsCopy()
- 
- Specified by:
- getRecordIdsCopyin interface- IRecordStoreEntry
 
- 
 
getRecordSize
public int getRecordSize(int recordId)
                  throws InvalidRecordIDException,
                         RecordStoreException
- 
- Specified by:
- getRecordSizein interface- IRecordStoreEntry
 
- 
- Throws:
- InvalidRecordIDException
- RecordStoreException
 
getRecordsSize
public int getRecordsSize()
                   throws RecordStoreException
- 
- Specified by:
- getRecordsSizein interface- IRecordStoreEntry
 
- 
- Throws:
- RecordStoreException
 
getTimestamp
public long getTimestamp()
- 
- Specified by:
- getTimestampin interface- IRecordStoreEntry
 
- 
 
getType
public int getType()
- 
- Specified by:
- getTypein interface- IRmsEntry
 
- 
 
getVersion
public int getVersion()
- 
- Specified by:
- getVersionin interface- IRecordStoreEntry
 
- 
 
insertAtIndex
protected void insertAtIndex(int index)
- 
 
- 
 
readFrom
public void readFrom(IMemoryHeapBlock memoryBlock)
              throws IOException
- 
- Specified by:
- readFromin interface- IRmsEntry
- Overrides:
- readFromin class- RmsEntry
 
- 
- Throws:
- IOException
 
reVisitRecordEntry
public void reVisitRecordEntry(IRecordEntry record)
                        throws RecordStoreException
- 
- Specified by:
- reVisitRecordEntryin interface- IRecordStoreEntry
 
- 
- Throws:
- RecordStoreException
 
setId
public void setId(int id)
- 
- Specified by:
- setIdin interface- IRecordStoreEntry
 
- 
 
setName
public void setName(String name)
- 
- Specified by:
- setNamein interface- IRecordStoreEntry
 
- 
 
setRecord
public void setRecord(int recordId,
                      byte[] bytes,
                      int offset,
                      int length)
               throws InvalidRecordIDException,
                      RecordStoreException,
                      RecordStoreFullException
- 
- Specified by:
- setRecordin interface- IRecordStoreEntry
 
- 
- Throws:
- InvalidRecordIDException
- RecordStoreException
- RecordStoreFullException
 
visit
public void visit(IRmsEntryVisitor visitor)
           throws RecordStoreException
- 
- Specified by:
- visitin interface- IRmsEntry
 
- 
- Throws:
- RecordStoreException
 
visitRecordEntry
public void visitRecordEntry(IRecordEntry record)
                      throws RecordStoreException
- 
- Specified by:
- visitRecordEntryin interface- IRecordStoreEntry
 
- 
- Throws:
- RecordStoreException
 
writeTo
public void writeTo(DataOutputStream dataOut)
             throws IOException
- 
- Specified by:
- writeToin interface- IRmsEntry
- Overrides:
- writeToin class- RmsEntry
 
- 
- Throws:
- IOException
 
"For updated information see the Java FRC site"