zb: Zone bypass. Zone < 0 unbypass all; Zone > Max bypass all.
168186
def zb_encode(zone, area, user_code):
    """"""
    if zone < 0:
        zone = 0
    elif zone > Max.ZONES.value:
        zone = 999
    else:
        zone += 1
    return MessageEncode('10zb{zone:03d}{area:1d}{code:06d}00'.format(
        zone=zone, area=area+1, code=user_code), 'ZB')
1339841
def move(zone, zonepath):
    '''
    
    '''
    ret = {'status': True}

    ## verify zone
    res = __salt__['cmd.run_all']('zoneadm {zone} move {path}'.format(
        zone='-u {0}'.format(zone) if _is_uuid(zone) else '-z {0}'.format(zone),
        path=zonepath,
    ))
    ret['status'] = res['retcode'] == 0
    ret['message'] = res['stdout'] if ret['status'] else res['stderr']
    ret['message'] = ret['message'].replace('zoneadm: ', '')
    if ret['message'] == '':
        del ret['message']

    return ret
835172
def ready(zone):
    '''
    
    '''
    ret = {'status': True}

    ## ready zone
    res = __salt__['cmd.run_all']('zoneadm {zone} ready'.format(
        zone='-u {0}'.format(zone) if _is_uuid(zone) else '-z {0}'.format(zone),
    ))
    ret['status'] = res['retcode'] == 0
    ret['message'] = res['stdout'] if ret['status'] else res['stderr']
    ret['message'] = ret['message'].replace('zoneadm: ', '')
    if ret['message'] == '':
        del ret['message']

    return ret
347224
def zremrangebyrank(self, name, min, max):
        
        with self.pipe as pipe:
            return pipe.zremrangebyrank(self.redis_key(name), min, max)
1026003
def list_all(zone=None, permanent=True):
    '''
    
    '''
    _zone = {}
    id_ = ''

    if zone:
        cmd = '--zone={0} --list-all'.format(zone)
    else:
        cmd = '--list-all'

    if permanent:
        cmd += ' --permanent'

    for i in __firewall_cmd(cmd).splitlines():
        if re.match('^[a-z0-9]', i, re.I):
            zone_name = i.rstrip()
        else:
            if i.startswith('\t'):
                _zone[zone_name][id_].append(i.strip())
                continue

            (id_, val) = i.split(':', 1)

            id_ = id_.strip()

            if _zone.get(zone_name, None):
                _zone[zone_name].update({id_: [val.strip()]})
            else:
                _zone[zone_name] = {id_: [val.strip()]}

    return _zone
720981
def _clear_zones(self, zone):
        
        cleared_zones = []
        found_last_faulted = found_current = at_end = False

        # First pass: Find our start spot.
        it = iter(self._zones_faulted)
        try:
            while not found_last_faulted:
                z = next(it)

                if z == self._last_zone_fault:
                    found_last_faulted = True
                    break

        except StopIteration:
            at_end = True

        # Continue until we find our end point and add zones in
        # between to our clear list.
        try:
            while not at_end and not found_current:
                z = next(it)

                if z == zone:
                    found_current = True
                    break
                else:
                    cleared_zones += [z]

        except StopIteration:
            pass

        # Second pass: roll through the list again if we didn't find
        # our end point and remove everything until we do.
        if not found_current:
            it = iter(self._zones_faulted)

            try:
                while not found_current:
                    z = next(it)

                    if z == zone:
                        found_current = True
                        break
                    else:
                        cleared_zones += [z]

            except StopIteration:
                pass

        # Actually remove the zones and trigger the restores.
        for z in cleared_zones:
            self._update_zone(z, Zone.CLEAR)
132365
CompletableFuture<Boolean> handleMaxIdleExpireEntry(K key, V value, long maxIdle, boolean skipLocking) {
      return actualRemoveMaxIdleExpireEntry(key, value, maxIdle, skipLocking);
   }
82738
def filter(self, zone='all'):
        
        if not self.is_connected():
            return None

        nodes = self.gce.list_nodes(zone)
        return Filter(nodes)
1364894
private void signalNotFull() {
        final ReentrantLock putLock = this.putLock;
        putLock.lock();
        try {
            notFull.signal();
        } finally {
            putLock.unlock();
        }
    }
1105591
def get_zones(region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)

    return [z.name for z in conn.get_all_zones()]
457748
def remove_zone(self, zone_id):
        """"""
        updated_zones = []
        for zone in self.my_osid_object_form._my_map['zones']:
            if zone['id'] != zone_id:
                updated_zones.append(zone)
        self.my_osid_object_form._my_map['zones'] = updated_zones
753895
def downto(min)
      if block_given?
        super {|dt| yield dt.clear_timezone_offset }
      else
        enum = super
        enum.each {|dt| dt.clear_timezone_offset }
        enum
      end
    end
145477
def delete_zone(zone, region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    if region is None:
        region = 'universal'

    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)

    _zone = conn.get_zone(zone)

    if _zone:
        conn.delete_hosted_zone(_zone.id)
        return True
    return False
186099
def deactivate_boost_by_name(self, zone_name):
        

        zone = self.get_zone(zone_name)
        if zone is None:
            raise RuntimeError("Unknown zone")

        return self.deactivate_boost_by_id(zone["zoneId"])
953347
@Override
	public void setMaxZ(double z) {
		double o = this.minzProperty.doubleValue() ;
		if (o>z) {
			this.maxzProperty.set(o);
			this.minzProperty.set(z);
		}
		else {
			this.maxzProperty.set(z);
		}
	}
1207019
def zremrangebylex(self, key, min=b'-', max=b'+',
                       include_min=True, include_max=True):
        
        if not isinstance(min, bytes):  # FIXME
            raise TypeError("min argument must be bytes")
        if not isinstance(max, bytes):  # FIXME
            raise TypeError("max argument must be bytes")
        if not min == b'-':
            min = (b'[' if include_min else b'(') + min
        if not max == b'+':
            max = (b'[' if include_max else b'(') + max
        return self.execute(b'ZREMRANGEBYLEX', key, min, max)
487691
@Override
  public Iterator<Zone> iterator() {
    final Iterator<String> delegate = api.getZonesOfAccount(account.get()).iterator();
    return new Iterator<Zone>() {
      @Override
      public boolean hasNext() {
        return delegate.hasNext();
      }

      @Override
      public Zone next() {
        return fromSOA(delegate.next());
      }

      @Override
      public void remove() {
        throw new UnsupportedOperationException();
      }
    };
  }