geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GEODE-1190) Should the LuceneServiceProvider get API take a GemFireCache instead of a Cache?
Date Mon, 18 Apr 2016 22:38:25 GMT

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

ASF GitHub Bot commented on GEODE-1190:
---------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-geode/pull/129


> Should the LuceneServiceProvider get API take a GemFireCache instead of a Cache?
> --------------------------------------------------------------------------------
>
>                 Key: GEODE-1190
>                 URL: https://issues.apache.org/jira/browse/GEODE-1190
>             Project: Geode
>          Issue Type: Bug
>          Components: lucene
>            Reporter: Barry Oglesby
>
> Should the LuceneServiceProvider get API take a GemFireCache instead of a Cache?
> The {{LuceneServiceProvider get}} API takes a {{Cache}} like:
> {noformat}
> public static LuceneService get(Cache cache)
> {noformat}
> If I create a {{ClientCache}}, I can't pass that into this method.
> Code like this doesn't compile:
> {noformat}
> ClientCache cache = new ClientCacheFactory().create();
> LuceneService luceneService = LuceneServiceProvider.get(cache);
> {noformat}
> Instead I have to cast the {{ClientCache}} to a {{Cache}}, but that doesn't seem right:
> {noformat}
> ClientCache clientCache = new ClientCacheFactory().create();
> LuceneService luceneService = LuceneServiceProvider.get((Cache) clientCache);
> {noformat}



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

Mime
View raw message