Top Description Inners Methods
org.eclipse.jgit.internal.storage.pack

public Interface CachedPackUriProvider

Imports
java.io.IOException, java.util.Collection, org.eclipse.jgit.annotations.Nullable

Provider of URIs corresponding to cached packs. For use with the "packfile-uris" feature.
Since
5.5

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
CachedPackUriProvider.PackInfo

Information about a packfile.

Method Summary

Modifier and TypeMethod and Description
public CachedPackUriProvider.PackInfo

Returns:

if a URI corresponds to the cached pack, an object containing the URI and some other information; null otherwise
getInfo
(CachedPack
the cached pack for which to check if a corresponding URI exists
pack
,
Collection<String>
the protocols that the client has declared support for; if a URI is returned, it must be of one of these protocols
protocolsSupported
)

Get pack info

Method Detail

getInfoback to summary
public CachedPackUriProvider.PackInfo getInfo(CachedPack pack, Collection<String> protocolsSupported) throws IOException

Get pack info

Parameters
pack:CachedPack

the cached pack for which to check if a corresponding URI exists

protocolsSupported:Collection<String>

the protocols that the client has declared support for; if a URI is returned, it must be of one of these protocols

Returns:CachedPackUriProvider.PackInfo

if a URI corresponds to the cached pack, an object containing the URI and some other information; null otherwise

Annotations
@Nullable
Exceptions
IOException:
implementations may throw this
Since
5.5
org.eclipse.jgit.internal.storage.pack back to summary

public Class CachedPackUriProvider.PackInfo

extends Object
Class Inheritance
  • java.lang.Object
  • org.eclipse.jgit.internal.storage.pack.CachedPackUriProvider.PackInfo

Information about a packfile.
Since
5.5

Field Summary

Modifier and TypeField and Description
private final String
private final long
private final String

Constructor Summary

AccessConstructor and Description
public
PackInfo(String
the hash of the packfile as a hexadecimal string
hash
,
String
the URI corresponding to the packfile
uri
,
long
the size of the packfile in bytes
size
)

Constructs an object containing information about a packfile.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the hash of the packfile as a hexadecimal string
getHash
()

Get the hash of the packfile

public long

Returns:

the size of the packfile in bytes (-1 if unknown)
getSize
()

Get the size of the packfile in bytes

public String

Returns:

the URI corresponding to the packfile
getUri
()

Get the URI corresponding to the packfile

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

hashback to summary
private final String hash
sizeback to summary
private final long size
uriback to summary
private final String uri

Constructor Detail

PackInfoback to summary
public PackInfo(String hash, String uri, long size)

Constructs an object containing information about a packfile.

Parameters
hash:String

the hash of the packfile as a hexadecimal string

uri:String

the URI corresponding to the packfile

size:long

the size of the packfile in bytes

Method Detail

getHashback to summary
public String getHash()

Get the hash of the packfile

Returns:String

the hash of the packfile as a hexadecimal string

getSizeback to summary
public long getSize()

Get the size of the packfile in bytes

Returns:long

the size of the packfile in bytes (-1 if unknown)

getUriback to summary
public String getUri()

Get the URI corresponding to the packfile

Returns:String

the URI corresponding to the packfile