Annotation Interface PreloadRemoteDelegate
Applicable to persistence implementations of entities and operations, i.e., all classes registered via
Db.prepareRemoteDelegate(Class).
Remote delegates are created lazily, one roundtrip per class. For applications with a large
entity model running on links with high latency, this may slow down the application startup
substantially. Annotated classes are collected at build time and can be requested by the client
in a single roundtrip via Session.preloadRemoteDelegates().
The annotation only makes a class a candidate: nothing is preloaded unless the application explicitly requests it, since not all sessions benefit from preloading. Annotate the classes used during startup, not the whole entity model.
Notice that preloading creates the delegate on the server, which invokes
RemoteDbDelegateImpl.initialize(). Classes whose delegates change the state of the
server session when created must not be annotated. DbModificationTracker is such
an example: creating its delegate marks the session as the modification tracker's session.
- See Also: