Just a collection of java programs for a quick mental note. Consists of:
- Design Patterns
- Adapter, Builder, Command, NullObject, Observer, Singleton, Strategy, Visitor
- Custom ClassLoader
- Concurrency
- Producer consumer implementation with PriorityBlockingQueue
- ReadWriteLock implementation using synchronized keyword
- BoundedBuffer (an implementation of ArrayBlockingQueue)
- ReentrantReadWriteLock (a simple implementation)
- Futures and Callables (a simple word search example)
- Synchronization gotcha (Effective Java)
- Futures using ExecutorService
- Added a sample program that uses SynchronousQueue for Producer Consumer problem
- Added a sample implementatin of ThreadPool. It has a problem that pool.stop doesn't work properly.
- Added examples of BlockingServer, ThreadedBlockingServer, ThreadPoolBlockingServer, NIOBlockingServer, PollingNIOBlockingServer
- Added a core package with a sample program that tells you how many threads are allowed by the OS on your machine
- Added a sample application which processes 2 stocks GOOG and APPL
- Added a simple race condition example
- NIO examples
- WordCount
- Direct and NonDirect ByteBuffer file read
- MemoryMappedFile example
- Reading very large file (525MB). Just run the shell script run_streaming_file.sh
- Core examples
- OutOfMemory analysis
- Added a simple DBConnectionPool impementation
- Added a program to find the first non repeating character in a string
- Added a sample program for testing String Deduplication (VM argument)
- Added a vmoptions list from my machine (linux antergos - thinkpad X220 core i5)
- Guava examples
- Added example of immutable maps, mutable arraylist
- Converting an InputStream to String
- Graphs
- Added a sample Graph implementation
- Added Dijkstra's shortest path algorithm
- Added Bellman-Ford-Moore's shortest path algorithm
- Documentation
- Added a cheatsheet for GC options
- Added a cheatsheet for OOM causes and solutions
- Added notes on Garbage Collection