@NotThreadSafe public class JobMasterAuditContext extends Object implements AuditContext
Modifier | Constructor and Description |
---|---|
protected |
JobMasterAuditContext(AsyncUserAccessAuditLogWriter asyncAuditLogWriter)
Constructor of
JobMasterAuditContext . |
Modifier and Type | Method and Description |
---|---|
void |
close() |
JobMasterAuditContext |
setAllowed(boolean allowed)
Set to true if the operation associated with this
AuditContext is allowed, false
otherwise. |
JobMasterAuditContext |
setAuthType(AuthType authType)
Sets mAuthType field.
|
JobMasterAuditContext |
setCommand(String command)
Sets mCommand field.
|
JobMasterAuditContext |
setCreationTimeNs(long creationTimeNs)
Sets mCreationTimeNs field.
|
JobMasterAuditContext |
setIp(String ip)
Sets mIp field.
|
JobMasterAuditContext |
setJobId(long jobId)
Sets mCreationTimeNs field.
|
JobMasterAuditContext |
setJobName(String jobName)
Sets mCreationTimeNs field.
|
JobMasterAuditContext |
setSucceeded(boolean succeeded)
Set to true if the operration associated with this
AuditContext is allowed and
succeeds. |
JobMasterAuditContext |
setUgi(String ugi)
Sets mUgi field.
|
String |
toString() |
protected JobMasterAuditContext(AsyncUserAccessAuditLogWriter asyncAuditLogWriter)
JobMasterAuditContext
.asyncAuditLogWriter
- public JobMasterAuditContext setAllowed(boolean allowed)
AuditContext
AuditContext
is allowed, false
otherwise.setAllowed
in interface AuditContext
allowed
- true if operation is allowed, false otherwiseAuditContext
instance itselfpublic JobMasterAuditContext setSucceeded(boolean succeeded)
AuditContext
AuditContext
is allowed and
succeeds.setSucceeded
in interface AuditContext
succeeded
- true if the operation has succeeded, false otherwiseAuditContext
instance itselfpublic JobMasterAuditContext setCommand(String command)
command
- the command associated with this Master
AuditContext
instancepublic JobMasterAuditContext setUgi(String ugi)
ugi
- the client user name of the authenticated client user of this threadAuditContext
instancepublic JobMasterAuditContext setAuthType(AuthType authType)
authType
- the authentication typeAuditContext
instancepublic JobMasterAuditContext setIp(String ip)
ip
- the IP of the clientAuditContext
instancepublic JobMasterAuditContext setCreationTimeNs(long creationTimeNs)
creationTimeNs
- the System.nanoTime() when this operation create,
it only can be used to compute operation mExecutionTimeAuditContext
instancepublic JobMasterAuditContext setJobId(long jobId)
jobId
- the job idAuditContext
instancepublic JobMasterAuditContext setJobName(String jobName)
jobName
- the job nameAuditContext
instancepublic void close()
close
in interface AuditContext
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2023. All Rights Reserved.