Package net.bytebuddy.agent
Class VirtualMachine.ForOpenJ9.Dispatcher.ForJnaPosixEnvironment.PosixOwnerProvider.UsingStat
- java.lang.Object
-
- net.bytebuddy.agent.VirtualMachine.ForOpenJ9.Dispatcher.ForJnaPosixEnvironment.PosixOwnerProvider.UsingStat
-
- All Implemented Interfaces:
VirtualMachine.ForOpenJ9.Dispatcher.ForJnaPosixEnvironment.PosixOwnerProvider
- Enclosing interface:
- VirtualMachine.ForOpenJ9.Dispatcher.ForJnaPosixEnvironment.PosixOwnerProvider
public static class VirtualMachine.ForOpenJ9.Dispatcher.ForJnaPosixEnvironment.PosixOwnerProvider.UsingStat extends java.lang.Object implements VirtualMachine.ForOpenJ9.Dispatcher.ForJnaPosixEnvironment.PosixOwnerProvider
An implementation of reading POSIX ownership usingstat
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.agent.VirtualMachine.ForOpenJ9.Dispatcher.ForJnaPosixEnvironment.PosixOwnerProvider
VirtualMachine.ForOpenJ9.Dispatcher.ForJnaPosixEnvironment.PosixOwnerProvider.UsingIStat, VirtualMachine.ForOpenJ9.Dispatcher.ForJnaPosixEnvironment.PosixOwnerProvider.UsingStat
-
-
Field Summary
Fields Modifier and Type Field Description private int
attempts
The maximum amount of attempts for checking the result of a foreign process.private long
pause
The pause between two checks for another process to return.private java.util.concurrent.TimeUnit
timeUnit
The time unit of the pause time.
-
Constructor Summary
Constructors Constructor Description UsingStat(int attempts, long pause, java.util.concurrent.TimeUnit timeUnit)
Creates a new provider where an owner is derived using thestat
command.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getOwnerIdOf(java.io.File file)
Returns the user id of the owner of the supplied file.
-
-
-
Field Detail
-
attempts
private final int attempts
The maximum amount of attempts for checking the result of a foreign process.
-
pause
private final long pause
The pause between two checks for another process to return.
-
timeUnit
private final java.util.concurrent.TimeUnit timeUnit
The time unit of the pause time.
-
-
Constructor Detail
-
UsingStat
public UsingStat(int attempts, long pause, java.util.concurrent.TimeUnit timeUnit)
Creates a new provider where an owner is derived using thestat
command.- Parameters:
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.
-
-
Method Detail
-
getOwnerIdOf
public int getOwnerIdOf(java.io.File file)
Returns the user id of the owner of the supplied file.- Specified by:
getOwnerIdOf
in interfaceVirtualMachine.ForOpenJ9.Dispatcher.ForJnaPosixEnvironment.PosixOwnerProvider
- Parameters:
file
- The file for which to locate the owner.- Returns:
- The owner id of the supplied file.
-
-