Bharat Sharma

This user hasn't shared any biographical information

Homepage: https://bharatonjava.wordpress.com

ArrayBlockingQueue

ArrayBlockingQueue implements BlockingQueue interface. ArrayBlockingQueue is a bounded blocking queue that stores it’s elements in an array internally. Queue orders elements in FIFO (first-in-first-out) order. The head of the array contains element that has been in the queue for the longest time and tail of the queue contains elements that have been in the queue […]

Leave a comment

BlockingQueue

A BlockingQueue is a concurrent data structure that extends Queue interface and supports additional operations with following characteristics: Wait for space to be available when an insert is attempted and queue is full Wait for element to be available when the queue is empty. Usage Scenario BlockingQueue is useful in producer-consumer type of scenarios. One […]

Leave a comment

Reading InputStream Into String With Java 8

Example below shows use of streaming with java 8.

Leave a comment

VI Editor Command Reference

Note: Commands below are case sensitive and may not work on all versions of VI editor. General Commands To use VI vi filename to open file ZZ or :wq To exit vi and save changes :q! To exit vi without saving changes [esc] To enter vi command mode Cursor Movement Commands h move left (backspace) […]

Leave a comment

Exchanger

Java concurrency API provides a synchronization utility java.util.concurrent.Exchanger that allows two threads to exchange data. Exchanger provides a common point where two threads arrive and exchange data between them such that data of first thread goes to the second thread and data of second thread goes to first. Exchanger basically creates a barrier at which […]

, , ,

Leave a comment

Raspberry pi : Installing Tomcat

Well I think raspberry pi 3 (Model B) is a very capable machine and can very well be used as a server for hosting some lightweight web application. I would certainly not want to run an expensive desktop server 24 X 7 and pay huge electric bills just for running a web application for limited […]

, ,

Leave a comment

Raspberry pi : Installing Citrix Receiver

I have been using raspberry pi 3, Model B as my primary computer for a few days now. I have installed Raspbian Jessie on it. Through this series of posts i plan to share details of how i set it up for my everyday use. First requirement for using it as my personal computer was […]

, ,

Leave a comment