db4o 8.0

com.db4o.io
Class ThreadedSyncBin

java.lang.Object
  extended by com.db4o.io.BinDecorator
      extended by com.db4o.io.ThreadedSyncBin
All Implemented Interfaces:
Bin

public class ThreadedSyncBin
extends BinDecorator


Constructor Summary
ThreadedSyncBin(Bin bin)
           
 
Method Summary
 void close()
          closes the BinDecorator and the underlying Bin.
 long length()
          returns the length of the Bin (on disc, in memory).
 int read(long position, byte[] buffer, int bytesToRead)
          reads a given number of bytes into an array of bytes at an offset position.
 void sync()
          flushes the buffer content to the physical storage media.
 void sync(java.lang.Runnable runnable)
          runs the Runnable between two calls to sync();
 void write(long position, byte[] bytes, int bytesToWrite)
          writes a given number of bytes from an array of bytes at an offset position
 
Methods inherited from class com.db4o.io.BinDecorator
syncRead
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadedSyncBin

public ThreadedSyncBin(Bin bin)
Method Detail

close

public void close()
Description copied from class: BinDecorator
closes the BinDecorator and the underlying Bin.

Specified by:
close in interface Bin
Overrides:
close in class BinDecorator

length

public long length()
Description copied from interface: Bin
returns the length of the Bin (on disc, in memory).

Specified by:
length in interface Bin
Overrides:
length in class BinDecorator
See Also:
Bin.length()

read

public int read(long position,
                byte[] buffer,
                int bytesToRead)
Description copied from interface: Bin
reads a given number of bytes into an array of bytes at an offset position.

Specified by:
read in interface Bin
Overrides:
read in class BinDecorator
Parameters:
position - the offset position to read at
buffer - the byte array to read bytes into
bytesToRead - the number of bytes to be read
Returns:
See Also:
Bin.read(long, byte[], int)

write

public void write(long position,
                  byte[] bytes,
                  int bytesToWrite)
Description copied from interface: Bin
writes a given number of bytes from an array of bytes at an offset position

Specified by:
write in interface Bin
Overrides:
write in class BinDecorator
Parameters:
position - the offset position to write at
bytes - the array of bytes to write
bytesToWrite - the number of bytes to write
See Also:
Bin.write(long, byte[], int)

sync

public void sync()
Description copied from interface: Bin
flushes the buffer content to the physical storage media.

Specified by:
sync in interface Bin
Overrides:
sync in class BinDecorator
See Also:
Bin.sync()

sync

public void sync(java.lang.Runnable runnable)
Description copied from interface: Bin
runs the Runnable between two calls to sync();

Specified by:
sync in interface Bin
Overrides:
sync in class BinDecorator

db4o 8.0

Copyright 2009 Versant Corporation. All rights reserved.