com.google.ipc.invalidation.ticl.TestableInvalidationClient.RegistrationManagerState Java Examples
The following examples show how to use
com.google.ipc.invalidation.ticl.TestableInvalidationClient.RegistrationManagerState.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RegistrationManager.java From 365browser with Apache License 2.0 | 5 votes |
/** * Returns a copy of the registration manager's state * <p> * Direct test code MUST not call this method on a random thread. It must be called on the * InvalidationClientImpl's internal thread. */ RegistrationManagerState getRegistrationManagerStateCopyForTest() { List<ObjectIdP> registeredObjects = new ArrayList<ObjectIdP>(); registeredObjects.addAll(desiredRegistrations.getElements(EMPTY_PREFIX, 0)); return new RegistrationManagerState(getRegistrationSummary(), lastKnownServerSummary, registeredObjects); }
Example #2
Source File: RegistrationManager.java From android-chromium with BSD 2-Clause "Simplified" License | 5 votes |
/** * Returns a copy of the registration manager's state * <p> * Direct test code MUST not call this method on a random thread. It must be called on the * InvalidationClientImpl's internal thread. */ RegistrationManagerState getRegistrationManagerStateCopyForTest(DigestFunction digestFunction) { List<ObjectIdP> registeredObjects = new ArrayList<ObjectIdP>(); for (ObjectIdP oid : desiredRegistrations.getElements(EMPTY_PREFIX, 0)) { registeredObjects.add(oid); } return new RegistrationManagerState( RegistrationSummary.newBuilder(getRegistrationSummary()).build(), RegistrationSummary.newBuilder(lastKnownServerSummary.getProto()).build(), registeredObjects); }
Example #3
Source File: RegistrationManager.java From android-chromium with BSD 2-Clause "Simplified" License | 5 votes |
/** * Returns a copy of the registration manager's state * <p> * Direct test code MUST not call this method on a random thread. It must be called on the * InvalidationClientImpl's internal thread. */ RegistrationManagerState getRegistrationManagerStateCopyForTest(DigestFunction digestFunction) { List<ObjectIdP> registeredObjects = new ArrayList<ObjectIdP>(); for (ObjectIdP oid : desiredRegistrations.getElements(EMPTY_PREFIX, 0)) { registeredObjects.add(oid); } return new RegistrationManagerState( RegistrationSummary.newBuilder(getRegistrationSummary()).build(), RegistrationSummary.newBuilder(lastKnownServerSummary.getProto()).build(), registeredObjects); }