public class SchedulingPermission extends RealtimePermission
Scheduler
, RealtimeThreadGroup
, and
ProcessingConstraint
.
The following table describes the actions to check. Either the
permission is limited to the current ThreadGroup
by
specifying the target group
or it can apply to all, either with no
target or the target *
.
Action Name | Description | Risks of grant |
---|---|---|
system | Changes system wide behavior, such as how scheduling is done. | Scheduling Risk |
control | Changes another context's scheduling limits, including affinity, or raises your own limits. | Scheduling Risk |
monitor | Adds overrun and underrun handlers to someone else's group or change the event used to monitor adding or removing a processor | Load Risk |
tune | Changes task scheduling. | Scheduling Risk |
*
is allowed for both signal and action.
The risk classes are defined in RealtimePermission
.Constructor and Description |
---|
SchedulingPermission(java.lang.String actions)
Creates a new
SchedulingPermission object for a given action,
i.e., the symbolic name of an action. |
SchedulingPermission(java.lang.String target,
java.lang.String actions)
Creates a new
SchedulingPermission object for a given action,
i.e., the symbolic name of an action. |
SchedulingPermission(java.lang.ThreadGroup group,
java.lang.String actions)
Creates a new
SchedulingPermission object for a given action,
i.e., the symbolic name of an action. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other)
Compare two Permission objects for equality.
|
java.lang.String |
getActions()
Obtain the actions as a String in canonical form.
|
int |
hashCode()
Obtain the hash code value for this object.
|
boolean |
implies(java.security.Permission permission)
Checks if the given permission's actions are "implied by" this
object's actions.
|
public SchedulingPermission(java.lang.String target, java.lang.String actions)
SchedulingPermission
object for a given action,
i.e., the symbolic name of an action. The target
string
specifies additional limitations on the action.target
- Specifies the domain for the action, or *
for no limit on the permission.actions
- The names of the actions to allow, or *
for all actions.java.lang.NullPointerException
- when action
is null
.StaticIllegalArgumentException
- when target
or
action
is empty.public SchedulingPermission(java.lang.String actions)
SchedulingPermission
object for a given action,
i.e., the symbolic name of an action.actions
- The names of the actions to allow, or *
for all actions.java.lang.NullPointerException
- when action
is null
.StaticIllegalArgumentException
- when action
is empty.public SchedulingPermission(java.lang.ThreadGroup group, java.lang.String actions)
SchedulingPermission
object for a given action,
i.e., the symbolic name of an action. The group
parameter
specifies the thread group that will be compared to the current
thread group when implies
is called.group
- Specifies the thread group that will be compared
to the current thread group when
implies
is called.actions
- The names of the actions to allow, or *
for all actions.java.lang.NullPointerException
- when action
is null
.StaticIllegalArgumentException
- when group
is null or action
is empty.public boolean equals(java.lang.Object other)
RealtimePermission
equals
in class RealtimePermission
other
- is the object with which to compare.true
when yes and false
otherwise.public java.lang.String getActions()
RealtimePermission
getActions
in class RealtimePermission
public int hashCode()
RealtimePermission
hashCode
in class RealtimePermission
public boolean implies(java.security.Permission permission)
RealtimePermission
implies
in class RealtimePermission
permission
- is the permission to check.true
when yes and false
otherwise.