Ports Java Ticl refactoring to C++. This CL also fixes a couple minor nits
discovered in the Ticls while doing the porting.
Original change description:
Refactors the Java Ticl to enable the new Android design:
1. Makes ProtocolHandler a less-active class. Messages are now received by
InvalidationClientCore, which makes a call against ProtocolHandler to
parse the message and receives back a parsed-messaged object in response.
2. ProtocolHandler batching functionality is moved into a nested subclass to
be more-easily persisted.
3. InvalidationClientImpl is split into two classes. InvalidationClientCore
and InvalidationClientImpl. InvalidationClientCore is the bulk of the old
InvalidationClientImpl, containing all of the core logic involved in the
Ticl, but no concurrency control. InvalidationClientImpl contains an
InvalidationClientCore and adds the concurrency control. Specifically, the
model is that ICI can make assertions about which thread it is executing on,
and it can use schedulers to schedule events in the future or to enqueue something
onto the listener thread, but it never does a schedule(NO_DELAY) on the internal
thread. It is the responsibility of the caller to ensure that such calls are made
on the internal thread.
This CL has a large number of lines changed because of the
InvalidationClientImpl / InvalidationClientCore split; it is not actually that
big a change in terms of line count.
git-svn-id: http://google-cache-invalidation-api.googlecode.com/svn/trunk@253 1cc9d426-c294-39be-ba72-c0199ca0f247
10 files changed
tree: e687d307241c62515d750407cbd204e5b5bd154a
- src/