public class TestPageServer
extends junit.framework.TestCase
FileChannel.read(ByteBuffer, long)
,
FileChannel.write(ByteBuffer, long)
,
FileChannel.transferFrom(java.nio.channels.ReadableByteChannel, long, long)
,
and
FileChannel.transferTo(long, long, java.nio.channels.WritableByteChannel)
.
The DBCache
API will have to be changed to expose similar methods
that correctly read from the cache or DB as appropriate and correctly write
on the safe, log or DB as appropriate.FileChannel
is NOT a SelectableChannel
! It is
derived from AbstractInterruptibleChannel
rather than from
AbstractSelectableChannel
. This means that we can not use selection
keys with the files and that may limit the opporunities for non-blocking IO
to disk.
There is no direct support for asynchronous File IO. The way the SEDA team worked around this issue is by using a RandomAccessFile, and by having a dedicated queue that would process messages placed into the queue. The stage processing the messages would then perform the actions within its thread, and then send along any messages as a result from the actions.
http://www.onjava.com/pub/a/onjava/2004/09/01/nio.html
,
http://coconut.codehaus.org/
,
http://sourceforge.net/projects/pyrasun/
,
http://gleamynode.net/dev/tl-netty2-example-sumup/docs/
,
http://directory.apache.org/subprojects/mina/index.html
,
-XX:MaxDirectMemorySize option (controls direct memory allocation).
Problems with File#transferTo under Linux (Java 1.5, not resolved?)
,
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5103988
,
NIO Network File Transfer Seriously Underperforming
,
Note that GC page faults may causing blocking in any case!
Constructor and Description |
---|
TestPageServer() |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.