org.neo4j.kernel.impl.transaction.xaframework
Class InMemoryLogBuffer

java.lang.Object
  extended by org.neo4j.kernel.impl.transaction.xaframework.InMemoryLogBuffer
All Implemented Interfaces:
Closeable, Channel, ReadableByteChannel, LogBuffer

public class InMemoryLogBuffer
extends Object
implements LogBuffer, ReadableByteChannel


Constructor Summary
InMemoryLogBuffer()
           
 
Method Summary
 void close()
           
 void force()
          Makes sure the data added to this buffer is written out to the underlying file and forced.
 FileChannel getFileChannel()
           
 long getFileChannelPosition()
           
 boolean isOpen()
           
 LogBuffer put(byte b)
           
 LogBuffer put(byte[] bytes)
           
 LogBuffer put(char[] chars)
           
 LogBuffer putDouble(double d)
           
 LogBuffer putFloat(float f)
           
 LogBuffer putInt(int i)
           
 LogBuffer putLong(long l)
           
 LogBuffer putShort(short s)
           
 int read(ByteBuffer dst)
           
 void reset()
           
 void writeOut()
          Makes sure the data added to this buffer is written out to the underlying file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InMemoryLogBuffer

public InMemoryLogBuffer()
Method Detail

reset

public void reset()

put

public LogBuffer put(byte b)
              throws IOException
Specified by:
put in interface LogBuffer
Throws:
IOException

putShort

public LogBuffer putShort(short s)
                   throws IOException
Specified by:
putShort in interface LogBuffer
Throws:
IOException

putInt

public LogBuffer putInt(int i)
                 throws IOException
Specified by:
putInt in interface LogBuffer
Throws:
IOException

putLong

public LogBuffer putLong(long l)
                  throws IOException
Specified by:
putLong in interface LogBuffer
Throws:
IOException

putFloat

public LogBuffer putFloat(float f)
                   throws IOException
Specified by:
putFloat in interface LogBuffer
Throws:
IOException

putDouble

public LogBuffer putDouble(double d)
                    throws IOException
Specified by:
putDouble in interface LogBuffer
Throws:
IOException

put

public LogBuffer put(byte[] bytes)
              throws IOException
Specified by:
put in interface LogBuffer
Throws:
IOException

put

public LogBuffer put(char[] chars)
              throws IOException
Specified by:
put in interface LogBuffer
Throws:
IOException

writeOut

public void writeOut()
              throws IOException
Description copied from interface: LogBuffer
Makes sure the data added to this buffer is written out to the underlying file.

Specified by:
writeOut in interface LogBuffer
Throws:
IOException - if the data couldn't be written.

force

public void force()
           throws IOException
Description copied from interface: LogBuffer
Makes sure the data added to this buffer is written out to the underlying file and forced.

Specified by:
force in interface LogBuffer
Throws:
IOException - if the data couldn't be written.

getFileChannelPosition

public long getFileChannelPosition()
                            throws IOException
Specified by:
getFileChannelPosition in interface LogBuffer
Throws:
IOException

getFileChannel

public FileChannel getFileChannel()
Specified by:
getFileChannel in interface LogBuffer

isOpen

public boolean isOpen()
Specified by:
isOpen in interface Channel

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Specified by:
close in interface Channel
Throws:
IOException

read

public int read(ByteBuffer dst)
         throws IOException
Specified by:
read in interface ReadableByteChannel
Throws:
IOException


Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.