Direct access to Layer0 resource class built into RequestProcessor
For internal implementations it is important to have as direct and java object synchronization-free access at least to the basic built-in Layer0 resource class.
Also, being able to reference Layer0 in as concise a way as possible would be preferable.
Naturally this poses the problem that interfaces in org.simantics.db
cannot directly reference org.simantics.layer0.Layer0
which is downstream from org.simantics.db
. Really the only way around this is to return Object
or <T> T
.
The current proposal is to add the following:
package org.simantics.db;
public interface ResourceLocator {
/**
* Layer0 is an integral part of Simantics database modelling and for performance
* reasons deserves simplest possible access to its resource class.
*
* @return returns the internally cached
* <code>org.simantics.layer0.Layer0</code> instance
*/
public <T> T l0();
}
-public interface RequestProcessor extends RequestProcessorSpecific, ServiceLocator {
+public interface RequestProcessor extends RequestProcessorSpecific, ServiceLocator, ResourceLocator {