class PersistNews extends Object
Manages individual news entries stored in separate compressed XML files named with UUID-based file names. Provides atomic write operations and compressed storage for efficient disk usage and data integrity.
Supports loading of news collections with proper sorting, validation, and error handling. Includes utilities for file naming based on content hashes and secure file operations.
| Constructor and Description |
|---|
PersistNews() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
delete(I2PAppContext ctx,
NewsEntry entry)
Unused for now, as we don't have any way to remember it's deleted.
|
static List<NewsEntry> |
load(I2PAppContext ctx)
This does not check for any missing values.
|
static boolean |
store(I2PAppContext ctx,
List<Node> entries)
Store each entry.
|
public static boolean delete(I2PAppContext ctx, NewsEntry entry)
public static List<NewsEntry> load(I2PAppContext ctx)
public static boolean store(I2PAppContext ctx, List<Node> entries)
entries - each one should be "entry" at the root