Top Description Fields Constructors Methods
org.eclipse.jgit.transport

pack-priv abstract Class FetchRequest

extends Object
Class Inheritance
Known Direct Subclasses
org.eclipse.jgit.transport.FetchV0Request, org.eclipse.jgit.transport.FetchV2Request
Static Imports
java.util.Objects.requireNonNull

Common fields between v0/v1/v2 fetch requests.

Field Summary

Modifier and TypeField and Description
pack-priv final String
pack-priv final Set<String>
pack-priv final Set<ObjectId>
pack-priv final String
pack-priv final List<String>
pack-priv final int
pack-priv final int
pack-priv final FilterSpec
pack-priv final Set<ObjectId>

Constructor Summary

AccessConstructor and Description
pack-priv
FetchRequest(Set<ObjectId>
list of want ids
wantIds
,
int
how deep to go in the tree
depth
,
Set<ObjectId>
commits the client has without history
clientShallowCommits
,
FilterSpec
the filter spec
filterSpec
,
Set<String>
capabilities sent in the request
clientCapabilities
,
int
Requests that the shallow clone/fetch should be cut at a specific time, instead of depth
deepenSince
,
List<String>
Requests that the shallow clone/fetch should be cut at these specific revisions instead of a depth.
deepenNots
,
String
agent as reported by the client in the request body
agent
,
String
agent as reported by the client in the request body
clientSID
)

Initialize the common fields of a fetch request.

Method Summary

Modifier and TypeMethod and Description
pack-priv String

Returns:

string identifying the agent (as sent in the request body by the client)
getAgent
()

Get string identifying the agent

pack-priv Set<String>

Returns:

capabilities sent by the client (excluding the "agent" capability)
getClientCapabilities
()

Capabilities that the client wants enabled from the server.

pack-priv Set<ObjectId>

Returns:

set of commits the client has declared as shallow.
getClientShallowCommits
()

Shallow commits the client already has.

pack-priv String

Returns:

string identifying the client session ID (as sent in the request body by the client)
getClientSID
()

Get string identifying the client session ID

pack-priv List<String>

Returns:

refs received in "deepen-not" lines.
getDeepenNots
()

Get refs received in "deepen-not" lines

pack-priv int

Returns:

timestamp in seconds since the epoch, where to stop the shallow fetch/clone. Defaults to 0 if not set in the request.
getDeepenSince
()

The value in a "deepen-since" line in the request, indicating the timestamp where to stop fetching/cloning.

pack-priv int

Returns:

the depth set in a "deepen" line. 0 by default.
getDepth
()

Get the depth set in a "deepen" line

pack-priv FilterSpec

Returns:

the filter spec given in a "filter" line
getFilterSpec
()

Get the filter spec given in a "filter" line

pack-priv Set<ObjectId>

Returns:

object ids in the "want" (and "want-ref") lines of the request
getWantIds
()

Get object ids in the "want" lines

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

agentback to summary
pack-priv final String agent
Annotations
@Nullable
clientCapabilitiesback to summary
pack-priv final Set<String> clientCapabilities
clientShallowCommitsback to summary
pack-priv final Set<ObjectId> clientShallowCommits
clientSIDback to summary
pack-priv final String clientSID
Annotations
@Nullable
deepenNotsback to summary
pack-priv final List<String> deepenNots
deepenSinceback to summary
pack-priv final int deepenSince
depthback to summary
pack-priv final int depth
filterSpecback to summary
pack-priv final FilterSpec filterSpec
wantIdsback to summary
pack-priv final Set<ObjectId> wantIds

Constructor Detail

FetchRequestback to summary
pack-priv FetchRequest(Set<ObjectId> wantIds, int depth, Set<ObjectId> clientShallowCommits, FilterSpec filterSpec, Set<String> clientCapabilities, int deepenSince, List<String> deepenNots, String agent, String clientSID)

Initialize the common fields of a fetch request.

Parameters
wantIds:Set<ObjectId>

list of want ids

depth:int

how deep to go in the tree

clientShallowCommits:Set<ObjectId>

commits the client has without history

filterSpec:FilterSpec

the filter spec

clientCapabilities:Set<String>

capabilities sent in the request

deepenSince:int

Requests that the shallow clone/fetch should be cut at a specific time, instead of depth

deepenNots:List<String>

Requests that the shallow clone/fetch should be cut at these specific revisions instead of a depth.

agent:String

agent as reported by the client in the request body

clientSID:String

agent as reported by the client in the request body

Method Detail

getAgentback to summary
pack-priv String getAgent()

Get string identifying the agent

Returns:String

string identifying the agent (as sent in the request body by the client)

Annotations
@Nullable
getClientCapabilitiesback to summary
pack-priv Set<String> getClientCapabilities()

Capabilities that the client wants enabled from the server. Capabilities are options that tune the expected response from the server, like "thin-pack", "no-progress" or "ofs-delta". This list should be a subset of the capabilities announced by the server in its first response. These options are listed and well-defined in the git protocol specification. The agent capability is not included in this set. It can be retrieved via getAgent().

Returns:Set<String>

capabilities sent by the client (excluding the "agent" capability)

Annotations
@NonNull
getClientShallowCommitsback to summary
pack-priv Set<ObjectId> getClientShallowCommits()

Shallow commits the client already has. These are sent by the client in "shallow" request lines.

Returns:Set<ObjectId>

set of commits the client has declared as shallow.

Annotations
@NonNull
getClientSIDback to summary
pack-priv String getClientSID()

Get string identifying the client session ID

Returns:String

string identifying the client session ID (as sent in the request body by the client)

Annotations
@Nullable
getDeepenNotsback to summary
pack-priv List<String> getDeepenNots()

Get refs received in "deepen-not" lines

Returns:List<String>

refs received in "deepen-not" lines.

Annotations
@NonNull
getDeepenSinceback to summary
pack-priv int getDeepenSince()

The value in a "deepen-since" line in the request, indicating the timestamp where to stop fetching/cloning.

Returns:int

timestamp in seconds since the epoch, where to stop the shallow fetch/clone. Defaults to 0 if not set in the request.

getDepthback to summary
pack-priv int getDepth()

Get the depth set in a "deepen" line

Returns:int

the depth set in a "deepen" line. 0 by default.

getFilterSpecback to summary
pack-priv FilterSpec getFilterSpec()

Get the filter spec given in a "filter" line

Returns:FilterSpec

the filter spec given in a "filter" line

Annotations
@NonNull
getWantIdsback to summary
pack-priv Set<ObjectId> getWantIds()

Get object ids in the "want" lines

Returns:Set<ObjectId>

object ids in the "want" (and "want-ref") lines of the request

Annotations
@NonNull