[ 
https://issues.apache.org/jira/browse/OAK-3390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14738787#comment-14738787
 ] 

Julian Reschke commented on OAK-3390:
-------------------------------------

Recommendation: borrow from both 
http://docs.oracle.com/javase/6/docs/api/java/sql/Wrapper.html and Sling's 
Adaptable.

- checker function canAdaptTo
- adapter function adaptTo, potentially returning null

The reason for having the checker is that sometimes it can be expensive to 
adapt, and the caller just needs to know whether adapting would be possible.

Define interface in oak-commons, and make DocumentStore implement that.


> Avoid instanceof check in DocumentNodeStore
> -------------------------------------------
>
>                 Key: OAK-3390
>                 URL: https://issues.apache.org/jira/browse/OAK-3390
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core, mongomk
>    Affects Versions: 1.3.4
>            Reporter: Marcel Reutegger
>             Fix For: 1.3.7
>
>
> The instanceof MongoDocumentStore check does not work anymore when the store 
> is wrapped with e.g. the LeaseCheckDocumentStoreWrapper.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to