This content has been marked as final.
Show 1 reply
-
1. Re: Infinispan replication mode - make sure only single node do some logic
william.burns Nov 10, 2014 11:07 AM (in response to nir77)1 of 1 people found this helpfulIt sounds like what you really want is a CacheWriter not a CacheListener. Our internal docs on CacheLoader and CacheWriters are found at Infinispan User Guide. You could try using the JPAStore or use one of the various JDBC cache stores that are provided.
If you can't support the JPAStore or have to have your own schema you can always write your own writer/loader. Note that a writer and loader are independent and your implementation doesn't need to implement both interfaces. Some good examples to start from are the SingleFileStore fond at ISPN/src/main/java/org/infinispan/persistence/file/SingleFileStore.java or DummyInMemoryStore found at ISPN/src/test/java/org/infinispan/persistence/dummy/DummyInMemoryStore.java