ersistent-store#write-behind-caching
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/How-to-do-write-behind-caching-tp12138p12280.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
gt;
>
> localhost/127.0.0.1:3306
>
>
>
>
>
>
>
>
>
> And it's still not writing the data to the persistent store even after I
> waited for 5 seconds. Any suggestion?
>
> --Ricky
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/How-to-do-write-behind-caching-tp12138p12278.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>
--Ricky
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/How-to-do-write-behind-caching-tp12138p12278.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
IgniteException;
> import org.apache.ignite.Ignition;
> import org.apache.ignite.transactions.Transaction;
>
> import ignite.myexamples.model.Store;
>
> public class TransactionStoreExample {
> public static void main(String[] args) throws IgniteException {
> // In this case, I just try the number 1 and add it with
> the
> amount of 100
> long id = 1;
> long amount = 100;
>
> // Set it as a client
> Ignition.setClientMode(true);
>
> // Start Ignite node.
> try (Ignite ignite =
> Ignition.start("path/to/my/ignite-jdbc.xml")) {
> try (IgniteCache igniteCache =
> ignite.getOrCreateCache("transactionCache")) {
> try (Transaction tx =
> ignite.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
> Store account =
> igniteCache.get((long) id);
> assert account != null;
>
> // update amount
> account.update(amount);
>
> // Store updated account in cache.
> igniteCache.put(id, account);
>
> tx.commit();
>
> System.out.println(igniteCache.get(id));
> }
> }
> }
> }
> }
>
> Thanks for any help that you can provide.
> -- Ricky
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/How-to-do-write-behind-caching-tp12138p12216.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>
--
Best regards,
Andrey V. Mashenkov
.put(id, account);
tx.commit();
System.out.println(igniteCache.get(id));
}
}
}
}
}
Thanks for any help that you can provide.
-- Ricky
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/How-to-do-write-behind-caching-tp12138p12216.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
// update amount
account.update(amount);
// Store updated account in cache.
igniteCache.put(id, account);
tx.commit();
System.
e-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aema
BehindFlushSize(0))?
>
> Thanks for any help that you can provide.
>
>
> If you reply to this email, your message will be added to the discussion
> below:
> http://apache-ignite-users.70518.x6.nabble.com/How-to-do-write-behind-caching-tp12138.html
>
> <http://apach
Hi Ricky,
Here is a link to documentation [1].
Write behind will perform in async way. Yes, you should wait 5 sec for
flush.
[1]
https://apacheignite.readme.io/docs/persistent-store#write-behind-caching
On Thu, Apr 20, 2017 at 5:56 AM, Ricky Nauvaldy wrote:
> Hello, can you provide a tutorial
Hello, can you provide a tutorial for* write-behind* caching? (similar to
the one on this page https://dzone.com/articles/apache-ignite-how-to-
read-data-from-persistent-sto but for *write-behind*). My configuration is
the same as in the example provided in that page above (MySQL database),
with th
10 matches
Mail list logo