def _internal_increment(self, namespace, request):
    key = request.key()
    entry = self._GetKey(namespace, key)
    if entry is None:
      if not request.has_initial_value():
        return None
      if namespace not in self._the_cache:
        self._the_cache[namespace] = {}
      flags = 0
      if request.has_initial_flags():
        flags = request.initial_flags()
      self._the_cache[namespace][key] = CacheEntry(str(request.initial_value()),
                                                   expiration=0,
                                                   flags=flags,
                                                   cas_id=self._next_cas_id,
                                                   gettime=self._gettime)
      self._next_cas_id += 1
      entry = self._GetKey(namespace, key)
      assert entry is not None

    try:
      old_value = long(entry.value)
      if old_value < 0:




        raise ValueError
    except ValueError:
      logging.error('Increment/decrement failed: Could not interpret '
                    'value for key = "%s" as an unsigned integer.', key)
      return None

    delta = request.delta()
    if request.direction() == MemcacheIncrementRequest.DECREMENT:
      delta = -delta


    new_value = max(old_value + delta, 0) % (2**64)

    entry.value = str(new_value)
    return new_value
Initializes the Interval.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/memcache/memcache_stub.py/MemcacheServiceStub._internal_increment--crossover with--dataset/ETHPy150Open google/openhtf/openhtf/util/timeouts.py/Interval.__init__