Lines Matching refs:operation

108     public boolean add(SyncOperation operation) {
109 return add(operation, null /* this is not coming from the database */);
114 * If an operation is added that already exists, the existing operation is updated if the newly
115 * added operation occurs before (or the interval overlaps).
117 private boolean add(SyncOperation operation,
119 // If an operation with the same key exists and this one should run sooner/overlaps,
120 // replace the run interval of the existing operation with this new one.
121 // Complications: what if the existing operation is expedited but the new operation has an
124 final String operationKey = operation.key;
129 if (operation.compareTo(existingOperation) <= 0 ) {
131 Math.min(existingOperation.latestRunTime, operation.latestRunTime);
135 existingOperation.flexTime = operation.flexTime;
141 operation.pendingOperation = pop;
144 if (operation.pendingOperation == null) {
145 pop = mSyncStorageEngine.insertIntoPending(operation);
147 throw new IllegalStateException("error adding pending sync operation "
148 + operation);
150 operation.pendingOperation = pop;
153 mOperationsMap.put(operationKey, operation);
170 * Remove the specified operation if it is in the queue.
171 * @param operation the operation to remove
173 public void remove(SyncOperation operation) {
175 SyncOperation operationToRemove = mOperationsMap.remove(operation.key);
177 Log.v(TAG, "Attempting to remove: " + operation.key);
181 Log.v(TAG, "Could not find: " + operation.key);
226 * @param extras option bundle to include to further specify which operation to remove. If this
259 sb.append("SyncQueue: ").append(mOperationsMap.size()).append(" operation(s)\n");
260 for (SyncOperation operation : mOperationsMap.values()) {
262 if (operation.effectiveRunTime <= now) {
265 sb.append(DateUtils.formatElapsedTime((operation.effectiveRunTime - now) / 1000));
268 sb.append(operation.dump(mPackageManager, false)).append("\n");