public class Listener extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Listener.FileRecord
Record of opened file.
|
static class |
Listener.Record
Remembers who/where/when opened a file.
|
static class |
Listener.SelectorRecord |
static class |
Listener.ServerSocketRecord
Record of opened server socket.
|
static class |
Listener.SinkChannelRecord |
static class |
Listener.SocketChannelRecord
Record of opened SocketChannel.
|
static class |
Listener.SocketRecord
Record of opened socket.
|
static class |
Listener.SourceChannelRecord |
Modifier and Type | Field and Description |
---|---|
static PrintWriter |
ERROR
Trace the "too many open files" error here
|
static List<String> |
EXCLUDES
Allows to provide stacktrace-lines which cause the element to be excluded
|
static int |
THRESHOLD
If the table size grows beyond this, report the table
|
static PrintWriter |
TRACE
Trace the open/close op
|
Constructor and Description |
---|
Listener() |
Modifier and Type | Method and Description |
---|---|
static void |
close(Object _this)
Called when a file is closed.
|
static void |
dump(OutputStream out)
Dumps all files that are currently open.
|
static void |
dump(Writer w) |
static List<Listener.Record> |
getCurrentOpenFiles() |
static boolean |
isAgentInstalled()
Returns true if the leak detector agent is running.
|
static void |
makeStrong() |
static void |
open_filechannel(FileChannel fileChannel,
java.nio.file.Path path) |
static void |
open(Object _this,
File f)
Called when a new file is opened.
|
static void |
openPipe(Object _this) |
static void |
openSelector(Object _this) |
static void |
openSocket(Object _this)
Called when a socket is opened.
|
static void |
outOfDescriptors()
Called when the system has too many open files.
|
public static PrintWriter TRACE
public static PrintWriter ERROR
public static final List<String> EXCLUDES
public static int THRESHOLD
public static boolean isAgentInstalled()
public static void makeStrong()
public static void open(Object _this, File f)
_this
- FileInputStream
, FileOutputStream
, RandomAccessFile
, or ZipFile
.f
- File being opened.public static void openPipe(Object _this)
public static void open_filechannel(FileChannel fileChannel, java.nio.file.Path path)
public static void openSelector(Object _this)
public static void openSocket(Object _this)
public static List<Listener.Record> getCurrentOpenFiles()
public static void close(Object _this)
_this
- FileInputStream
, FileOutputStream
, RandomAccessFile
, Socket
, ServerSocket
, or ZipFile
.public static void dump(OutputStream out)
public static void dump(Writer w)
public static void outOfDescriptors()
Copyright © 2018. All rights reserved.