Docs & rules

sboesebeck/morphiumGitHub

This is a public, read-only report. Striff reads this repository's docs, turns each sentence that makes a claim about the code into a rule, and checks the rule against the code on the default branch. How this works

develop40f13ebLast read Oct 3

Is this yours? Install to manage it

Once installed, Striff checks every pull request.

Rules summary
Documents
Rules
49
24
1
16
6
1
12
12
12
12
12
12
1
25 docs
sboesebeck/morphiumOpen repository

sboesebeck/morphium — documented rules

49 of 49 rules, printed November 17, 2026.

The sentence in your docs
WatchingCacheSynchronizer — opens a MongoDB Change Stream (ChangeStreamMonitor) directly on the watched collections and reacts to whatever it sees change at the database layer, no matter who wrote it.
WatchingCacheSynchronizer depends on ChangeStreamMonitor
Holds
de.caluga.morphium.data.MorphiumRepository<T, K> — extends CrudRepository<T, K> with Morphium-specific escape hatches that have no equivalent in the Jakarta Data 1.0 specification: distinct(String fieldName) and morphium() (direct access to the underlying Morphium instance for aggregation pipelines, atomic field operations, change streams, and messaging), plus query() as a shortcut for morphium().createQueryFor(entityClass).
3 rules from this sentence
MorphiumRepository has a distinct method
Holds
MorphiumRepository has a morphium method
Holds
MorphiumRepository has a query method
Holds
Repository method names are parsed by MethodNameParser into a QueryDescriptor, which QueryExecutor then translates into a Morphium Query.
3 rules from this sentence
MethodNameParser depends on QueryDescriptor
Holds
QueryExecutor depends on QueryDescriptor
Holds
QueryExecutor depends on Query
Holds
JdqlParser parses the string into a JdqlQuery;
JdqlParser depends on JdqlQuery
Holds
Aggregate/grouping support (JdqlQuery.java:25-33, JdqlMethodBridge.java:443-620): SELECT COUNT(this), SUM(field), AVG(field), MIN(field), MAX(field) are compiled into a Morphium aggregation pipeline ($match → $group → optional $match for HAVING → optional $sort).
JdqlMethodBridge depends on JdqlQuery
Holds
SortMapper.apply(...) (and the equivalent inline logic in FindMethodBridge/JdqlMethodBridge) resolves each Sort.property() to its MongoDB field name and applies ascending/descending order (SortMapper.java:26-36).
SortMapper has an apply method
Holds
Return type T (single entity), Behavior requireSingle throws EmptyResultException on zero results, NonUniqueResultException on more than one, Source QueryResultHelper.java:34-44
QueryResultHelper has requireSingle
Holds
Return type Optional<T>, Behavior optionalSingle Optional.empty() on zero results, Optional.of(entity) on exactly one, NonUniqueResultException on more than one, Source QueryResultHelper.java:53-63
QueryResultHelper has optionalSingle
Holds
The key extension point is AbstractMorphiumRepository<T, K>: it implements all CRUD logic as plain doXxx() methods (doFindById, doFindAll, doSave, doDelete, ...) and exposes a protected void setMorphium(Morphium morphium) setter that your framework subclass or generated proxy must call to wire in a live Morphium instance before any doXxx() method is used.
5 rules from this sentence
AbstractMorphiumRepository has a doFindById method
Holds
AbstractMorphiumRepository has a doFindAll method
Holds
AbstractMorphiumRepository has a doSave method
Holds
AbstractMorphiumRepository has a doDelete method
Holds
AbstractMorphiumRepository has a setMorphium method
Holds
setMessagingWindowSize(int): number of messages processed per batch.
MessagingSettings has a setMessagingWindowSize method
Holds
setMessagingMultithreadded(boolean): process multiple messages in parallel using a platform-thread pool;
MessagingSettings has a setMessagingMultithreadded method
Holds
setUseChangeStream(boolean): use MongoDB Change Streams to get push‑style notifications for new messages;
MessagingSettings has a setUseChangeStream method
Holds
setMessagingPollPause(int): pause (in ms) between polling requests when not using Change Streams.
MessagingSettings has a setMessagingPollPause method
Holds
Msg.timestamp is used for ordering, not scheduling
Msg has timestamp
Holds
Morphium provides MessagingCacheSynchronizer (uses this messaging system) and WatchingCacheSynchronizer (uses Change Streams directly, no messaging needed) — see the Developer Guide for which one to pick.
WatchingCacheSynchronizer may not depend on MorphiumMessaging
Holds
PoppyDB is a standalone MongoDB wire protocol-compatible server built on the InMemoryDriver.
PoppyDB depends on InMemoryDriver
Holds
MorphiumProcessor.registerMorphiumIdJsonCustomizers(...) (deployment) ist das exakte Vorbild für das, was wir bauen wollen:
MorphiumProcessor has a registerMorphiumIdJsonCustomizers method
Holds
Quelle MorphiumDriver.getDriverStats() → Map<DriverStatsKey, Double>, Typ Pull (on-demand), Inhalt CONNECTIONS_OPENED/CLOSED/BORROWED/RELEASED/IN_POOL/IN_USE , ERRORS , FAILOVERS , MSG_SENT , REPLY_ , THREADS_CREATED , THREADS_WAITING_FOR_CONNECTION
MorphiumDriver has a getDriverStats method
Holds
Quelle Morphium.getStatistics() → Statistics extends HashMap<String,Double>, Typ Pull (on-demand), Inhalt StatisticKeys WRITES , WRITES_CACHED , READS , CHITS , CMISS , NO_CACHED_READS , CHITSPERC , CMISSPERC , CACHE_ENTRIES , REGISTERED_LOGGERS , WRITE_BUFFER_ENTRIES , PULL , PULLSKIP , SKIPPED_MSG_UPDATES , INSTANCE_COUNT
Morphium has a getStatistics method
Holds
Quelle driver.getNumConnectionsByHost(), Typ Pull, Inhalt Connections pro Host (für Multi-Host-Setups)
MorphiumDriver has a getNumConnectionsByHost method
Holds
Registrierung ausschließlich am Ende von MorphiumProducer.buildMorphium(), direkt neben der bestehenden Zeile (aktuell ca. MorphiumBlockingCallDetector.registerOn(instance) fehlt noch im aktuell gelesenen Ausschnitt bis Zeile 500 — muss beim Patch verifiziert werden, aber der Javadoc von MorphiumBlockingCallDetector belegt exakt diesen Aufrufort/diese Reihenfolge).
MorphiumProducer depends on MorphiumBlockingCallDetector
Holds
Configure via AuthSettings.setAuthMechanism("MONGODB-X509") together with the existing SslHelper mTLS setup
AuthSettings has a setAuthMechanism method
Holds
49 rules from 7 docs

More open-source reports

Every report →

Other public repositories whose docs Striff read and checked against their code.