RSS feed [root] /weblog /java




login:

password:

title search:




 


Sun Dec 14 09:36:42 HKT 2014

java



(google search) (amazon search)
second
download zip of files only

Sat Nov 18 16:29:46 HKT 2017 From /weblog/java/performance

memory


Will you get any performance improvement if you manage memory yourself? - http://mentablog.soliveirajr.com[..]ne-is-faster-java-heap-or-native-memory/

More heap, GC will get slower - http://plumbr.eu[..]ing-heap-size-beware-of-the-cobra-effect

Collection of tools to analysis GC activities - http://www.fasterj.com/tools/gcloganalysers.shtml

Another presentation of performance hint for hotspot or memory - http://www.infoq.com/presentations/Extreme-Performance-Java

Show how to enable and analyze the verbose:gc out data - http://javaeesupportpatterns.blogspot.com.au[..]3/01/java-verbose-gc-tutorial-video.html

Discussion and comparison of difference GC at Java 1.7 - http://mechanical-sympathy.blogspot.com.au[..]7/java-garbage-collection-distilled.html . And here is the detail experiment among those difference GC, look like G1 is quite promising - http://java-is-the-new-c.blogspot.com.au[..]ng-and-benchmarking-java-7s-garbage.html

Memory is not allocate to single block, thus even you allocate enough memory in term of size, it may not enough to held individual object - https://plumbr.eu/blog/outofmemoryerror-on-overprovisioned-heap

Introduction to metaspace - http://www.infoq.com/articles/Java-PERMGEN-Removed

http://vanillajava.blogspot.com.au[..]optimising-memory-consumption-first.html

Some comments about System.gc() - http://jeremymanson.blogspot.com[..]om/2015/12/why-i-dont-like-systemgc.html

http://blog.takipi.com[..]ng-your-java-garbage-collection-overhead

Logging stop-the-world pauses in JVM - https://plumbr.eu[..]log/logging-stop-the-world-pauses-in-jvm

Why we should put difference app in same VM - http://mydailyjava.blogspot.hk[..]0/generational-disparity-in-garbage.html

Atlassian GC tuning guide - https://confluence.atlassian.com[..]ollection-gc-tuning-guide-461504616.html

Using jemalloc to get to the bottom of a memory leak - https://gdstechnology.blog.gov.uk[..]c-to-get-to-the-bottom-of-a-memory-leak/

Troubleshooting-Java-Memory-Issues - https://www.infoq.com/articles/Troubleshooting-Java-Memory-Issues

Shenandoah Garbage Collector look good - https://www.javacodegeeks.com[..]emory-usage-right-garbage-collector.html

(google search) (amazon search)


Tue Nov 07 16:01:37 HKT 2017 From /weblog/java/performance

cases


A case showing java is faster than C++ - https://groups.google.com[..]mgroups#!topic/comp.lang.c++/7aNw3PzPvMI

Case show how to improve GC time spend on a java application - http://javaeesupportpatterns.blogspot.com.au[..]11/java-vm-beware-of-younggen-space.html

A case study of solving thread contention - http://blogs.mulesoft.org[..]fighting-thread-contention-in-your-code/

http://www.cubrid.org[..]-of-java-application-performance-tuning/

Notes about measuring map performance - http://vanillajava.blogspot.com.au[..]ronicle-map-and-yahoo-cloud-service.html

High Performance Java - Binary instead of Objects - John Davies - https://vimeo.com/138956045 http://www.infoq.com/presentations/java-low-latency

jemalloc, look like a really nice tool - https://gdstechnology.blog.gov.uk[..]c-to-get-to-the-bottom-of-a-memory-leak/

story of finding why there is so many GC - http://www.infoq.com[..]horough-jvm-thorough-analysis-ygc-part01

GC thread blocked by system call - http://www.infoq.com/cn/articles/GC-Log-Uncovers-Pause https://www.infoq.com/articles/GC-Log-Uncovers-Pause

We always need benchmark - https://arnaudroger.github.io[..]2017/06/15/forward-vs-backward-loop.html

Investigation and solutions of performance issue caused by GC log - https://engineering.linkedin.com[..]c-pauses-caused-by-background-io-traffic

(google search) (amazon search)


Tue Oct 31 10:18:25 HKT 2017 From /weblog/java/fundamental

java.lang.ref


Overview of weak, soft and Phantom References
Second, PhantomReferences avoid a fundamental problem with finalization: finalize() methods can "resurrect" objects by creating new strong references to them. So what, you say? Well, the problem is that an object which overrides finalize() must now be determined to be garbage in at least two separate garbage collection cycles in order to be collected. When the first cycle determines that it is garbage, it becomes eligible for finalization. Because of the (slim, but unfortunately real) possibility that the object was "resurrected" during finalization, the garbage collector has to run again before the object can actually be removed. And because finalization might not have happened in a timely fashion, an arbitrary number of garbage collection cycles might have happened while the object was waiting for finalization. This can mean serious delays in actually cleaning up garbage objects, and is why you can get OutOfMemoryErrors even when most of the heap is garbage.

With PhantomReference, this situation is impossible -- when a PhantomReference is enqueued, there is absolutely no way to get a pointer to the now-dead object (which is good, because it isn't in memory any longer). Because PhantomReference cannot be used to resurrect an object, the object can be instantly cleaned up during the first garbage collection cycle in which it is found to be phantomly reachable. You can then dispose whatever resources you need to at your convenience.

Arguably, the finalize() method should never have been provided in the first place. PhantomReferences are definitely safer and more efficient to use, and eliminating finalize() would have made parts of the VM considerably simpler. But, they're also more work to implement, so I confess to still using finalize() most of the time. The good news is that at least you have a choice.

http://weblogs.java.net[..]las/archive/2006/05/understanding_w.html

The other valuable reference about object life cycle - http://java.sun.com[..]ormance/1st_edition/html/JPAppGC.fm.html

Incorrect use of reference can cause GC issue - http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4405807

fews more related blog - http://www.egimaben.com[..]garbage-collector-and-reference-objects/ https://medium.com[..]in-java-and-why-they-matter-c04bfc9dc792

(google search) (amazon search)


Thu Sep 28 16:21:47 HKT 2017 From /weblog/java/concurrency

Contended


preventing false sharing with the @Contended annotation - https://dzone.com[..]false-sharing-is-and-how-jvm-prevents-it

(google search) (amazon search)


Thu Aug 31 10:38:43 HKT 2017 From /weblog/java/tools

jhsdb


The jhsdb tool is described on its Oracle JDK 9 Documentation Early Access page, "You use the jhsdb tool to attach to a Java process or to launch a postmortem debugger to analyze the content of a core-dump from a crashed Java Virtual Machine (JVM)." The tool comes with several "modes" and several of these modes correspond in name and function with individual command-line tools available in previous JDK distributions. The jhsdb tool not only provides a single tool that encompasses functionality of multiple other tools, but it also provides a single, consistent approach to applying these different functions. For example, the jhsdb command-line syntax for getting help for each of the "modes" is identical.

http://marxsoftware.blogspot.hk/2017/06/jhsdb-jdk9.html
https://docs.oracle.com[..]UID-0345CAEB-71CE-4D71-97FE-AA53A4AB028E

(google search) (amazon search)


Sat Aug 26 14:11:22 HKT 2017 From /weblog/java/fundamental

garbage


Some overview articles - http://javarevisited.blogspot.com[..]/2011/04/garbage-collection-in-java.html http://jeremymanson.blogspot.com[..]10/01/garbage-collection-references.html http://www.oracle.com[..]work/java/javase/gc-tuning-6-140523.html

Interview with Azul, about the pauseless GC - http://www.infoq.com/interviews/gil-tene-azul-zing

A story of how to tune GC - http://kirk.blog-city.com/why_do_i_have_this_long_gc_pause.htm

NewRatio ( XX:MaxNewSize ) is important, but usually ignored - http://blogs.oracle.com[..]ector/entry/the_second_most_important_gc

Java memory configuration and monitoring - http://blog.codecentric.de[..]ry-configuration-and-monitoring-3rd-act/

How Garbage Collection differs in the three big JVMs - http://blog.dynatrace.com[..]ollection-differs-in-the-three-big-jvms/

Garbage Collection Bootcamp 1.0 - http://www.lucidimagination.com[..]1/03/27/garbage-collection-bootcamp-1-0/

http://javarevisited.blogspot.sg[..]ollection-interview-question-answer.html

How CMS work - https://blogs.oracle.com[..]thecollector/entry/hey_joe_phases_of_cms

Compare between difference VM - http://www.optaplanner.org[..]IsTheFastestGarbageCollectorInJava8.html

GC handbook - https://plumbr.eu/java-garbage-collection-handbook

Check what GC you are using - http://marxsoftware.blogspot.hk[..]16/04/determining-garbage-collector.html

About G1 Java Garbage Collector - http://dobbscodetalk.com[..]G1-Java-Garbage-Collector.html&Itemid=29

Tools to visualize GC - http://gceasy.io/

Visualizing difference algorithm - https://spin.atomicobject.com[..]sualizing-garbage-collection-algorithms/

safepoints - http://performantcode.com/gc/safepoints/

(google search) (amazon search)



Fri Jun 02 17:55:34 HKT 2017 From /weblog/java/libraries

parsing


Introducing LALR parser in java - http://martinfowler.com/bliki/HelloCup.html

https://tomassetti.me/parsing-in-java/

(google search) (amazon search)


Thu May 18 10:29:03 HKT 2017 From /weblog/java/concurrency

tutorial


Another nice tutorial set of concurrency framework - http://www.javacodegeeks.com/search/label/Concurrency

Java concurrency, Building and testing concurrent applications for the Java platform - http://www.ibm.com[..]/training/kp/j-kp-concurrency/index.html

JVM concurrency: Java and Scala concurrency basics - http://www.ibm.com[..]/java/library/j-jvmc1/index.html?ca=drs-

http://javarevisited.blogspot.com.au[..]reading-interview-questions-answers.html

5 things you didn't know about ... Multithreaded Java programming - https://www.ibm.com/developerworks/library/j-5things15

(google search) (amazon search)


Thu May 18 10:28:15 HKT 2017 From /weblog/java/features

jdbc


5 things you didn't know about ... Java Database Connectivity - https://www.ibm.com/developerworks/library/j-5things10/index.html

(google search) (amazon search)


Wed May 17 10:27:49 HKT 2017 From /weblog/java/tools

monitoring


Java Flight Recorder, a tool to record all detail of how the API work for undo and replay and detail profiling - http://docs.oracle.com/cd/E15289_01/doc.40/e15070/toc.htm

Creating Custom JFR Events - http://hirt.se/blog/?p=444

Java Mission Control - http://blog.eisele.net[..]-mission-control-52-is-finally-here.html http://hirt.se/blog/?p=343 http://hirt.se/blog/?p=364&cpage=1#comment-98 https://www.infoq.com/news/2016/10/Java-Flight-Recorder-Mission

Support of JMX from common java library - http://www.javacodegeeks.com[..]ling-jmx-in-hibernate-ehcache-qurtz.html

sample code show how to get vm info at jmx - http://blogs.sun.com/jmxetc/entry/how_to_retrieve_remote_jvm

An excellent short tutorial of JMX - http://java.sun.com/developer/technicalArticles/J2SE/jmx.html

Monitoring all tomcat 5 JMX information, with free tools and java startup config - http://jroller.com[..]illiams/20050202#monitoring_tomcat_5_5_x

Task manager like jconsole plugin - http://blog.luminis.nl[..]is/entry/top_threads_plugin_for_jconsole

Performance cost of JMX - http://weblogs.java.net[..]nus/archive/2006/07/how_much_does_i.html

Monitoring Local and Remote Applications Using JMX 1.2 and JConsole - http://onjava.com/lpt/a/5226

Collections of tools - http://www.javacodegeeks.com[..]/client-side-server-monitoring-with.html

remote conenction with ssh - http://theholyjava.wordpress.com[..]nitoring-remote-jvm-over-ssh-jmx-or-not/

IBM healthcare API - http://www.ibm.com[..]rary/j-healthcareapi1/index.html?ca=drs- http://www.ibm.com/developerworks/java/jdk/tools/healthcenter/

JVM Statistics with jstat - http://marxsoftware.blogspot.hk[..]k/2017/05/jvm-statistics-with-jstat.html

(google search) (amazon search)


Sat May 06 14:13:47 HKT 2017 From /weblog/java/features

java8


Introduction of Lambdas expression in Java - http://zeroturnaround.com/labs/java-8-the-first-taste-of-lambdas/ , an example show how lambdas help to clean up the duplication - http://www.nurkiewicz.com[..]mplifying-readwritelock-with-java-8.html

Another article about Java8 change, where Lambdas is the highlight - http://www.infoq.com/news/2013/08/everything-about-java-8 http://www.shaunabram.com/java8/

Nice tutorial - http://www.dreamsyssoft.com/java-8-lambda-tutorial/index.php

Huge list of articles - http://www.baeldung.com/java8

Use lambdas to replace for-loop - http://saltnlight5.blogspot.com.au[..]creating-your-own-loop-structure-in.html https://www.ibm.com/developerworks/library/j-java8idioms3

Overview for new Date/Time library - http://www.infoq.com/articles/java.time

http://www.javacodegeeks.com[..]om/2014/05/java-8-features-tutorial.html

Grouping and partitioning with stream - http://fahdshariff.blogspot.com[..]/11/java-8-streams-api-grouping-and.html
In a nutshell, make sure to never override a default method in another interface - http://mydailyjava.blogspot.com.au[..]va-8-default-methods-can-break-your.html

Convert SQL feature to stream - http://blog.jooq.org[..]and-their-equivalents-in-java-8-streams/

(google search) (amazon search)


Mon Mar 27 10:38:42 HKT 2017 From /weblog/java/features

reflection


Good : dynamic, generic
Bad: slow, don't work with Obfuscators and most searching and refactoring tools

http://jroller.com/page/ie?entry=time_to_reconsider_reflection

A very nice tool to get parameter name - http://paranamer.codehaus.org/ (e.g.: user of getUser(User user))

How to improve the performance - http://coding-masters.blogspot.com[..]-reflection-as-fast-as-direct-calls.html

The problem of using reflection to modify final field - http://www.azulsystems.com[..]7-writing-to-final-fields-via-reflection

Using reflection for using test - http://www.javaadvent.com[..]f-hacking-enums-and-modifying-final.html

Sharing about using invokedynamic - http://www.infoq.com/presentations/invokedynamic http://www.infoq.com[..]ticles/Invokedynamic-Javas-secret-weapon https://www.infoq.com/articles/Invokedynamic-Javas-secret-weapon

(google search) (amazon search)


Sun Mar 26 00:09:52 HKT 2017 From /weblog/java/string

regex


Introduction to a library which support faster regular expression processing: http://weblogs.java.net[..]ite/archive/2006/03/a_faster_java_r.html http://www.javaadvent.com[..]-expression-library-benchmarks-2015.html

Regex helper - https://github.com/VerbalExpressions/JavaVerbalExpressions

java-regular-expressions-cheat-sheet - https://zeroturnaround.com[..]abs/java-regular-expressions-cheat-sheet

(google search) (amazon search)


Fri Mar 10 17:49:16 HKT 2017 From /weblog/java/concurrency

Map


putall can cause ConcurrentModifcationException - http://cr.openjdk.java.net[..]ses/sun/management/Agent.java.sdiff.html

Note on writing CopyOnWrite wrapper - http://flyingspaniel.blogspot.com[..]ot.com/2010/12/copyonwrite-wrappers.html

Sometime this is a bit difficult for Chinese to be a good programmer, recently some colleague and me discuss about the behaviour of this class and look like we have difficult understanding

A: ConcurrentHashMap support for locking as this is thread-safe
B: ConcurrentHashMap is thread safe for read but not for write because there is no lock, we still need to have external lock to keep it thread safe. By the way, I get ConcurrentModificationException from this before.
C: ConcurrentHashMap don't support for locking but they still thread safe for all operations, which is how "This class is fully interoperable with Hashtable in programs that rely on its thread safety but not on its synchronization details." mentioned.

Too good that we can actually take a look at the source code to see what going on nowadays rather than just guessing - http://www.google.com[..]HashMap&sourceid=opera&ie=utf-8&oe=utf-8 By the way, this constructor is useful for a lot of concurrency access but actually not many developer notice about this - http://java.sun.com[..]rrentHashMap.html#ConcurrentHashMap(int, float, int)

Lazy initialization of map values - http://artisans-serverintellect-com.si-eioswww6.com[..]ect-com.si-eioswww6.com/default.asp?W122

HashMap.get() can cause infinite loop - http://lightbody.net[..]5/07/hashmapget_can_cause_an_infini.html

Discussing the effect of initCapacity() of HashMap in Java - http://saloon.javaranch.com[..]ltimatebb.cgi?ubb=get_topic&f=1&t=021171

OpenJDK and HashMap …. Safely Teaching an Old Dog New (Off-Heap!) Tricks - http://www.infoq.com/articles/Open-JDK-and-HashMap-Off-Heap

We can run search in ConcurrenctHashMap - https://dzone.com/articles/concurrenthashmap-in-java8

(google search) (amazon search)


Tue Feb 28 16:39:40 HKT 2017 From /weblog/java/performance

tools


Free online GC log Analyzer - http://gceasy.io/

Free online thread analyzer - http://fastthread.io/

https://dzone.com[..]y-and-cpu-monitoring-tools-and-technique

(google search) (amazon search)


Wed Feb 15 17:35:52 HKT 2017 From /weblog/java/libraries

mapper


Discussion of difference Java base object to object mapper - http://halyph.blogspot.com.au[..]013/10/java-object-to-object-mapper.html

Some information about JOOQ - https://www.infoq.com/news/2017/02/data-geekery-releases-jooq-3-9

(google search) (amazon search)


Tue Feb 07 23:18:45 HKT 2017 From /weblog/java/fundamental

time


How difference platform implement nanoTime() - http://www.javacodegeeks.com[..]12/02/what-is-behind-systemnanotime.html http://stackoverflow.com[..]62/is-system-nanotime-completely-useless

Java timezone ID reference - http://david.uebelacker.ch[..]etrive-locale-and-timezone-from-request/ http://tutorials.jenkov.com[..]m/java-date-time/java-util-timezone.html

setTimeZone affects calls to set(), but doesn’t change the existing Calendar time? So if we wanted to change the time zone we are working with, we have to adjust all the time fields too…but a SimpleDateFormatter still would show it as the current time zone. - http://keyholesoftware.wordpress.com[..]1/joda-time-the-future-of-java-datetime/

http://blog.joda.org[..]va-time-jsr-310-enhancements-java-9.html

(google search) (amazon search)


Tue Jan 03 09:45:40 HKT 2017 From /weblog/java/concurrency

synchronisers


Similar to Barrier - http://tech.puredanger.com/2008/07/08/java7-phasers/

An example, show how to coordinate producer and consumer with Phaser - http://javaforu.blogspot.com[..]08/java-7s-jucphaser-short-tutorial.html

When to use CountDownLatch, Semaphore, CyclicBarrier, Exchanger and Phaser - https://codurance.com/2016/08/24/the-java-synchronisers/

(google search) (amazon search)


Tue Jan 03 09:42:59 HKT 2017 From /weblog/java/performance

option list


-XX:+PerfDisableSharedMem , prevent locking by sharedmem in linux - http://www.evanjones.ca/jvm-mmap-pause.html

How linkedin turn the GC - http://engineering.linkedin.com[..]ughput-and-low-latency-java-applications

Using generational & concurrent GC collector - http://www.javacodegeeks.com[..]/04/ibm-jvm-tuning-gencon-gc-policy.html

Full VM option list : http://blogs.sun.com/roller/resources/watt/jvm-options-list.html, update for Java7 - http://nerds-central.blogspot.com[..]ot.com/2011/07/all-jvm-7-xx-options.html http://stas-blogspot.blogspot.com[..]ost-complete-list-of-xx-options-for.html

A simplified list for some frequency use options - http://rdafbn.blogspot.com.au[..]rbage-collector-guidelines-and-tips.html

HotSpot JVM garbage collection options cheat sheet - http://aragozin.blogspot.com[..]spot-jvm-garbage-collection-options.html http://www.oracle.com[..]va/javase/tech/vmoptions-jsp-140102.html

An example and story about effect of difference VM parameter affecting the performance - http://www.javaspecialists.eu/archive/Issue191.html

Clear the code cache automatically with -XX:+UseCodeCacheFlushing - http://blogs.amd.com[..]time-for-long-running-java-applications/

Discussion about -XX:MinHeapFreeRatio parameter - http://www.gossamer-threads.com[..]s.com/lists/lucene/java-user/44286#44286

The other detailed guide for VM parameters tuning - http://java.sun.com/j2se/1.5/pdf/jdk50_ts_guide.pdf

Here is a more simple cookbook - http://java.sun.com/performance/reference/whitepapers/tuning.html

A outdated (1.4) , compehensive but still not really too detailed, overview of various GC tuning - http://www.petefreitag.com/articles/gctuning/

Some say following VM parameter is good enough
-server -Xmx -XX:+UseParallelGC
http://blogs.sun.com[..]/page/binublog?entry=java_tuning_for_xml

Some say is useful if you have huge memory
-XX:+UseLargePages
http://blogs.sun.com[..]dagastine?entry=java_se_tuning_tip_large

Some say below parameter keep GC in low pause
-XX:MaxGCPauseMillis=5000
Some say below parameter are very optimal
-XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:NewSize=1200m -XX:SurvivorRatio=16
http://www.theserverside.com[..]d.tss?thread_id=41258&ASRC=EM_NNL_347804
Some say those parameter is good
-XX:+UseConcMarkSweepGC
-XX:ParallelCMSThreads=1
-XX:+CMSIncrementalMode
-XX:+CMSIncrementalPacing
-XX:CMSIncrementalDutyCycleMin=0
-XX:CMSIncrementalDutyCycle=10
http://blog.mikiobraun.de/2010/08/cassandra-gc-tuning.html

Just in case anyone is curious, the flags enabled by -XX:+AggressiveOpts in JDK 1.6.0_25 are:

-XX:+EliminateAutoBox
-XX:AutoBoxCacheMax=20000
-XX:BiasedLockingStartupDelay=500
-XX:+DoEscapeAnalysis
-XX:+OptimizeStringConcat
-XX:+OptimizeFill

Generate dump with OOME - -XX:+HeapDumpOnOutOfMemoryError

GC log sample of -XX:+UseConcMarkSweepGC -XX:PrintFLSStatistics=1 -XX:+PrintGCDetails - https://gist.github.com/1329783

A case study of tuning VM GC parameters - http://plumbr.eu[..]ld-you-trust-the-default-settings-in-jvm

Explanation for few performance related VM parameters - http://www.techpaste.com[..]ine-options-jvm-performance-improvement/

Show the exact vm flag that java using - http://matthewkwilliams.com[..]/looking-inside-a-jvm-xxprintflagsfinal/

For G1GC - https://dzone.com[..]e-first-garbage-collector-tuning-flags-1

(google search) (amazon search)


Thu Dec 22 15:47:37 HKT 2016 From /weblog/java/fundamental

collections


Detailed decision of arraylist and linkedlist, consist of a lot benchmark results, take a look if interested: http://javachaos.crazyredpanda.com/?p=99

One bug from java HashMap explaining it can be difficult to achieve fail-fast - http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6625725 http://java.dzone.com/articles/do-your-iterators-always-fail

Performance difference of difference collection - http://java-persistence-performance.blogspot.com[..]0/12/what-is-faster-jvm-performance.html http://leolewis.website.org[..]/2011/07/14/java-collection-performance/

A treelist implementation - http://binkley.blogspot.com/2007_02_01_archive.html

Implement LRU cache using LinkedHashMap - http://vanillajava.blogspot.com[..]11/06/java-secret-lru-cache-in-java.html

Problem of using soft-reference for automate cache clean up - http://comments.gmane.org[..]gmane.comp.java.jsr.166-concurrency/7982

if it claims that an element is contained in it, this might be in error, but if it claims that an element is not contained in it, then this is definitely true. - http://codingjunkie.net/guava-bloomfilter/

Comment of various collections library - http://plumbr.eu/blog/selecting-your-collections-library

List of FAQ of Java collections - http://www.journaldev.com[..]lections-interview-questions-and-answers

Java Collections – Performance (Time Complexity) - http://infotechgems.blogspot.com.br[..]1/java-collections-performance-time.html

Performance improvement for HashMap for Java8 - http://www.nurkiewicz.com[..]hashmap-performance-improvements-in.html

Introduction to GS collection - http://www.infoq.com[..]s/gs-collections-examples-tutorial-part1 http://www.infoq.com[..]s/gs-collections-examples-tutorial-part2

removeEldestEntry, interesting function of linkedhashmap - http://www.ageofjava.com[..]/prevent-your-caches-from-exploding.html

(google search) (amazon search)


Sat Dec 03 09:41:11 HKT 2016 From /weblog/java/libraries

code generation


DSL of code generation - http://namanmehta.blogspot.com.au[..]e-codemodel-to-generate-java-source.html

jannocessor/ - http://maciejwalkowiak.pl[..]8/java-code-generation-with-jannocessor/

Living in the Matrix with Bytecode Manipulation - https://www.infoq.com[..]cles/Living-Matrix-Bytecode-Manipulation http://www.infoq.com[..]cles/Living-Matrix-Bytecode-Manipulation

(google search) (amazon search)


Tue Nov 29 11:43:01 HKT 2016 From /weblog/java/features

javadoc


We can link java source in javadoc page: http://blogs.sun.com[..]amere/Weblog/cool_javadoc_trick#comments

http://marxsoftware.blogspot.hk[..]/inheriting-javadoc-method-comments.html

(google search) (amazon search)


Tue Oct 11 00:24:40 HKT 2016 From /weblog/java/libraries

log


Good thing about LogBack - http://www.infoq.com/news/2007/08/logback

http://blog.takipi.com[..]your-java-logging-with-7-logback-tweaks/

Configuring how exception stack traces appear in log entries using Log4J2 - https://medium.com[..]ies-using-log4j2-e3a3dc5e48bc#.vfx1l1jlr

(google search) (amazon search)


Thu Oct 06 23:58:24 HKT 2016 From /weblog/java/concurrency

Lock


ReentrantReadWriteLock - http://www-128.ibm.com[..]loperworks/library/j-jtp10264/index.html

why it suppose to be faster than VM level lock - http://osdir.com[..]sr.166-concurrency/2005-02/msg00031.html and a test about it - http://mechanical-sympathy.blogspot.gr[..]r/2011/11/java-lock-implementations.html

Samples of how to use it, and how to write test cases about it - http://www.javaspecialists.eu/archive/Issue152.html

Some useful VM parameter to tune the locks: -XX:+EliminateLocks , -XX:+DoEscapeAnalysis , -XX:+UseBiasedLocking - http://work.tinou.com[..]locking-escape-analysis-for-dummies.html

Discuss about 3 difference lock for Java, bias, thin and fat - http://www.javacodegeeks.com/2011/05/how-jvm-handle-locks.html

Why using the read lock will make lock detector fail - http://javaeesupportpatterns.blogspot.com.au[..]concurrency-hidden-thread-deadlocks.html

Basic of synchronization and locking - http://www.takipiblog.com[..]about-synchronization-in-java-and-scala/

Better semaphore with striped api - http://codingjunkie.net/striped-concurrency/

Comparing and discuss difference locking approach - http://www.javaspecialists.eu/archive/Issue215.html

Compare performance behavior of RWLock, StampedLock and Optimistic lock - http://www.takipiblog.com[..]ocks-vs-readwritelocks-and-synchronized/

Comparing sync and lock - http://www.rationaljava.com[..]ase-study-in-analysing-latency-lock.html

http://vmlens.com/articles/reentrant-lock-cheat-sheet/

(google search) (amazon search)