Enum DfsObjDatabase.PackSource
- All Implemented Interfaces:
Serializable
,Comparable<DfsObjDatabase.PackSource>
- Enclosing class:
DfsObjDatabase
Note: When sorting packs by source, do not use the default
comparator based on Enum.compareTo(E)
. Prefer DEFAULT_COMPARATOR
or your own DfsObjDatabase.PackSource.ComparatorBuilder
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder for describingDfsObjDatabase.PackSource
ordering where some values are explicitly considered equal to others.private static class
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe pack was created by compacting multiple packs together.Pack was created by Git garbage collection by this implementation.Created from non-heads byDfsGarbageCollector
.The pack is created by ObjectInserter due to local activity.The pack is created by PackParser due to a network event.Pack was created by Git garbage collection. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Comparator
<DfsObjDatabase.PackSource> Default comparator for sources. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DfsObjDatabase.PackSource
Returns the enum constant of this type with the specified name.static DfsObjDatabase.PackSource[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
INSERT
The pack is created by ObjectInserter due to local activity. -
RECEIVE
The pack is created by PackParser due to a network event.A received pack can be from either a push into the repository, or a fetch into the repository, the direction doesn't matter. A received pack was built by the remote Git implementation and may not match the storage layout preferred by this version. Received packs are likely to be either compacted or garbage collected in the future.
-
COMPACT
The pack was created by compacting multiple packs together.Packs created by compacting multiple packs together aren't nearly as efficient as a fully garbage collected repository, but may save disk space by reducing redundant copies of base objects.
- See Also:
-
GC
Pack was created by Git garbage collection by this implementation.This source is only used by the
DfsGarbageCollector
when it builds a pack file by traversing the object graph and copying all reachable objects into a new pack stream.- See Also:
-
GC_REST
Created from non-heads byDfsGarbageCollector
. -
UNREACHABLE_GARBAGE
Pack was created by Git garbage collection.This pack contains only unreachable garbage that was found during the last GC pass. It is retained in a new pack until it is safe to prune these objects from the repository.
-
-
Field Details
-
DEFAULT_COMPARATOR
Default comparator for sources.Sorts generally newer, smaller types such as
INSERT
andRECEIVE
earlier; older, larger types such asGC
later; andUNREACHABLE_GARBAGE
at the end.
-
-
Constructor Details
-
PackSource
private PackSource()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-