fess
fess copied to clipboard
Improve Fess Ingest feature implementation
…st coverage
This commit introduces comprehensive improvements to the ingest module:
IngestFactory improvements:
- Replace array-based storage with ArrayList for better performance
- Add caching mechanism with volatile array for efficient concurrent reads
- Implement automatic deduplication (same class replacement)
- Add new methods: remove(), removeByClass(), clear(), size()
- Improve thread-safety with proper synchronization
- Add null validation and defensive copying
- Enhance logging with priority information
Ingester improvements:
- Add priority validation with MIN/MAX/DEFAULT constants (0-999 range)
- Implement equals() and hashCode() based on class type
- Add toString() for better debugging
- Improve Javadoc with detailed parameter descriptions
- Add IllegalArgumentException for invalid priority values
Test coverage improvements:
- IngestFactoryTest: Add 12+ comprehensive test cases covering:
- Sorting, deduplication, null handling
- Remove operations, clear, size
- Defensive copying, concurrent scenarios
- IngesterTest: Replace placeholder tests with 15+ real test cases:
- Priority validation and edge cases
- All process() method variants
- equals/hashCode contracts
- Custom processing implementations
These improvements enhance code maintainability, reliability, and make the ingest module more robust for production use.