public static class VirtualMachine.ForOpenJ9.Dispatcher.ForJnaPosixEnvironment extends Object implements VirtualMachine.ForOpenJ9.Dispatcher
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
VirtualMachine.ForOpenJ9.Dispatcher.ForJnaPosixEnvironment.PosixLibrary
An API for interaction with POSIX systems.
|
VirtualMachine.ForOpenJ9.Dispatcher.ForJnaPosixEnvironment, VirtualMachine.ForOpenJ9.Dispatcher.ForJnaWindowsEnvironment| Constructor and Description |
|---|
ForJnaPosixEnvironment(int attempts,
long pause,
TimeUnit timeUnit)
Creates a new connector for a POSIX enviornment using JNA.
|
| Modifier and Type | Method and Description |
|---|---|
void |
decrementSemaphore(File directory,
String name,
boolean global,
int count)
Decrements a semaphore.
|
int |
getOwnerIdOf(File file)
Returns the user id of the owner of the supplied file.
|
String |
getTemporaryFolder()
Returns this machine's temporary folder.
|
void |
incrementSemaphore(File directory,
String name,
boolean global,
int count)
Increments a semaphore.
|
boolean |
isExistingProcess(int processId)
Returns
true if the supplied process id is a running process. |
int |
pid()
Returns the process id of this process.
|
void |
setPermissions(File file,
int permissions)
Sets permissions for the supplied file.
|
int |
userId()
Returns the user id of this process.
|
public ForJnaPosixEnvironment(int attempts,
long pause,
TimeUnit timeUnit)
attempts - The maximum amount of attempts for checking the result of a foreign process.pause - The pause between two checks for another process to return.timeUnit - The time unit of the pause time.public String getTemporaryFolder()
getTemporaryFolder in interface VirtualMachine.ForOpenJ9.Dispatcherpublic int pid()
pid in interface VirtualMachine.ForOpenJ9.Dispatcherpublic int userId()
userId in interface VirtualMachine.ForOpenJ9.Dispatcherpublic boolean isExistingProcess(int processId)
true if the supplied process id is a running process.isExistingProcess in interface VirtualMachine.ForOpenJ9.DispatcherprocessId - The process id to evaluate.true if the supplied process id is currently running.public int getOwnerIdOf(File file)
getOwnerIdOf in interface VirtualMachine.ForOpenJ9.Dispatcherfile - The file for which to locate the owner.public void setPermissions(File file, int permissions)
setPermissions in interface VirtualMachine.ForOpenJ9.Dispatcherfile - The file for which to set the permissions.permissions - The permission bits to set.public void incrementSemaphore(File directory, String name, boolean global, int count)
incrementSemaphore in interface VirtualMachine.ForOpenJ9.Dispatcherdirectory - 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.public void decrementSemaphore(File directory, String name, boolean global, int count)
decrementSemaphore in interface VirtualMachine.ForOpenJ9.Dispatcherdirectory - 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.Copyright © 2014–2019. All rights reserved.