-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #513 from aionnetwork/db-archive-states
Archive states & prune refactor
- Loading branch information
Showing
35 changed files
with
3,683 additions
and
1,488 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package org.aion.base.db; | ||
|
||
/** | ||
* Interface for pruning configuration parameters. | ||
* | ||
* @author Alexandra Roatis | ||
*/ | ||
public interface IPruneConfig { | ||
|
||
/** | ||
* Indicates if pruning should be enabled or disabled. | ||
* | ||
* @return {@code true} when pruning enabled, {@code false} when pruning disabled. | ||
*/ | ||
boolean isEnabled(); | ||
|
||
/** | ||
* Indicates if archiving should be enabled or disabled. | ||
* | ||
* @return {@code true} when archiving enabled, {@code false} when archiving disabled. | ||
*/ | ||
boolean isArchived(); | ||
|
||
/** | ||
* @return the number of topmost blocks for which the full data should be maintained on disk. | ||
*/ | ||
int getCurrentCount(); | ||
|
||
/** | ||
* Gets the rate at which blocks should be archived (for which the full data should be | ||
* maintained on disk). Blocks that are exact multiples of the returned value should be | ||
* persisted on disk, regardless of other pruning. | ||
* | ||
* @return integer value representing the archive rate | ||
*/ | ||
int getArchiveRate(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.