org.apache.commons.lang.mutable.MutableInt#setValue ( )源码实例Demo

下面列出了org.apache.commons.lang.mutable.MutableInt#setValue ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: datawave   文件: AccumuloConnectionPool.java
public List<Map<String,String>> getConnectionPoolStats(MutableInt maxTotal, MutableInt numActive, MutableInt maxIdle, MutableInt numIdle,
                MutableInt numWaiting) {
    
    ArrayList<Map<String,String>> t = new ArrayList<>();
    // no changes to underlying values while collecting metrics
    synchronized (connectorToTrackingMapMap) {
        // no changes to underlying values while collecting metrics
        synchronized (threadToTrackingMapMap) {
            // synchronize this last to prevent race condition for this lock underlying super type
            synchronized (this) {
                if (!threadToTrackingMapMap.isEmpty()) {
                    t.addAll(Collections.unmodifiableCollection(threadToTrackingMapMap.values()));
                }
                if (!connectorToTrackingMapMap.isEmpty()) {
                    t.addAll(Collections.unmodifiableCollection(connectorToTrackingMapMap.values()));
                }
                maxTotal.setValue(getMaxTotal());
                numActive.setValue(getNumActive());
                maxIdle.setValue(getMaxIdle());
                numIdle.setValue(getNumIdle());
                numWaiting.setValue(getNumWaiters());
            }
        }
    }
    return Collections.unmodifiableList(t);
}
 
源代码2 项目: systemds   文件: ReaderTextLIBSVM.java
private static long readLIBSVMMatrixFromInputStream( InputStream is, String srcInfo, MatrixBlock dest, MutableInt rowPos, 
		long rlen, long clen, int blen )
	throws IOException
{
	SparseRowVector vect = new SparseRowVector(1024);
	String value = null;
	int row = rowPos.intValue();
	long lnnz = 0;
	
	// Read the data
	try( BufferedReader br = new BufferedReader(new InputStreamReader(is)) ) {
		while( (value=br.readLine())!=null ) { //for each line
			String rowStr = value.toString().trim();
			lnnz += ReaderTextLIBSVM.parseLibsvmRow(rowStr, vect, (int)clen);
			dest.appendRow(row, vect);
			row++;
		}
	}
	
	rowPos.setValue(row);
	return lnnz;
}
 
源代码3 项目: systemds   文件: ReaderTextLIBSVM.java
private static long readLIBSVMMatrixFromInputStream( InputStream is, String srcInfo, MatrixBlock dest, MutableInt rowPos, 
		long rlen, long clen, int blen )
	throws IOException
{
	SparseRowVector vect = new SparseRowVector(1024);
	String value = null;
	int row = rowPos.intValue();
	long lnnz = 0;
	
	// Read the data
	try( BufferedReader br = new BufferedReader(new InputStreamReader(is)) ) {
		while( (value=br.readLine())!=null ) { //for each line
			String rowStr = value.toString().trim();
			lnnz += ReaderTextLIBSVM.parseLibsvmRow(rowStr, vect, (int)clen);
			dest.appendRow(row, vect);
			row++;
		}
	}
	
	rowPos.setValue(row);
	return lnnz;
}
 
源代码4 项目: ScoreboardStats   文件: RefreshTask.java
@Override
public void run() {
    //let the players update smoother
    int remainingUpdates = getNextUpdates();
    for (Map.Entry<Player, MutableInt> entry : queue.entrySet()) {
        Player player = entry.getKey();
        MutableInt remainingTicks = entry.getValue();
        if (remainingTicks.intValue() == 0) {
            if (remainingUpdates != 0) {
                //Smoother refreshing; limit the updates
                plugin.getScoreboardManager().onUpdate(player);
                remainingTicks.setValue(20 * Settings.getInterval());
                remainingUpdates--;
            }
        } else {
            remainingTicks.decrement();
        }
    }

    nextGlobalUpdate--;
    if (nextGlobalUpdate == 0) {
        nextGlobalUpdate = 20 * Settings.getInterval();
        //update globals
        plugin.getReplaceManager().updateGlobals();
    }
}
 
源代码5 项目: aion-germany   文件: NeviwindCanyonReward.java
public void addPointsByRace(Race race, int points) {
    MutableInt pointsByRace = getPointsByRace(race);
    pointsByRace.add(points);
    if (pointsByRace.intValue() < 0) {
        pointsByRace.setValue(0);
    }
}
 
源代码6 项目: aion-germany   文件: NeviwindCanyonReward.java
public void addPvpKillsByRace(Race race, int points) {
    MutableInt pvpKillsByRace = getPvpKillsByRace(race);
    pvpKillsByRace.add(points);
    if (pvpKillsByRace.intValue() < 0) {
        pvpKillsByRace.setValue(0);
    }
}
 
源代码7 项目: aion-germany   文件: JormungandReward.java
public void addPvpKillsByRace(Race race, int points) {
	MutableInt racePoints = getPvpKillsByRace(race);
	racePoints.add(points);
	if (racePoints.intValue() < 0) {
		racePoints.setValue(0);
	}
}
 
源代码8 项目: aion-germany   文件: JormungandReward.java
public void addPointsByRace(Race race, int points) {
	MutableInt racePoints = getPointsByRace(race);
	racePoints.add(points);
	if (racePoints.intValue() < 0) {
		racePoints.setValue(0);
	}
}
 
源代码9 项目: aion-germany   文件: DredgionReward.java
public void addPointsByRace(Race race, int points) {
	MutableInt racePoints = getPointsByRace(race);
	racePoints.add(points);
	if (racePoints.intValue() < 0) {
		racePoints.setValue(0);
	}
}
 
源代码10 项目: aion-germany   文件: KamarBattlefieldReward.java
public void addPointsByRace(Race race, int points) {
	MutableInt racePoints = getPointsByRace(race);
	racePoints.add(points);
	if (racePoints.intValue() < 0) {
		racePoints.setValue(0);
	}
}
 
源代码11 项目: aion-germany   文件: KamarBattlefieldReward.java
public void addPvpKillsByRace(Race race, int points) {
	MutableInt racePoints = getPvpKillsByRace(race);
	racePoints.add(points);
	if (racePoints.intValue() < 0) {
		racePoints.setValue(0);
	}
}
 
源代码12 项目: aion-germany   文件: BalaurMarchingRouteReward.java
public void addPvpKillsByRace(Race race, int points) {
	MutableInt racePoints = getPvpKillsByRace(race);
	racePoints.add(points);
	if (racePoints.intValue() < 0) {
		racePoints.setValue(0);
	}
}
 
源代码13 项目: aion-germany   文件: BalaurMarchingRouteReward.java
public void addPointsByRace(Race race, int points) {
	MutableInt racePoints = getPointsByRace(race);
	racePoints.add(points);
	if (racePoints.intValue() < 0) {
		racePoints.setValue(0);
	}
}
 
public void addPointsByRace(Race race, int points) {
	MutableInt racePoints = getPointsByRace(race);
	racePoints.add(points);
	if (racePoints.intValue() < 0) {
		racePoints.setValue(0);
	}
}
 
public void addPvpKillsByRace(Race race, int points) {
	MutableInt racePoints = getPvpKillsByRace(race);
	racePoints.add(points);
	if (racePoints.intValue() < 0) {
		racePoints.setValue(0);
	}
}
 
源代码16 项目: aion-germany   文件: RunatoriumRuinsReward.java
public void addPointsByRace(Race race, int points) {
	MutableInt racePoints = getPointsByRace(race);
	racePoints.add(points);
	if (racePoints.intValue() < 0) {
		racePoints.setValue(0);
	}
}
 
源代码17 项目: aion-germany   文件: RunatoriumRuinsReward.java
public void addPvpKillsByRace(Race race, int points) {
	MutableInt racePoints = getPvpKillsByRace(race);
	racePoints.add(points);
	if (racePoints.intValue() < 0) {
		racePoints.setValue(0);
	}
}
 
源代码18 项目: aion-germany   文件: RunatoriumReward.java
public void addPointsByRace(Race race, int points) {
	MutableInt racePoints = getPointsByRace(race);
	racePoints.add(points);
	if (racePoints.intValue() < 0) {
		racePoints.setValue(0);
	}
}
 
源代码19 项目: aion-germany   文件: RunatoriumReward.java
public void addPvpKillsByRace(Race race, int points) {
	MutableInt racePoints = getPvpKillsByRace(race);
	racePoints.add(points);
	if (racePoints.intValue() < 0) {
		racePoints.setValue(0);
	}
}