Method called to reuse a pooled instance.
434007
protected void relink(OutputElementBase parent)
    {
        mNsMapping = parent.mNsMapping;
        mNsMapShared = (mNsMapping != null);
        mDefaultNsURI = parent.mDefaultNsURI;
        mRootNsContext = parent.mRootNsContext;
    }
1262998
def copy(self):
        """"""
        rv = self.__class__(self.capacity)
        rv._mapping.update(self._mapping)
        rv._queue = deque(self._queue)
        return rv
1343565
def reinitialize():
    
    from ozelot import client

    # import all additional models needed in this project
    # noinspection PyUnresolvedReferences
    from ozelot.orm.target import ORMTargetMarker

    client = client.get_client()
    base.Base.drop_all(client)
    base.Base.create_all(client)
193685
public synchronized T borrow() throws JMSException
	{
		if (closed)
			throw new ObjectPoolException("Object pool is closed");
		
		// Object immediately available ?
		int availableCount = available.size();
		if (availableCount > 0)
			return available.remove(availableCount-1);
		
		// Can we create one more ?
		if (all.size() < maxSize)
			return extendPool();
		
		// Pool is exhausted
		switch (exhaustionPolicy)
		{
			case WHEN_EXHAUSTED_FAIL  : throw new ObjectPoolException("Pool is exhausted (maxSize="+maxSize+")");
			case WHEN_EXHAUSTED_BLOCK : return waitForAvailability();
			case WHEN_EXHAUSTED_WAIT  : return waitForAvailability(waitTimeout,true);
			case WHEN_EXHAUSTED_RETURN_NULL : return null;
			case WHEN_EXHAUSTED_WAIT_RETURN_NULL : return waitForAvailability(waitTimeout,false);
			
			default:
				throw new ObjectPoolException("Invalid exhaustion policy : "+exhaustionPolicy);
		}
	}
1372585
def _repopulate_pool(self):
        
        for i in range(self._processes - len(self._pool)):
            w = self.Process(target=self._worker_f,
                             args=(self._inqueue, self._outqueue,
                                   self._initializer,
                                   self._initargs, self._maxtasksperchild))
            self._pool.append(w)
            w.name = w.name.replace('Process', 'PoolWorker')
            w.daemon = True
            w.start()
            debug('added worker')
670813
public void reuse(Tag handler) {
        PerThreadData ptd=(PerThreadData)perThread.get();

        if( ptd==null ) {
            ptd=new PerThreadData();
            ptd.handlers=new Tag[ initialSize ];
            ptd.current=0;
            threadData.put( ptd, ptd );
        }

	if (ptd.current < (ptd.handlers.length - 1)) {
	    ptd.handlers[++ptd.current] = handler;
            return;
        }

        // no more space
        if( ptd.handlers.length < maxSize ) {
            // reallocate
            Tag newH[]=new Tag[ptd.handlers.length + initialSize];
            System.arraycopy(ptd.handlers, 0, newH, 0, ptd.handlers.length);
            ptd.handlers=newH;
            ptd.handlers[++ptd.current]=handler;
            return;
        }

        //else
	handler.release();
    }
468636
def copy(other)
      reserve = [
                 :xf_index,
                 :dxf_index,
                 :xdf_format_indices,
                 :palette
                ]
      (instance_variables - reserve).each do |v|
        instance_variable_set(v, other.instance_variable_get(v))
      end
    end
154317
public void reclaimAll ()
    {
        // make sure any bound sources are released
        for (PooledSource pooled : _sources) {
            if (pooled.holder != null) {
                pooled.holder.stop();
                pooled.holder.reclaim();
                pooled.holder = null;
            }
        }
    }
27281
def clone(self, **kwargs):
        '''
        
        '''
        child = ChildContextDict(parent=self, threadsafe=self._threadsafe, overrides=kwargs)
        return child
309463
@Override
    public Connection makeObject(ObjectPoolWithThreadAffinity<Connection> pool) throws Exception
    {
        Connection conn = connectionFactory.createConnection();
        return new PooledConnection(conn, pool, this.statementsToPool);
    }
369500
def copy(self):
        """"""
        ret = self.__class__(self.callback, **self.__original_kwargs__)
        return self._ensure_assignment_on_copy(ret)
551350
private void release(PooledConnection<C> pooledConnection) {
		long currentTime = System.currentTimeMillis();
		long useTime;
		synchronized(pooledConnection) {
			pooledConnection.releaseTime = currentTime;
			useTime = currentTime - pooledConnection.startTime;
			if(useTime>0) pooledConnection.totalTime.addAndGet(useTime);
			pooledConnection.allocateStackTrace = null;
		}
		// Remove from the pool
		synchronized(poolLock) {
			try {
				if(busyConnections.remove(pooledConnection)) availableConnections.add(pooledConnection);
			} finally {
				poolLock.notify();
			}
		}
	}
233800
def clone(client):
        ''''''
        kwargs = client.redis.connection_pool.connection_kwargs
        kwargs['parser_class'] = redis.connection.PythonParser
        pool = redis.connection.ConnectionPool(**kwargs)
        return redis.Redis(connection_pool=pool)
1267943
public <E> void reuseClassAnalysis(Class<E> analysisClass, Map<ClassDescriptor, Object> map) {
        Map<ClassDescriptor, Object> myMap = classAnalysisMap.get(analysisClass);
        if (myMap != null) {
            myMap.putAll(map);
        } else {
            myMap = createMap(classAnalysisEngineMap, analysisClass);
            myMap.putAll(map);
            classAnalysisMap.put(analysisClass, myMap);
        }
    }
460546
def _repeat(func):
    """"""
    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        """Repeats the call until True is returned."""
        ret = None
        while ret is None:
            ret = func(*args, **kwargs)
        return ret
    return wrapper
652885
private PooledConnection createPooledConnection(JDBCConnection connection)
    throws SQLException {

        LifeTimeConnectionWrapper connectionWrapper =
            new LifeTimeConnectionWrapper(connection, this.connectionDefaults);
        JDBCPooledConnection pooledConnection =
            new JDBCPooledConnection(connectionWrapper);

        connectionWrapper.setPooledConnection(pooledConnection);

        return pooledConnection;
    }
833420
def _clone(self):
        '''
        
        '''
        instance = super(Bungiesearch, self)._clone()
        instance._raw_results_only = self._raw_results_only
        return instance