public final class ChangePackageUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
countLeafOperations(AbstractOperation operation)
Count all leaf operations of a single
AbstractOperations. |
static int |
countLeafOperations(Collection<AbstractOperation> operations)
Count all leaf operations of a collection of
AbstractOperations. |
static int |
countLeafOperations(List<AbstractChangePackage> changePackages)
Count all leaf operations of all operations contained in the given list of
ChangePackages. |
static int |
countOperations(List<AbstractChangePackage> changePackages)
Count all root operations within the given list of
ChangePackages. |
static AbstractChangePackage |
createChangePackage(boolean useInMemoryChangePackage)
Creates a new
AbstractChangePackage depending on the client configuration behavior whether
to create in-memory of file-based change packages. |
static Iterator<ChangePackageEnvelope> |
splitChangePackage(FileBasedChangePackage changePackage,
int changePackageFragmentSize)
Given a single change package, splits it into multiple fragments.
|
public static AbstractChangePackage createChangePackage(boolean useInMemoryChangePackage)
AbstractChangePackage depending on the client configuration behavior whether
to create in-memory of file-based change packages.useInMemoryChangePackage - whether an in-memory change package should be createdpublic static Iterator<ChangePackageEnvelope> splitChangePackage(FileBasedChangePackage changePackage, int changePackageFragmentSize)
changePackage - the change package to be splittedchangePackageFragmentSize - the max number of operations a single fragment may consists ofpublic static int countLeafOperations(Collection<AbstractOperation> operations)
AbstractOperations.operations - a collection of operationspublic static int countLeafOperations(AbstractOperation operation)
AbstractOperations.operation - a single operationpublic static int countLeafOperations(List<AbstractChangePackage> changePackages)
ChangePackages.changePackages - list of change packagespublic static int countOperations(List<AbstractChangePackage> changePackages)
ChangePackages.changePackages - list of change packagesCopyright © 2017. All rights reserved.