Package io.bdeploy.bhive.remote
Interface RemoteBHive
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
JerseyRemoteBHive,LocalBHiveAdapter
Represents a possibly remote (might also be "remote" in the sense of another
directory on disc) BHive. This interface is *not* ment to be used for direct remote interface implementation, but rather is a
logical representation of a
BHive which is not the currently operated-on BHive.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()fetch(Set<ObjectId> objects, Set<Manifest.Key> manifests) Fetch manifests from the remote as ZIPedBHive.fetchAsStream(Set<ObjectId> objects, Set<Manifest.Key> manifests) Streams the given objects one after each other to the given output stream.static RemoteBHiveforService(RemoteService svc, String name, ActivityReporter reporter) Figures out the type ofRemoteBHiverequired for the givenRemoteServiceand returns an instance.getManifestInventory(String... names) Retrieve allManifest.Keys along with the root treeObjectIdavailable to the remote repository.getMissingObjects(Set<ObjectId> all) getRequiredObjects(Set<ObjectId> trees, Set<ObjectId> excludeTrees) Retrieve theObjectIds required to satisfy a given tree.getRequiredTrees(ObjectId tree) voidprune()Perform a prune operation on the remoteBHive, removing any unreferenced objects.voidStreams objects directly into the given remote hive.void
-
Method Details
-
getMissingObjects
-
getManifestInventory
Retrieve allManifest.Keys along with the root treeObjectIdavailable to the remote repository.- Parameters:
names- a possibly empty list of named to restrict to. Each can be any number of full (!) name segments (/-separated).
-
removeManifest
- Parameters:
key- the manifest to delete
-
prune
void prune()Perform a prune operation on the remoteBHive, removing any unreferenced objects. -
getRequiredObjects
Retrieve theObjectIds required to satisfy a given tree. -
getRequiredTrees
-
push
-
pushAsStream
Streams objects directly into the given remote hive. -
fetch
Fetch manifests from the remote as ZIPedBHive. Only objects in the given requiredObjects are included. -
fetchAsStream
Streams the given objects one after each other to the given output stream. -
forService
Figures out the type ofRemoteBHiverequired for the givenRemoteServiceand returns an instance.The returned
RemoteBHiveis not guaranteed to be remote in the sense of network. It might be an adapter to another localBHivein the filesystem.In case the hive is remote, the name is used to identify the hive on the server, as the server might serve multiple hives.
-
close
void close()- Specified by:
closein interfaceAutoCloseable
-