Package org.apache.tomcat.jni
Class Mmap
java.lang.Object
org.apache.tomcat.jni.Mmap
Mmap
- Author:
- Mladen Turk
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intMMap opened for readingstatic final intMMap opened for writing -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longcreate(long file, long offset, long size, int flag, long pool) Create a new mmap'ed file out of an existing APR file.static intdelete(long mm) Remove a mmap'ed.static longdup(long mmap, long pool) Duplicate the specified MMAP.static longoffset(long mm, long offset) Move the pointer into the mmap'ed file to the specified offset.
-
Field Details
-
APR_MMAP_READ
public static final int APR_MMAP_READMMap opened for reading- See Also:
-
APR_MMAP_WRITE
public static final int APR_MMAP_WRITEMMap opened for writing- See Also:
-
-
Constructor Details
-
Mmap
public Mmap()
-
-
Method Details
-
create
Create a new mmap'ed file out of an existing APR file.- Parameters:
file- The file turn into an mmap.offset- The offset into the file to start the data pointer at.size- The size of the fileflag- bit-wise or of:APR_MMAP_READ MMap opened for reading APR_MMAP_WRITE MMap opened for writing
pool- The pool to use when creating the mmap.- Returns:
- The newly created mmap'ed file.
- Throws:
Error- Error creating memory mapping
-
dup
Duplicate the specified MMAP.- Parameters:
mmap- The mmap to duplicate.pool- The pool to use for new_mmap.- Returns:
- Duplicated mmap'ed file.
- Throws:
Error- Error duplicating memory mapping
-
delete
public static int delete(long mm) Remove a mmap'ed.- Parameters:
mm- The mmap'ed file.- Returns:
- the operation status
-
offset
Move the pointer into the mmap'ed file to the specified offset.- Parameters:
mm- The mmap'ed file.offset- The offset to move to.- Returns:
- The pointer to the offset specified.
- Throws:
Error- Error reading file
-