[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Error: Searchable searchable = new Searchable().allowDynamicIndexing(true);  XML
Forum Index -> Ehcache
Author Message
devman

neo

Joined: 08/24/2014 10:57:28
Messages: 1
Offline

Hi,

I am new to using ECache.

I am using Eclipse Kipler and Tomcat 7.0.54.

I am trying to create a searchable with dynamic index cache but I get the follow error when I define: Searchable searchable = new Searchable().allowDynamicIndexing(true);

The error from Eclipse is: "Type mismatch: cannot convert from void to Searchable"

Here is my code snippet:

Configuration cacheManagerConfig = new Configuration();
CacheConfiguration cacheConfig = new CacheConfiguration("PersonCache", 0).eternal(true);

Searchable searchable = new Searchable().allowDynamicIndexing(true);



Any help is greatly appreciative.

Many Thanks!
alexsnaps

consul

Joined: 06/19/2009 09:06:00
Messages: 484
Offline

Right, somehow the Searchable.allowDynamicIndexing(bool) isn't implementing the builder pattern and has its return type be void.

Just do:
Code:
 Searchable searchable = new Searchable();
 searchable.alloDynamicIndexing(true);
 

Alex Snaps (Terracotta engineer)
 
Forum Index -> Ehcache
Go to:   
Powered by JForum 2.1.7 © JForum Team