public static enum DfsObjDatabase.PackSource extends Enum<DfsObjDatabase.PackSource>
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
.
Modifier and Type | Class and Description |
---|---|
static class |
DfsObjDatabase.PackSource.ComparatorBuilder
Builder for describing
DfsObjDatabase.PackSource ordering where some values are
explicitly considered equal to others. |
Enum Constant and Description |
---|
COMPACT
The pack was created by compacting multiple packs together.
|
GC
Pack was created by Git garbage collection by this implementation.
|
GC_REST
Created from non-heads by
DfsGarbageCollector . |
GC_TXN
RefTreeGraph pack was created by Git garbage collection.
|
INSERT
The pack is created by ObjectInserter due to local activity.
|
RECEIVE
The pack is created by PackParser due to a network event.
|
UNREACHABLE_GARBAGE
Pack was created by Git garbage collection.
|
Modifier and Type | Field and Description |
---|---|
static Comparator<DfsObjDatabase.PackSource> |
DEFAULT_COMPARATOR
Default comparator for sources.
|
Modifier and Type | Method and Description |
---|---|
static DfsObjDatabase.PackSource |
valueOf(String name)
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.
|
public static final DfsObjDatabase.PackSource INSERT
public static final DfsObjDatabase.PackSource RECEIVE
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.
public static final DfsObjDatabase.PackSource COMPACT
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.
DfsPackCompactor
public static final DfsObjDatabase.PackSource GC
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.
DfsGarbageCollector
public static final DfsObjDatabase.PackSource GC_REST
DfsGarbageCollector
.public static final DfsObjDatabase.PackSource GC_TXN
DfsGarbageCollector
public static final DfsObjDatabase.PackSource UNREACHABLE_GARBAGE
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.
public static final Comparator<DfsObjDatabase.PackSource> DEFAULT_COMPARATOR
Sorts generally newer, smaller types such as INSERT
and RECEIVE
earlier; older, larger types such as GC
later; and
UNREACHABLE_GARBAGE
at the end.
public static DfsObjDatabase.PackSource[] values()
for (DfsObjDatabase.PackSource c : DfsObjDatabase.PackSource.values()) System.out.println(c);
public static DfsObjDatabase.PackSource valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2020 Eclipse JGit Project. All rights reserved.