datastax/java-driver — pull request #140 by olvesh (2013-12-09 12:25:53+00:00)
Title: Static list instead of synchronized cache for collection-types

During load-testing of a token service for single sign on I saw a number of waith/block on the
```java
ListType.getInstance(AbstractType)
SetType.getInstance(AbstractType)
MapType.getInstance(AbstractType, AbstractType)
```
This pull requests pre-builds maps of the three collection types and thus drops a ```synchronized``` statement done during each ```PreparedStatement.bind(...)``` for each collection-type in that bind.

We have request/responses of ca 3 ms and able to push through 0.8-2.3k req/sec. With this fix I saw a bump to 2.5-3k req/sec.

We are using a 3 node C* cluster with 32 cores and SSD disks. Plenty fast enough for this. Also we are doing writes and reads at CL1. I saw a near doubling of read/writes on the graph of opscenter, and although it doesn't map up directly with the numbers above, more concurrent traffic is let through.

Hopefully someone else needs this as well.

I am not sure if it is up to your coding-standards - pleas let me know if something needs to be changed.