com.hardcode.gdbms.engine.data.edition
Class MemoryInternalBuffer

java.lang.Object
  extended by com.hardcode.gdbms.engine.data.edition.MemoryInternalBuffer
All Implemented Interfaces:
InternalBuffer

public class MemoryInternalBuffer
extends java.lang.Object
implements InternalBuffer


Constructor Summary
MemoryInternalBuffer()
           
 
Method Summary
 void addField()
           
 void deleteRow(long rowId)
           
 Value getFieldValue(long rowIndex, int fieldId)
           
 long insertRow(Value[] values)
          Inserts a row with data
 void removeField(int index)
           
 void restoreStatus()
          Restores the snapshot created in the last call to saveStatus
 void saveStatus()
          Creates a snapshot of the internalbuffer to restore it in the next call to restoreStatus
 void setFieldValue(long row, int modifiedField, Value modifiedValue)
           
 void setRow(long row, Value[] modifiedRow)
          Set the modified row at the specified index
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryInternalBuffer

public MemoryInternalBuffer()
Method Detail

deleteRow

public void deleteRow(long rowId)
               throws DriverException
Throws:
DriverException

insertRow

public long insertRow(Value[] values)
               throws DriverException
Description copied from interface: InternalBuffer
Inserts a row with data

Specified by:
insertRow in interface InternalBuffer
Parameters:
values - values of the data to be inserted
Returns:
index where the row is inserted
Throws:
DriverException - if the operation fails

setRow

public void setRow(long row,
                   Value[] modifiedRow)
            throws DriverException
Description copied from interface: InternalBuffer
Set the modified row at the specified index

Specified by:
setRow in interface InternalBuffer
Parameters:
row - index of the row to update
modifiedRow - Value array with the update
Throws:
DriverException - if the update fails

setFieldValue

public void setFieldValue(long row,
                          int modifiedField,
                          Value modifiedValue)
                   throws DriverException
Specified by:
setFieldValue in interface InternalBuffer
Throws:
DriverException

start

public void start()
           throws DriverException
Specified by:
start in interface InternalBuffer
Throws:
DriverException
See Also:
DataSource.start()

stop

public void stop()
          throws DriverException
Specified by:
stop in interface InternalBuffer
Throws:
DriverException
See Also:
DataSource.stop()

getFieldValue

public Value getFieldValue(long rowIndex,
                           int fieldId)
                    throws DriverException
Specified by:
getFieldValue in interface InternalBuffer
Throws:
DriverException
See Also:
ReadAccess.getFieldValue(long, int)

removeField

public void removeField(int index)
Specified by:
removeField in interface InternalBuffer

addField

public void addField()
Specified by:
addField in interface InternalBuffer

saveStatus

public void saveStatus()
Description copied from interface: InternalBuffer
Creates a snapshot of the internalbuffer to restore it in the next call to restoreStatus

Specified by:
saveStatus in interface InternalBuffer

restoreStatus

public void restoreStatus()
Description copied from interface: InternalBuffer
Restores the snapshot created in the last call to saveStatus

Specified by:
restoreStatus in interface InternalBuffer


Copyright © 2005-2006 . All Rights Reserved.