src/java/org/apache/cassandra/db/SystemTable.java
/**
     * This method is used to update the System Table with the new token for this node
    */
This method is used to update the System Table with the new token for this node
This method is used to update the System Table with the new token for this node
public static synchronized void updateToken(Token token)
    {
        IPartitioner p = StorageService.getPartitioner();
        ColumnFamily cf = ColumnFamily.create(Table.SYSTEM_TABLE, STATUS_CF);
        cf.addColumn(new Column(SystemTable.TOKEN, p.getTokenFactory().toByteArray(token), LamportClock.getVersion()));
        RowMutation rm = new RowMutation(Table.SYSTEM_TABLE, LOCATION_KEY);
        rm.add(cf);
        try
        {
            rm.apply();
        }
        catch (IOException e)
        {
            throw new IOError(e);
        }
        forceBlockingFlush(STATUS_CF);
    }
public static synchronized void updateToken ( Token token ) { IPartitioner p = StorageService . getPartitioner ( ) ; ColumnFamily cf = ColumnFamily . create ( Table . SYSTEM_TABLE , STATUS_CF ) ; cf . addColumn ( new Column ( SystemTable . TOKEN , p . getTokenFactory ( ) . toByteArray ( token ) , LamportClock . getVersion ( ) ) ) ; RowMutation rm = new RowMutation ( Table . SYSTEM_TABLE , LOCATION_KEY ) ; rm . add ( cf ) ; try { rm . apply ( ) ; } catch ( IOException e ) { throw new IOError ( e ) ; } forceBlockingFlush ( STATUS_CF ) ; }
This method is used to update the System Table with the new token for this node
This method is used to update the System Table with the new token for this node