org.jboss.messaging.core.journal
Interface SequentialFileFactory

All Known Implementing Classes:
AbstractSequentialFactory, AIOSequentialFileFactory, NIOSequentialFileFactory

public interface SequentialFileFactory

A SequentialFileFactory

Author:
Tim Fox, Clebert Suconic

Method Summary
 void activate(SequentialFile file)
          The factory may need to do some initialization before the file is activated.
 int calculateBlockSize(int bytes)
           
 void clearBuffer(java.nio.ByteBuffer buffer)
           
 void createDirs()
          Create the directory if it doesn't exist yet
 SequentialFile createSequentialFile(java.lang.String fileName, int maxIO)
           
 void deactivate(SequentialFile file)
           
 int getAlignment()
           
 boolean isSupportsCallbacks()
           
 java.util.List<java.lang.String> listFiles(java.lang.String extension)
           
 java.nio.ByteBuffer newBuffer(int size)
           
 void releaseBuffer(java.nio.ByteBuffer buffer)
           
 void start()
           
 void stop()
           
 void testFlush()
           
 java.nio.ByteBuffer wrapBuffer(byte[] bytes)
           
 

Method Detail

createSequentialFile

SequentialFile createSequentialFile(java.lang.String fileName,
                                    int maxIO)

listFiles

java.util.List<java.lang.String> listFiles(java.lang.String extension)
                                           throws java.lang.Exception
Throws:
java.lang.Exception

isSupportsCallbacks

boolean isSupportsCallbacks()

newBuffer

java.nio.ByteBuffer newBuffer(int size)

releaseBuffer

void releaseBuffer(java.nio.ByteBuffer buffer)

activate

void activate(SequentialFile file)
The factory may need to do some initialization before the file is activated. this was added as a hook for AIO to initialize the Observer on TimedBuffer. It could be eventually done the same on NIO if we implement TimedBuffer on NIO


deactivate

void deactivate(SequentialFile file)

wrapBuffer

java.nio.ByteBuffer wrapBuffer(byte[] bytes)

getAlignment

int getAlignment()

calculateBlockSize

int calculateBlockSize(int bytes)

clearBuffer

void clearBuffer(java.nio.ByteBuffer buffer)

start

void start()

stop

void stop()

createDirs

void createDirs()
                throws java.lang.Exception
Create the directory if it doesn't exist yet

Throws:
java.lang.Exception

testFlush

void testFlush()


Copyright © 2006 JBoss Inc. All Rights Reserved.