현재 까지 나온 Java 6.0 까지의 I/O 성능향상을 위한 Sun의 작업내역을 보실수가 있네요.. ^^
제가 보기에 Java 6의 가장 큰 이슈는 SelectorProvider가 Linux epoll 기법(IOCP와 비슷)을 지원한다는 것입니다.. 대충 찾아보니.. 여러개의 버그가 리포팅이 되어 있긴 하지만, 추후 대용량 처리를 위해서는 좋은 모습인거 같습니다. ^^
출처는 http://java.sun.com/javase/6/docs/technotes/guides/io/enhancements.html 입니다.....
제가 보기에 Java 6의 가장 큰 이슈는 SelectorProvider가 Linux epoll 기법(IOCP와 비슷)을 지원한다는 것입니다.. 대충 찾아보니.. 여러개의 버그가 리포팅이 되어 있긴 하지만, 추후 대용량 처리를 위해서는 좋은 모습인거 같습니다. ^^
출처는 http://java.sun.com/javase/6/docs/technotes/guides/io/enhancements.html 입니다.....
Enhancements in Java SE 6
java.io
One new class is provided:
Console- Contains methods to access a character-based console device. ThereadPassword()methods disable echoing thus they are suitable for retrieval of sensitive data such as passwords. The methodSystem.console()returns the unique console associated with the Java Virtual Machine.
The following new methods were added to File:
- Methods to retrieve disk usage information:
getTotalSpace()returns the size of the partition in bytesgetFreeSpace()returns the number of unallocated bytes in the partitiongetUsableSpace()returns the number of bytes available on the partition and includes checks for write permissions and other operating system restrictions
- Methods to set or query file permissions:
setWritable(boolean writable, boolean ownerOnly)andsetWritable(boolean writable)set the owner's or everybody's write permissionsetReadable(boolean readable, boolean ownerOnly)andsetReadable(boolean readable)set the owner's or everybody's read permissionsetExecutable(boolean executable, boolean ownerOnly)andsetExecutable(boolean executable)set the owner's or everybody's execute permissioncanExecute()tests the value of the execute permission
Constructors were added to the following class:
IOExceptionsupports exception chaining via the addition of the new constructorsIOException(String, Throwable)andIOException(Throwable).
The behavior of the following method was modified:
- The
File.isFile()Windows implementation has been modified to always returnfalsefor reserved device names such as CON, NUL, AUX, LPT, etc. Previously it returnedtrue, which customers considered a bug because it was inconsistent with behavior for devices on Unix.
java.nio
- A new
java.nio.channels.SelectorProviderimplementation that is based on the Linux epoll event notification facility is included. The epoll facility is available in the Linux 2.6, and newer, kernels. The new epoll-basedSelectorProviderimplementation is more scalable than the traditional poll-basedSelectorProviderimplementation when there are thousands ofSelectableChannels registered with aSelector. The newSelectorProviderimplementation will be used by default when the 2.6 kernel is detected. The poll-basedSelectorProviderwill be used when a pre-2.6 kernel is detected. - The system property
sun.nio.ch.disableSystemWideOverlappingFileLockCheckcontrols whetherjava.nio.channels.FileChannel.lock()checks whether regions are locked by other instances ofFileChannel. Unless this system property is set totrue,FileChannel.lock()will throw anOverlappingFileLockExceptionif an application attempts to lock a region that overlaps one that is locked by another instance ofFileChannel. The system property exists to provide compatibility with previous releases which do not implement the JVM-wide overlapping file lock check.
Enhancements in J2SE 5.0
java.nio
- Class
javax.net.ssl.SSLEnginewas added. The existing J2SDK 1.4.0 secure communication infrastructure,javax.net.ssl.SSLSocket, was based on the I/O model of java.net.Socket. TheSSLEngineclass abstracts away the I/O model, and leaves developers free to secure communication pathways using alternate types of I/O.SSLEnginecan be combined with the New I/O APIs to create implementations such as secure blocking or non-blockingSocketChannels. For details see the JSSE Reference Guide.
Enhancements in Java 2 SDK v1.4
java.io
- In the
FileInputStreamandFileOutputStreamclasses,getChannelmethods have been added to return the underlyingFileChannelobject, and theclosemethods have been revised to close the underlying channel. - Similarly, in the
RandomAccessFileclass, agetChannelmethod has been added and theclosemethod has been revised to close the underlying channel. TheRandomAccessFileconstructors now support the mode characters "s" and "d" to allow the specification, at file-open time, of synchronous writes or synchronous-data writes. - In the
InputStreamReaderandOutputStreamWriterclasses, constructors have been added that take a stream and aCharsetobject, and thegetEncodingmethods have been revised to return the historical name of the encoding being used. Constructors toInputStreamReaderandOutputStreamWriterhave been added that take existingCharsetDecoderandCharsetEncoderobjects, respectively.
java.nio
- The nio packages were added to supplement the I/O facilities provided the java.io package.
- Three new functions were added to the Java Native Interface (JNI) to support direct buffers. For information, see JNI Enhancements in v 1.4.
'Java' 카테고리의 다른 글
| Initializing Collection (0) | 2008/02/14 |
|---|---|
| Java char data type (0) | 2008/02/13 |
| Java I/O 성능 향상을 위한 버전(JVM)별 내용 (0) | 2008/02/12 |
| Syntax elements for SimpleDateFormat (0) | 2008/02/11 |
| 64 bits JVM vs. 32 bits JVM (0) | 2008/02/11 |