refactoring diamond client

1) remove sychronized from DiamondCache
2) refactoring some code to improve readability