Package io.bdeploy.bhive.remote
Class LocalBHiveAdapter
java.lang.Object
io.bdeploy.bhive.remote.LocalBHiveAdapter
- All Implemented Interfaces:
RemoteBHive,AutoCloseable
Adapts a local
BHive to a RemoteBHive. This makes it possible
to specify local BHives on the same machine as RemoteBHive.-
Constructor Summary
ConstructorsConstructorDescriptionLocalBHiveAdapter(BHive hive, ActivityReporter reporter) Creates the adapter for the givenBHive. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()fetch(Set<ObjectId> requiredObjects, Set<Manifest.Key> manifestsToFetch) 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.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
-
Constructor Details
-
LocalBHiveAdapter
Creates the adapter for the givenBHive.
-
-
Method Details
-
getMissingObjects
Description copied from interface:RemoteBHiveFrom the given set, filter all remotely knownObjectIds and return onlyObjectIdwhich are not yet present on the remote.- Specified by:
getMissingObjectsin interfaceRemoteBHive
-
getRequiredObjects
Description copied from interface:RemoteBHiveRetrieve theObjectIds required to satisfy a given tree.- Specified by:
getRequiredObjectsin interfaceRemoteBHive
-
getRequiredTrees
Description copied from interface:RemoteBHiveRetrieve theObjectIds of all requiredTreeobjects recursively in the given tree. The returned set is ordered so that child-trees are first followed by their parents.- Specified by:
getRequiredTreesin interfaceRemoteBHive
-
getManifestInventory
Description copied from interface:RemoteBHiveRetrieve allManifest.Keys along with the root treeObjectIdavailable to the remote repository.- Specified by:
getManifestInventoryin interfaceRemoteBHive- Parameters:
names- a possibly empty list of named to restrict to. Each can be any number of full (!) name segments (/-separated).
-
removeManifest
- Specified by:
removeManifestin interfaceRemoteBHive- Parameters:
key- the manifest to delete
-
prune
public void prune()Description copied from interface:RemoteBHivePerform a prune operation on the remoteBHive, removing any unreferenced objects.- Specified by:
prunein interfaceRemoteBHive
-
push
Description copied from interface:RemoteBHive- Specified by:
pushin interfaceRemoteBHive
-
pushAsStream
Description copied from interface:RemoteBHiveStreams objects directly into the given remote hive.- Specified by:
pushAsStreamin interfaceRemoteBHive
-
fetch
Description copied from interface:RemoteBHiveFetch manifests from the remote as ZIPedBHive. Only objects in the given requiredObjects are included.- Specified by:
fetchin interfaceRemoteBHive
-
fetchAsStream
Description copied from interface:RemoteBHiveStreams the given objects one after each other to the given output stream.- Specified by:
fetchAsStreamin interfaceRemoteBHive
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceRemoteBHive
-