Package net.bytebuddy.agent
Interface VirtualMachine.ForOpenJ9.Dispatcher
-
- All Known Implementing Classes:
VirtualMachine.ForOpenJ9.Dispatcher.ForJnaPosixEnvironment
,VirtualMachine.ForOpenJ9.Dispatcher.ForJnaWindowsEnvironment
- Enclosing class:
- VirtualMachine.ForOpenJ9
public static interface VirtualMachine.ForOpenJ9.Dispatcher
A dispatcher for native operations being used for communication with an OpenJ9 virtual machine.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
VirtualMachine.ForOpenJ9.Dispatcher.ForJnaPosixEnvironment
A connector implementation for a POSIX environment using JNA.static class
VirtualMachine.ForOpenJ9.Dispatcher.ForJnaWindowsEnvironment
A connector implementation for a Windows environment using JNA.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
chownFileToUser(java.io.File file, long userId)
Changes the ownership of a file.void
decrementSemaphore(java.io.File directory, java.lang.String name, boolean global, int count)
Decrements a semaphore.int
getOwnerIdOf(java.io.File file)
Returns the user id of the owner of the supplied file.java.lang.String
getTemporaryFolder(java.lang.String processId)
Returns this machine's temporary folder.void
incrementSemaphore(java.io.File directory, java.lang.String name, boolean global, int count)
Increments a semaphore.boolean
isExistingProcess(int processId)
Returnstrue
if the supplied process id is a running process.int
pid()
Returns the process id of this process.void
setPermissions(java.io.File file, int permissions)
Sets permissions for the supplied file.int
userId()
Returns the user id of this process.
-
-
-
Method Detail
-
getTemporaryFolder
java.lang.String getTemporaryFolder(java.lang.String processId)
Returns this machine's temporary folder.- Parameters:
processId
- The target process's id.- Returns:
- The temporary folder.
-
pid
int pid()
Returns the process id of this process.- Returns:
- The process id of this process.
-
userId
int userId()
Returns the user id of this process.- Returns:
- The user id of this process
-
isExistingProcess
boolean isExistingProcess(int processId)
Returnstrue
if the supplied process id is a running process.- Parameters:
processId
- The process id to evaluate.- Returns:
true
if the supplied process id is currently running.
-
getOwnerIdOf
int getOwnerIdOf(java.io.File file)
Returns the user id of the owner of the supplied file.- Parameters:
file
- The file for which to locate the owner.- Returns:
- The owner id of the supplied file.
-
setPermissions
void setPermissions(java.io.File file, int permissions)
Sets permissions for the supplied file.- Parameters:
file
- The file for which to set the permissions.permissions
- The permission bits to set.
-
incrementSemaphore
void incrementSemaphore(java.io.File directory, java.lang.String name, boolean global, int count)
Increments a semaphore.- Parameters:
directory
- The sempahore's control directory.name
- The semaphore's name.global
-true
if the semaphore is in the global namespace (only applicable on Windows).count
- The amount of increments.
-
decrementSemaphore
void decrementSemaphore(java.io.File directory, java.lang.String name, boolean global, int count)
Decrements a semaphore.- Parameters:
directory
- The sempahore's control directory.name
- The semaphore's name.global
-true
if the semaphore is in the global namespace (only applicable on Windows).count
- The amount of decrements.
-
chownFileToUser
void chownFileToUser(java.io.File file, long userId)
Changes the ownership of a file. Can be called only if this process is owned by root.- Parameters:
file
- The path of the file to change ownership of.userId
- The user that should own the file.
-
-