Resets the internal counter. This should be called whenever a new record is added, and whenever all
{@link ShareRequest} completed successfully.

@param context the {@link Context}.
329355
static void reset(Context context) {
        Context appContext = context.getApplicationContext();
        String key = appContext.getString(R.string.wings__retry_policy_consecutive_fails);

        // Synchronously reset consecutive fail count.
        SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(appContext);
        Editor editor = preferences.edit();
        editor.putInt(key, 0);
        editor.commit();
    }
359977
@Override
    public void setEntryCounting(boolean enable) {
        if (enable) {
            if (!entryCountingEnable) {
                // It was disable before but now it will be enable.
                // Therefore, we increase the entry count as size of records.
                cacheContext.increaseEntryCount(size());
            }
        } else {
            if (entryCountingEnable) {
                // It was enable before but now it will be disable.
                // Therefore, we decrease the entry count as size of records.
                cacheContext.decreaseEntryCount(size());
            }
        }
        this.entryCountingEnable = enable;
    }
1242602
public void reset()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
        { // 306998.15
            Tr.debug(tc, "reset");
        }
        out = null;
        // obs = null;
        count = 0;
        total = 0L;
        limit = -1L;
        length = -1L;
        committed = false;
        _hasWritten = false;
        _hasFlushed = false;
        response = null;
    }
530936
public void reset() {
        if (DEBUG)
            LOG.debug("reset {}", this);

        // reset state
        if (_state == State.CLOSE || _state == State.CLOSED)
            return;

        setState(State.START);
        _endOfContent = EndOfContent.UNKNOWN_CONTENT;
        _contentLength = -1;
        _hasContentLength = false;
        _contentPosition = 0;
        _responseStatus = 0;
        _contentChunk = null;
        _headerBytes = 0;
        _host = false;
        _headerComplete = false;
    }
366294
private void updateInstances(List<InstanceContext> instances, final CountingCompletionHandler<Void> counter) {
    for (final InstanceContext instance : instances) {
      data.put(instance.address(), Contexts.serialize(instance).encode(), new Handler<AsyncResult<String>>() {
        @Override
        public void handle(AsyncResult<String> result) {
          if (result.failed()) {
            counter.fail(result.cause());
          } else {
            counter.succeed();
          }
        }
      });
    }
  }
940129
public static void initExceptionHandler(Context context) {

        Log.d("AppRate", "Init AppRate ExceptionHandler");

        Thread.UncaughtExceptionHandler currentHandler = Thread.getDefaultUncaughtExceptionHandler();

        // Don't register again if already registered.
        if (!(currentHandler instanceof ExceptionHandler)) {

            // Register default exceptions handler.
            Thread.setDefaultUncaughtExceptionHandler(new ExceptionHandler(currentHandler, context));
        }
    }
274288
public void onResume(final Context context) {
        new Handler().post(new Runnable() {
            @Override
            public void run() {
                checkLocaleChange(context);
                checkAfterLocaleChanging();
            }
        });
    }
486152
public void createUISharedContext(Context context) {
		if (session != null) {
			uiContexts.put(context.getIndex(), context.duplicate());
		}
	}
1126826
@Override
  public void reset() {
    insertIds.clear();
    updateCounts.clear();
    insertIdNumber = 0;
    hasException = false;
    rewritten = false;
  }
197794
public void resetData() {
		ComponentModel sharedModel = getSharedModel();

		if (sharedModel instanceof DataBoundComponentModel) {
			Object sharedData = ((DataBoundComponentModel) sharedModel).getData();
			setData(copyData(sharedData));

			// clear the user data flag
			setFlags(getFlags() & ~USER_DATA_SET);
		}
	}
105671
public synchronized void reset() {
		executing.reset();
		rejected.reset();
		failed.reset();
		succeeded.reset();

		counter.reset();
		histogram.reset();

		lastFailureReason = null;
		lastRejectReason = null;
	}
485402
@Override
    void reset(String sql) {

        super.reset(sql);
        compileContext.reset();

        lastError = null;
    }
900283
public void initialize(HttpContext context)
    {
        if (_context==null)
            _context=context;
        else if (_context!=context)
            throw new IllegalStateException("Can't initialize handler for different context");
    }
982072
public void reset() throws SQLException {

        try {
            this.sessionProxy.resetSession();
        } catch (HsqlException e) {
            throw Util.sqlException(ErrorCode.X_08006, e.getMessage(), e);
        }
    }
445233
public void resetWithEmptyString()
    {
        mInputBuffer = null;
        mInputStart = -1; // indicates shared buffer not used
        mInputLen = 0;
        mResultString = "";
        mResultArray = null;
        if (mHasSegments) {
            clearSegments();
        }
        mCurrentSize = 0;
    }
706819
@Override
  protected void tryReset(boolean added) {
    additions += step;

    if (!added) {
      return;
    }

    if (additions < period) {
      return;
    }

    int count = 0;
    for (int i = 0; i < table.length; i++) {
      count += Long.bitCount(table[i] & ONE_MASK);
      table[i] = (table[i] >>> 1) & RESET_MASK;
    }
    additions = (additions >>> 1) - (count >>> 2);
    doorkeeper.clear();
  }
541179
protected function _actionDeleterequest(AnCommandContext $context)
    {
        $this->getResponse()->status = AnHttpResponse::RESET_CONTENT;
        $this->getItem()->removeRequester($this->actor);
    }