Package name.pachler.nio.file.impl
Class BSD
- java.lang.Object
-
- name.pachler.nio.file.impl.Unix
-
- name.pachler.nio.file.impl.BSD
-
public abstract class BSD extends Unix
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBSD.keventstruct kevent { uintptr_t ident; // identifier for this event short filter; // filter for event u_short flags; // action flags for kqueue u_int fflags; // filter flag value intptr_t data; // filter data value void *udata; // opaque user data identifier };-
Nested classes/interfaces inherited from class name.pachler.nio.file.impl.Unix
Unix.timespec
-
-
Field Summary
Fields Modifier and Type Field Description static shortEV_ADDstatic shortEV_CLEARstatic shortEV_DELETEstatic shortEV_DISABLEstatic shortEV_ENABLEstatic shortEV_EOFstatic shortEV_ERRORstatic shortEV_ONESHOTstatic shortEVFILT_PROCstatic shortEVFILT_VNODEstatic intNOTE_ATTRIBstatic intNOTE_DELETEstatic intNOTE_EXECstatic intNOTE_EXITstatic intNOTE_EXTENDstatic intNOTE_FORKstatic intNOTE_LINKstatic intNOTE_RENAMEstatic intNOTE_REVOKEstatic intNOTE_TRACKstatic intNOTE_TRACKERRstatic intNOTE_WRITE
-
Constructor Summary
Constructors Constructor Description BSD()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intkevent(int kq, BSD.kevent[] changelist, BSD.kevent[] eventlist, Unix.timespec timeout)static intkqueue()-
Methods inherited from class name.pachler.nio.file.impl.Unix
getIntDefine
-
-
-
-
Field Detail
-
EV_ADD
public static final short EV_ADD
-
EV_ENABLE
public static final short EV_ENABLE
-
EV_DISABLE
public static final short EV_DISABLE
-
EV_DELETE
public static final short EV_DELETE
-
EV_ONESHOT
public static final short EV_ONESHOT
-
EV_CLEAR
public static final short EV_CLEAR
-
EV_EOF
public static final short EV_EOF
-
EV_ERROR
public static final short EV_ERROR
-
EVFILT_VNODE
public static final short EVFILT_VNODE
-
EVFILT_PROC
public static final short EVFILT_PROC
-
NOTE_DELETE
public static final int NOTE_DELETE
-
NOTE_WRITE
public static final int NOTE_WRITE
-
NOTE_EXTEND
public static final int NOTE_EXTEND
-
NOTE_ATTRIB
public static final int NOTE_ATTRIB
-
NOTE_LINK
public static final int NOTE_LINK
-
NOTE_RENAME
public static final int NOTE_RENAME
-
NOTE_REVOKE
public static final int NOTE_REVOKE
-
NOTE_EXIT
public static final int NOTE_EXIT
-
NOTE_FORK
public static final int NOTE_FORK
-
NOTE_EXEC
public static final int NOTE_EXEC
-
NOTE_TRACK
public static final int NOTE_TRACK
-
NOTE_TRACKERR
public static final int NOTE_TRACKERR
-
-
Method Detail
-
kqueue
public static int kqueue()
-
kevent
public static int kevent(int kq, BSD.kevent[] changelist, BSD.kevent[] eventlist, Unix.timespec timeout)- Parameters:
kq- the kqueue to read events from/change events in. Obtained with kqueue().changelist- an array of kevent instances that indicate events to add/remove or modify. If null, no changes will be applied to the kqueue.eventlist- an array that the function will fill with events that occurred. If there are more events available than there is space in this array, the array will be filled. A subsequent call to kevent() will yield the remaining events. Use select() on the kqueue file descriptor to check if there are events pending. Non-null array elements will be kept; their values will be overwritten. The function will assign new kqueue objects to null array elements. Note that providing an eventlist array pre-filled with kevent objects will improve performance. If null is specified, no events will be read, and the function returns immediately.timeout- timeout value. If null, the function will wait indefinitely until events are available (unless an error occurred). Otherwise, the function will wait for the specified timeout for events (which may be zero), again, unless an error occurs. Note that the function will return immediately if eventlist is null or it's length is zero, regardless of the timeout specified.- Returns:
- the function returns the number of events written to eventlist. Zero may be returned if the timeout passed before events could be read. -1 is returned if an error occurred; call errno() to get the error code.
-
-