Class CurrentOp
- java.lang.Object
-
- dev.morphia.aggregation.experimental.stages.Stage
-
- dev.morphia.aggregation.experimental.stages.CurrentOp
-
public class CurrentOp extends Stage
Returns a stream of documents containing information on active and/or dormant operations as well as inactive sessions that are holding locks as part of a transaction.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CurrentOp()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description CurrentOp
allUsers(boolean allUsers)
If set to false, $currentOp will only report on operations/idle connections/idle cursors/idle sessions belonging to the user who ran the command.static CurrentOp
currentOp()
Creates a new stageCurrentOp
idleConnections(boolean idleConnections)
If set to false, $currentOp will only report active operations.CurrentOp
idleCursors(boolean idleCursors)
If set to true, $currentOp will report on cursors that are “idle”; i.e.CurrentOp
idleSessions(boolean idleSessions)
Include idle sessions or notboolean
isAllUsers()
boolean
isIdleConnections()
boolean
isIdleCursors()
boolean
isIdleSessions()
boolean
isLocalOps()
CurrentOp
localOps(boolean localOps)
If set to true for an aggregation running on mongos, $currentOp reports only those operations running locally on that mongos.static CurrentOp
of()
Deprecated, for removal: This API element is subject to removal in a future version.usercurrentOp()
-
Methods inherited from class dev.morphia.aggregation.experimental.stages.Stage
aggregation, stageName
-
-
-
-
Method Detail
-
currentOp
public static CurrentOp currentOp()
Creates a new stage- Returns:
- the new stage
- Since:
- 2.2
-
of
@Deprecated(forRemoval=true) public static CurrentOp of()
Deprecated, for removal: This API element is subject to removal in a future version.usercurrentOp()
Creates a new stage- Returns:
- the new stage
-
allUsers
public CurrentOp allUsers(boolean allUsers)
- If set to false, $currentOp will only report on operations/idle connections/idle cursors/idle sessions belonging to the user who ran the command.
- If set to true, $currentOp will report operations belonging to all users.
- Parameters:
allUsers
- include allUsers if true- Returns:
- this
-
idleConnections
public CurrentOp idleConnections(boolean idleConnections)
If set to false, $currentOp will only report active operations. If set to true, all operations including idle connections will be returned.- Parameters:
idleConnections
- include idle connections if true- Returns:
- this
-
idleCursors
public CurrentOp idleCursors(boolean idleCursors)
If set to true, $currentOp will report on cursors that are “idle”; i.e. open but not currently active in a getMore operation.- Parameters:
idleCursors
- include idle cursors if true- Returns:
- this
-
idleSessions
public CurrentOp idleSessions(boolean idleSessions)
Include idle sessions or not- Parameters:
idleSessions
- true to include idle sessions- Returns:
- this
-
isAllUsers
public boolean isAllUsers()
- Returns:
- include all users?
Developer note.This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
isIdleConnections
public boolean isIdleConnections()
- Returns:
- include idle connections?
Developer note.This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
isIdleCursors
public boolean isIdleCursors()
- Returns:
- include idle cursors?
Developer note.This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
isIdleSessions
public boolean isIdleSessions()
- Returns:
- include idle sessions?
Developer note.This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
isLocalOps
public boolean isLocalOps()
- Returns:
- is local ops?
Developer note.This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
localOps
public CurrentOp localOps(boolean localOps)
If set to true for an aggregation running on mongos, $currentOp reports only those operations running locally on that mongos. If false, then the $currentOp will instead report operations running on the shards.- Parameters:
localOps
- true to include only local ops- Returns:
- this
-
-