public final class FilterSpec
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private long |
blobLimit |
static FilterSpec |
NO_FILTER
A placeholder that indicates no filtering.
|
private long |
treeDepthLimit |
Modifier | Constructor and Description |
---|---|
private |
FilterSpec(long blobLimit,
long treeDepthLimit) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
filterLine() |
static FilterSpec |
fromFilterLine(java.lang.String filterLine)
Process the content of "filter" line from the protocol.
|
long |
getBlobLimit() |
long |
getTreeDepthLimit() |
boolean |
isNoOp() |
(package private) static FilterSpec |
withBlobLimit(long blobLimit) |
(package private) static FilterSpec |
withTreeDepthLimit(long treeDepthLimit) |
private final long blobLimit
private final long treeDepthLimit
public static final FilterSpec NO_FILTER
public static FilterSpec fromFilterLine(java.lang.String filterLine) throws PackProtocolException
filterLine
- the content of the "filter" line in the protocolPackProtocolException
- invalid filter because due to unrecognized format or
negative/non-numeric filter.static FilterSpec withBlobLimit(long blobLimit)
blobLimit
- the blob limit in a "blob:[limit]" or "blob:none" filter linestatic FilterSpec withTreeDepthLimit(long treeDepthLimit)
treeDepthLimit
- the tree depth limit in a "tree:[depth]" filter linepublic long getBlobLimit()
public long getTreeDepthLimit()
public boolean isNoOp()
@Nullable public java.lang.String filterLine()