List of usage examples for java.util Collections unmodifiableCollection
public static <T> Collection<T> unmodifiableCollection(Collection<? extends T> c)
From source file:com.xwtec.xwserver.util.json.JSONObject.java
public Collection values() { return Collections.unmodifiableCollection(properties.values()); }
From source file:com.datatorrent.stram.StreamingContainerManager.java
@VisibleForTesting protected Collection<Pair<Long, Map<String, Object>>> getLogicalMetrics(String operatorName) { if (logicalMetrics.get(operatorName) != null) { return Collections.unmodifiableCollection(logicalMetrics.get(operatorName)); }//from ww w .j a v a 2 s .c o m return null; }
From source file:com.google.bitcoin.core.Wallet.java
/** * Returns an immutable view of the transactions currently waiting for network confirmations. */// w w w . j ava 2 s.com public Collection<Transaction> getPendingTransactions() { lock.lock(); try { return Collections.unmodifiableCollection(pending.values()); } finally { lock.unlock(); } }
From source file:org.apache.accumulo.server.tabletserver.ScanRunState.java
@Override public long getEntries() { if (this.isEnabled()) { long result = 0; for (Tablet tablet : Collections.unmodifiableCollection(onlineTablets.values())) { result += tablet.getNumEntries(); }/*from w w w. ja v a 2s .c o m*/ return result; } return 0; }
From source file:org.apache.accumulo.server.tabletserver.ScanRunState.java
@Override public long getEntriesInMemory() { if (this.isEnabled()) { long result = 0; for (Tablet tablet : Collections.unmodifiableCollection(onlineTablets.values())) { result += tablet.getNumEntriesInMemory(); }/* w w w .ja va 2 s.co m*/ return result; } return 0; }
From source file:org.apache.accumulo.server.tabletserver.ScanRunState.java
@Override public long getIngest() { if (this.isEnabled()) { long result = 0; for (Tablet tablet : Collections.unmodifiableCollection(onlineTablets.values())) { result += tablet.getNumEntriesInMemory(); }//from www.j a va 2 s . co m return result; } return 0; }
From source file:org.apache.accumulo.server.tabletserver.ScanRunState.java
@Override public int getMajorCompactions() { if (this.isEnabled()) { int result = 0; for (Tablet tablet : Collections.unmodifiableCollection(onlineTablets.values())) { if (tablet.majorCompactionRunning()) result++;//w w w . j a v a 2 s .c o m } return result; } return 0; }
From source file:org.apache.accumulo.server.tabletserver.ScanRunState.java
@Override public int getMajorCompactionsQueued() { if (this.isEnabled()) { int result = 0; for (Tablet tablet : Collections.unmodifiableCollection(onlineTablets.values())) { if (tablet.majorCompactionQueued()) result++;//from w ww . j a v a 2s. com } return result; } return 0; }
From source file:org.apache.accumulo.server.tabletserver.ScanRunState.java
@Override public int getMinorCompactions() { if (this.isEnabled()) { int result = 0; for (Tablet tablet : Collections.unmodifiableCollection(onlineTablets.values())) { if (tablet.minorCompactionRunning()) result++;/* www . jav a 2s . c om*/ } return result; } return 0; }