Set a new id for this session.<br/>
Before setting the new id, it removes itself from the associated
manager. After the new id is set, this session adds itself to the
session manager.

@param id
the new session id
500716
protected void setIdForRelocate( final String id ) {

        if ( this.id == null ) {
            throw new IllegalStateException( "There's no session id set." );
        }
        if ( this.manager == null ) {
            throw new IllegalStateException( "There's no manager set." );
        }

        /*
         * and mark it as a node-failure-session, so that remove(session) does
         * not try to remove it from memcached... (the session is removed and
         * added when the session id is changed)
         */
        setNote( MemcachedSessionService.NODE_FAILURE, Boolean.TRUE );
        manager.remove( this );
        removeNote( MemcachedSessionService.NODE_FAILURE );
        this.id = id;
        manager.add( this );

    }
90576
public void setId(final String id) {
        // Set the DBId as well if it isn't a new id
        if (id.matches(CSConstants.EXISTING_TOPIC_ID_REGEX)) {
            DBId = Integer.parseInt(id);
        }
        this.id = id;
    }
62496
protected function updateSession($id)
    {
        $this->session->put($this->getName(), $id);

        $this->session->migrate(true);
    }
166710
public function setId($id)
    {
        if ($this->id) {
            return;
        }
        if (strlen($id) >= 20) {
            $this->id = $id;

            return;
        }
        list($a, $b) = explode(' ', microtime());
        $this->id = preg_replace("/[^\d]/", '', $b.$a.$id);
    }
1287857
public function setId($id)
    {
        if (!is_null($id)) {
            $id = (string) $id;
        }

        $this->id = $id;
        return $this;
    }
374098
private void putId() {
        // note: name and info may be null
        super.put("Provider.id name", String.valueOf(name));
        super.put("Provider.id version", String.valueOf(version));
        super.put("Provider.id info", String.valueOf(info));
        super.put("Provider.id className", this.getClass().getName());
    }
1035540
public void assignID(XAttributable element, XID id) {
		if (id != null) {
			XAttributeID attr = (XAttributeID) ATTR_ID.clone();
			attr.setValue(id);
			element.getAttributes().put(KEY_ID, attr);
		}
	}
819246
protected function setIds($id)
    {
        if ($id) {
            $this->props = $this->mergeProps(array(
                $this->props,
                array(
                    'attribsContainer' => array(
                        'id' => $id.'_container',
                    ),
                    'attribs' => array(
                        'id' => $id,
                    ),
                    'attribsLabel' => array(
                        'for' => $id,
                    ),
                    'attribsHelpBlock' => array(
                        'id' => $id.'_help_block',
                    ),
                ),
            ));
        }
    }
348948
void setId(String sessionAuthId) {
        synchronized (lock) {
            if (isCreatingSession.get()) {
                this.sessionAuthId = sessionAuthId;
            }
            lock.notifyAll();
        }
    }
1269373
public static void setCurrentTraceId(String id) {
    if (id == null) {
      traceId.remove();
    } else {
      traceId.set(id);
    }
  }
642636
public synchronized boolean remove(int id)
   {
		if (tc.isEntryEnabled()) SibTr.entry(this, tc, "remove", ""+id);
      
      final boolean result = contains(id);
      if (result)
      {
         mutableKey.setValue(id);
         idToConvTable.remove(mutableKey);
      }
      if (tc.isEntryEnabled()) SibTr.exit(this, tc, "remove", ""+result);
      return result;
   }
757895
public function setId($id)
    {
       	if ($id !== null && is_numeric($id)) {
            $id = (int) $id;
        }
        $this->id = $id;

        return $this;
    }
944722
public void addObjectId( IdKey id, Object instance ) {
        if ( null == idToObject ) {
            idToObject = new HashMap<IdKey, Object>();
        }
        idToObject.put( id, instance );
    }
698917
public function setId( $id )
	{
		if( $id === $this->getId() ) { return; }

		$this->_values['id'] = (string) $id ;
		$this->setModified();
	}
749013
public void deleteById(String id) {
        final String sid = sessionPrefix + ":" + id;
        try {
            this.executor.execute(new RedisCallback<Void>() {
                public Void execute(Jedis jedis) {
                    jedis.del(sid);
                    return null;
                }
            });
        } catch (Exception e) {
            log.error("failed to delete session(key={}) in redis,cause:{}", sid, Throwables.getStackTraceAsString(e));
        }
    }
1176691
public void remove(Id id){
        String dir = getBaseDirectory(id.getDatabase(),id.getCollection());
        boolean i1 = new File(dir+File.separator+id.getEntity()).delete();
        boolean i2 = new File(dir+File.separator+id.getEntity()+".json").delete();
        if(LOG.isDebugEnabled())
            LOG.debug("File removed successfully("+(i1&&i2)+") id: "+id);
    }
723791
public void remove(String id) {
		final Lock writeLock = lock.writeLock();
		try {
			writeLock.lock();
			final int index = ids.indexOf(id);
			if (index > -1) {
				tasks.remove(index);
				patterns.remove(index);
				ids.remove(index);
				size--;
			}
		} finally {
			writeLock.unlock();
		}
	}