FileRepository.
| Modifier and Type | Field and Description |
|---|---|
| private Instant | |
| private final LockFile | |
| private static final String | |
| private final File | |
| private boolean | |
| private final FileRepository |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private boolean | |
| pack-priv boolean | Returns: true if committing (or unlocking/deleting) succeeds.Commit changes to the gc log, if there have been any writes. |
| private Instant | |
| pack-priv boolean | |
| pack-priv void | |
| pack-priv void |
| gcLogExpire | back to summary |
|---|---|
| private Instant gcLogExpire | |
| lock | back to summary |
|---|---|
| private final LockFile lock | |
| LOG_EXPIRY_DEFAULT | back to summary |
|---|---|
| private static final String LOG_EXPIRY_DEFAULT | |
| logFile | back to summary |
|---|---|
| private final File logFile | |
| nonEmpty | back to summary |
|---|---|
| private boolean nonEmpty | |
| repo | back to summary |
|---|---|
| private final FileRepository repo | |
| GcLog | back to summary |
|---|---|
| pack-priv GcLog(FileRepository repo) Construct a GcLog object for a
| |
| autoGcBlockedByOldLockFile | back to summary |
|---|---|
| private boolean autoGcBlockedByOldLockFile() | |
| commit | back to summary |
|---|---|
| pack-priv boolean commit() Commit changes to the gc log, if there have been any writes. Otherwise, just unlock and delete the existing file (if any)
| |
| getLogExpiry | back to summary |
|---|---|
| private Instant getLogExpiry() throws ParseException | |
| lock | back to summary |
|---|---|
| pack-priv boolean lock() Lock the GC log file for updates
| |
| unlock | back to summary |
|---|---|
| pack-priv void unlock() Unlock (roll back) the GC log lock | |
| write | back to summary |
|---|---|
| pack-priv void write(String content) throws IOException Write to the pending gc log. Content will be committed upon a call to commit()
| |