Comments (9)
https://issues.jboss.org/browse/ISPN-6715 and #15
from infinispan-cachestore-mongodb.
One thing i am trying to figure out the difference in putAsync and org.infinispan.configuration.cache.AsyncStoreConfiguration, even if it always shows AsyncStoreConfiguration.ENABLED is false. But putAsync is works like write-behind. is there any relationship between putAsync and AsyncStoreConfiguration ?
from infinispan-cachestore-mongodb.
cache.putAsync() will asynchronously put the entry into the cache. The following should help you understand:
put() to a persistent write-through cache (i.e. write-behind disabled): writes to both memory and to the cache store before returning
put() to a persistent write-behind cache: writes to memory and returns. Writing to the cache store is performed asynchronously on a separate thread.
putAsync() to a persistent write-through cache (i.e. write-behind disabled): returns immediately. Writes to both memory and to the cache store happen on a single separate thread.
putAsync() to a persistent write-behind cache: returns immediately. Writes to memory and to the cache store is performed asynchronously on two separate threads.
from infinispan-cachestore-mongodb.
How can i enable(use) write-behind through API ? my configurations looks like following?
AsyncStoreConfiguration asyncStore =
p.addStore(MongoDBStoreConfigurationBuilder.class).ignoreModifications(false)
.purgeOnStartup(false)
.fetchPersistentState(true)
.preload(true)
.connectionURI("mongodb://" + hostname + ":" + port + "/" + DATABASE + "?connectTimeoutMS=1000&w=1")
.collection(COLLECTION)
.create()
.async();
System.out.println(asyncStore.enabled()); // this gives false.
config = b.build();
from infinispan-cachestore-mongodb.
from infinispan-cachestore-mongodb.
This is now fixed, closing.
from infinispan-cachestore-mongodb.
Configuration conf = builder
.persistence()
.addStore(MongoDBStoreConfigurationBuilder.class)
.connectionURI(CONNECTION_URI)
.collection(COLLECTION)
.async().enable()
.build();
In MongoDBStoreConfigurationBuilderTest.java, follwoing test is getting failed , Why ? assertTrue(conf.persistence().fetchPersistentState());
from infinispan-cachestore-mongodb.
Even if I have following configurations
<persistence passivation="false"> <mongodbStore xmlns="urn:infinispan:config:store:mongodb:8.2" **_shared="true" preload="true" fetch-state="true" purge="false" singleton="true"_**> <connection uri="mongodb://mongoUser:mongoPass@localhost:27017/infinispan_test_database?w=0&connectTimeoutMS=2000" collection="infinispan_cachestore"/> <write-behind /> </mongodbStore> </persistence>
List stores give the following output against the configuration:
[AbstractStoreConfiguration [attributes=[shared=false, ignoreModifications=false, fetchPersistentState=false, purgeOnStartup=false, preload=false, properties={}], async=AsyncStoreConfiguration [attributes=[enabled=false, modificationQueueSize=1024, threadPoolSize=1]], singletonStore=SingletonStoreConfiguration [attributes=[pushStateWhenCoordinator=true, pushStateTimeout=10000, enabled=false]]]]
from infinispan-cachestore-mongodb.
Running mvn clean install from master
Results :
Tests run: 14, Failures: 0, Errors: 0, Skipped: 0
How are you running it ?
I plan to do a release this week.
from infinispan-cachestore-mongodb.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from infinispan-cachestore-mongodb.