Search This Blog

Loading...

Thursday, 24 July 2014

Conditions and Locks

In the previous post we saw how the Lock API could be used as an alternative to synchronized block. We also saw how the Lock API allowed us to do chain locking. There is also a condition object closely associated with Locks:

Saturday, 12 July 2014

Locks in Java

After semaphores I decided to look at the Lock interface in Java. The first question that comes is "Why use locks when wait notify works well enough ?" I looked in the documentation for the class and the below lines stand out:

Monday, 16 June 2014

Read-Write to MongoDB via java

In the last post I used the java driver to connect to the MongoDB. Now to read the documents from the collection:

UD - The Update and Delete in CRUD

We have already seen Create and Read operations with MongoDB. We were able to create collections in the database and add documents to them. Now to try updating and deletion of documents.

Sunday, 15 June 2014

Talking to MongoDB via java

In our last post we got started on creating a database and adding docs to a collection. Being a java guy, I wanted to try and use the database connectivity driver provided by MongoDB for use with java applications.