Releases all accounts that were acquired by the given owner.

        :type  owner: object
        :param owner: The owner descriptor as passed to acquire_account().
349761
def release_accounts(self, owner):
        
        for _, pool in self.pools:
            pool.release_accounts(owner)
        self.default_pool.release_accounts(owner)
269525
def add_owners(hash, &factory)
      hash.keys.each { |klass| add_owners_for(klass, hash, &factory) }
    end
337724
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (owner != null)
        {
            Record recUserInfo = this.getOwner();
            RecordOwner recordOwner = recUserInfo.getRecordOwner();
            Record recUserScreenRecord = (Record)recordOwner.getScreenRecord();
            // This will flag the password as changed:
            recUserScreenRecord.getField(UserScreenRecord.NEW_PASSWORD_1).addListener(new ChangeOnChangeHandler(recUserInfo.getField(UserInfo.PASSWORD), true));
            recUserScreenRecord.getField(UserScreenRecord.NEW_PASSWORD_2).addListener(new ChangeOnChangeHandler(recUserInfo.getField(UserInfo.PASSWORD), true));
        }
    }
83268
public void setOwner(ListenerOwner owner)
    {
        if (owner != null)
            if (m_buffer == null)
        {   // Save the current key
            KeyArea keyArea = ((Record)owner).getKeyArea(-1);
            m_buffer = new VectorBuffer(null);
            keyArea.setupKeyBuffer(m_buffer, DBConstants.FILE_KEY_AREA);
        }
        super.setOwner(owner);
    }
30453
def owner(self, owner):
        
        if owner is None:
            raise ValueError("Invalid value for `owner`, must not be `None`")
        if owner is not None and not re.search('[a-z0-9](?:-(?!-)|[a-z0-9])+[a-z0-9]', owner):
            raise ValueError("Invalid value for `owner`, must be a follow pattern or equal to `/[a-z0-9](?:-(?!-)|[a-z0-9])+[a-z0-9]/`")

        self._owner = owner
1073739
def release(self):
        """"""
        with self._lock:
            if not self._locked:
                raise RuntimeError('lock not currently held')
            elif self._reentrant and self._owner is not fibers.current():
                raise RuntimeError('lock not owned by this fiber')
            self._release()
959297
def Release(self):
    
    if self.locked:
      query = ("UPDATE locks SET lock_expiration=0, lock_owner=0 "
               "WHERE lock_expiration=%s "
               "AND lock_owner=%s "
               "AND subject_hash=unhex(md5(%s))")
      args = [self.expires, self.lock_token, self.subject]
      self.store.ExecuteQuery(query, args)
      self.locked = False
788048
def owner_type(self, value):
        
        self._owner_type = value
        if value == 'User':
            self._fields['owner'] = entity_fields.OneToOneField(User)
            if hasattr(self, 'owner'):
                # pylint:disable=no-member
                self.owner = User(
                    self._server_config,
                    id=self.owner.id if isinstance(self.owner, Entity)
                    else self.owner
                )
        elif value == 'Usergroup':
            self._fields['owner'] = entity_fields.OneToOneField(UserGroup)
            if hasattr(self, 'owner'):
                # pylint:disable=no-member
                self.owner = UserGroup(
                    self._server_config,
                    id=self.owner.id if isinstance(self.owner, Entity)
                    else self.owner
                )
1284692
public void releaseAll(Object owner) {
		if (owner == null) {
			return;
		}

		// -------------------- BEGIN CRITICAL SECTION -------------------
		synchronized (lock) {
			if (isShutDown) {
				throw new IllegalStateException("Memory manager has been shut down.");
			}

			// get all segments
			final Set<MemorySegment> segments = allocatedSegments.remove(owner);

			// all segments may have been freed previously individually
			if (segments == null || segments.isEmpty()) {
				return;
			}

			// free each segment
			if (isPreAllocated) {
				for (MemorySegment seg : segments) {
					memoryPool.returnSegmentToPool(seg);
				}
			}
			else {
				for (MemorySegment seg : segments) {
					seg.free();
				}
				numNonAllocatedPages += segments.size();
			}

			segments.clear();
		}
		// -------------------- END CRITICAL SECTION -------------------
	}
770820
def release(self):
        """"""
        #  This decrements the appropriate lock counters, and if the lock
        #  becomes free, it looks for a queued thread to hand it off to.
        #  By doing the handoff here we ensure fairness.
        me = currentThread()
        with self._lock:
            if self.is_exclusive:
                if self._exclusive_owner is not me:
                    raise RuntimeError("release() called on unheld lock")
                self.is_exclusive -= 1
                if not self.is_exclusive:
                    self._exclusive_owner = None
                    #  If there are waiting shared locks, issue it to them
                    #  all and then wake everyone up.
                    if self._shared_queue:
                        for (thread,waiter) in self._shared_queue:
                            self.is_shared += 1
                            self._shared_owners[thread] = 1
                            waiter.notify()
                        del self._shared_queue[:]
                    #  Otherwise, if there are waiting exclusive locks,
                    #  they get first dibbs on the lock.
                    elif self._exclusive_queue:
                        (thread,waiter) = self._exclusive_queue.pop(0)
                        self._exclusive_owner = thread
                        self.is_exclusive += 1
                        waiter.notify()
            elif self.is_shared:
                try:
                    self._shared_owners[me] -= 1
                    if self._shared_owners[me] == 0:
                        del self._shared_owners[me]
                except KeyError:
                    raise RuntimeError("release() called on unheld lock")
                self.is_shared -= 1
                if not self.is_shared:
                    #  If there are waiting exclusive locks,
                    #  they get first dibbs on the lock.
                    if self._exclusive_queue:
                        (thread,waiter) = self._exclusive_queue.pop(0)
                        self._exclusive_owner = thread
                        self.is_exclusive += 1
                        waiter.notify()
                    else:
                        assert not self._shared_queue
            else:
                raise RuntimeError("release() called on unheld lock")
278767
def set_owner(self, path, **kwargs):
        
        response = self._put(path, 'SETOWNER', **kwargs)
        assert not response.content
709516
def owner(self):
        
        if self._owner:
            return self._owner
        elif not self.abstract:
            return self.read_meta()._owner

        raise EmptyDocumentException()
1364947
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (owner != null) if (this.getOwner().getState() == false)
            m_mergeRecord.getTable().removeTable(m_subRecord.getTable()); // If this is off initially, take the table out of the loop
    }
422110
def delegate(from_owner, to_owner, methods):
  
  for method in methods:
    _delegate(from_owner, to_owner, method)
1075788
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (this.getOwner() != null)
        {
            if (m_fldSource != null) if (m_fldSource.getRecord() != this.getOwner().getRecord())
                m_fldSource.getRecord().addListener(new FileRemoveBOnCloseHandler(this));     // Not same file, if target file closes, remove this listener!
            InitOnceFieldHandler behavior = (InitOnceFieldHandler)this.getOwner().getListener(InitOnceFieldHandler.class.getName());
            if (this.getOwner().getRecord().getEditMode() == DBConstants.EDIT_CURRENT)
                behavior = null;    // Special case - if there is a current record, make sure initonce works.
            if (behavior != null)
                behavior.setFirstTime(true);  // If this listener exists it doesn't init initially everything up, so disable for a sec.
            this.syncBehaviorToRecord(null);    // Init now
            if (this.getOwner() instanceof ReferenceField)
                if (this.getOwner().getListener(ReadSecondaryHandler.class.getName()) != null)
                {
                    if (behavior != null)
                        behavior.setEnabledListener(false);  // If this listener exists it doesn't init initially everything up, so disable for a sec.
                    ((FieldListener)this.getOwner().getListener(ReadSecondaryHandler.class.getName())).syncBehaviorToRecord(null);
                }
        }
    }
55301
public void setOwner(ListenerOwner owner)
    {
        if (owner != null)
        if (m_fldDest == null)
            if (fieldName != null)
                m_fldDest = ((BaseField)owner).getRecord().getField(fieldName);
        super.setOwner(owner);
    }
62452
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (m_recordToUpdate == null)
            m_recordToUpdate = this.getOwner();   // Defaults to this file
        if (owner != null) if (this.getOwner() != m_recordToUpdate)
            m_recordToUpdate.addListener(new FileRemoveBOnCloseHandler(this));
        if (m_recordToUpdate != null)
            m_recordToUpdate.setOpenMode((m_recordToUpdate.getOpenMode() | DBConstants.OPEN_LOCK_ON_CHANGE_STRATEGY) & ~(DBConstants.OPEN_READ_ONLY | DBConstants.OPEN_APPEND_ONLY));   // Lock the record if any changes
        if (owner != null)
            if (this.getOwner() == m_recordToUpdate)
                if (this.getOwner().getListener() != this)  // Prevents endless loop (listener is already the first in the list)
        {   // This is special weird logic - This must be the first in the listener list
            this.getOwner().removeListener(this, false);
            super.setOwner(owner);  // Set it back
            this.setNextListener(this.getOwner().getListener());
            this.getOwner().setListener(this);  // This MUST be the first listener on the list.
        }
    }