Package org.eclipse.jgit.transport
Class FetchV2Request.Builder
java.lang.Object
org.eclipse.jgit.transport.FetchV2Request.Builder
- Enclosing class:
- FetchV2Request
A builder for
FetchV2Request
.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) String
(package private) int
(package private) int
(package private) boolean
(package private) FilterSpec
(package private) boolean
(package private) boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) FetchV2Request.Builder
addClientCapability
(String clientCapability) (package private) FetchV2Request.Builder
addClientShallowCommit
(ObjectId shallowOid) (package private) FetchV2Request.Builder
addDeepenNotRef
(String deepenNotRef) (package private) FetchV2Request.Builder
addPackfileUriProtocol
(String value) (package private) FetchV2Request.Builder
addPeerHas
(ObjectId objectId) (package private) FetchV2Request.Builder
addServerOption
(String value) Records an application-specific option supplied in a server-option line, for later retrieval withFetchV2Request.getServerOptions()
.(package private) FetchV2Request.Builder
addWantedRef
(String refName) Ref received in "want-ref" line and the object-id it refers to(package private) FetchV2Request.Builder
(package private) FetchV2Request
build()
(package private) int
(package private) int
getDepth()
(package private) boolean
(package private) FetchV2Request.Builder
Value of an agent line received after the command and before the arguments.(package private) FetchV2Request.Builder
setDeepenSince
(int value) (package private) FetchV2Request.Builder
setDepth
(int d) (package private) FetchV2Request.Builder
Mark that the "done" line has been received.(package private) FetchV2Request.Builder
setFilterSpec
(FilterSpec filter) (package private) FetchV2Request.Builder
setSidebandAll
(boolean value) (package private) FetchV2Request.Builder
Mark that the "wait-for-done" line has been received.
-
Field Details
-
peerHas
-
wantedRefs
-
wantIds
-
clientShallowCommits
-
deepenNotRefs
-
clientCapabilities
-
depth
int depth -
deepenSince
int deepenSince -
filterSpec
FilterSpec filterSpec -
doneReceived
boolean doneReceived -
waitForDone
boolean waitForDone -
agent
-
serverOptions
-
sidebandAll
boolean sidebandAll -
packfileUriProtocols
-
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
addPeerHas
- Parameters:
objectId
- object id received in a "have" line- Returns:
- this builder
-
addWantedRef
Ref received in "want-ref" line and the object-id it refers to- Parameters:
refName
- reference name- Returns:
- this builder
-
addClientCapability
- Parameters:
clientCapability
- capability line sent by the client- Returns:
- this builder
-
addWantId
- Parameters:
wantId
- object id received in a "want" line- Returns:
- this builder
-
addClientShallowCommit
- Parameters:
shallowOid
- object id received in a "shallow" line- Returns:
- this builder
-
setDepth
- Parameters:
d
- Depth received in a "deepen" line- Returns:
- this builder
-
getDepth
int getDepth()- Returns:
- depth set in the request (via a "deepen" line). Defaulting to 0 if not set.
-
hasDeepenNotRefs
boolean hasDeepenNotRefs()- Returns:
- true if there has been at least one "deepen not" line in the request so far
-
addDeepenNotRef
- Parameters:
deepenNotRef
- reference received in a "deepen not" line- Returns:
- this builder
-
setDeepenSince
- Parameters:
value
- Unix timestamp received in a "deepen since" line- Returns:
- this builder
-
getDeepenSince
int getDeepenSince()- Returns:
- shallow since value, sent before in a "deepen since" line. 0 by default.
-
setFilterSpec
- Parameters:
filter
- spec set in a "filter" line- Returns:
- this builder
-
setDoneReceived
FetchV2Request.Builder setDoneReceived()Mark that the "done" line has been received.- Returns:
- this builder
-
setWaitForDone
FetchV2Request.Builder setWaitForDone()Mark that the "wait-for-done" line has been received.- Returns:
- this builder
-
setAgent
Value of an agent line received after the command and before the arguments. E.g. "agent=a.b.c/1.0" should set "a.b.c/1.0".- Parameters:
agentValue
- the client-supplied agent capability, without the leading "agent="- Returns:
- this builder
-
addServerOption
Records an application-specific option supplied in a server-option line, for later retrieval withFetchV2Request.getServerOptions()
.- Parameters:
value
- the client-supplied server-option capability, without leading "server-option=".- Returns:
- this builder
-
setSidebandAll
- Parameters:
value
- true if client sent "sideband-all"- Returns:
- this builder
-
addPackfileUriProtocol
-
build
FetchV2Request build()- Returns:
- Initialized fetch request
-