werkshy/dynamo-session-manager — pull request #3 by jtoberon (2013-03-28 22:10:38+00:00)
Title: Copyright and attribution cleanup. Assorted minor refactoring.

General:
- Repackage serializer
- Add or update copyright to include both the old (Dawson) and the new (EnergyHub)

In JavaSerializer:
- Ensure that streams are closed in a "finally" block
- The code is a little more complicated than usual because it also ensures that the streams are flushed so that the return value is complete.

In DynamoManager:
- Convert member fields to primitives so that it's clear we don't have to worry about NPEs
- Add @Override where relevant
- Remove printStackTrace calls to avoid double logging

In DynamoTableRotator:
- Move all member field initialization to the constructor.
- Change methods from public to protected so that it's more clear which methods are internal
- Propagate InterruptedException rather than swallowing them. If a thread is interrupted, then something bad is happening.
- Make certain accessors synchronized to ensure that a reader thread sees any writes
- Reduce the scope of the synchronized block in rotateTables from the entire method to just the table name member field writes. This ensures that the newly synchronized getter method calls won't block for a long time. Otherwise the rotateTable method is protected by the semaphore member field, so there's no need to synchronize the wholte thing.