@Override public List<InternalVertex> getAllNew() { List<InternalVertex> vertices = new ArrayList<InternalVertex>(10); for (InternalVertex v : volatileVertices.values()) { if (v.isNew()) vertices.add(v); } return vertices; }
@Override public List<InternalVertex> getAllNew() { final List<InternalVertex> vertices = new ArrayList<>(10); for (InternalVertex v : volatileVertices.values()) { if (v.isNew()) vertices.add(v); } return vertices; }
public Map<Long,EntryList> retrievePartitionAggregates() { for (PartitionVertexAggregate agg : partitionVertices.values()) agg.completeIteration(); return Maps.transformValues(partitionVertices, PartitionVertexAggregate::getLoadedProperties); }
public Map<Long,EntryList> retrievePartitionAggregates() { for (PartitionVertexAggregate agg : partitionVertices.values()) agg.completeIteration(); return Maps.transformValues(partitionVertices, s -> s.getLoadedProperties()); }
void completeIteration() { for (VertexState<M> state : vertexStates.values()) state.completeIteration(); partitionVertices.clear(); previousScopes = currentScopes; }
void completeIteration() { for (VertexState<M> state : vertexStates.values()) state.completeIteration(); partitionVertices.clear(); previousScopes = currentScopes; inExecute = false; }
for (CacheEntry<Long, V> ce : map.values()) {
for (CacheEntry<Long, V> ce : map.values()) {
@Override public Iterable<S> values() { return vertexStates.values(); }
/** Returns <tt>true</tt> if this Map maps one or more keys to the specified * value. <em>Note</em>: This method requires a full internal traversal of the * hash table and is much slower than {@link #containsKey}. * @param val value whose presence in this map is to be tested * @return <tt>true</tt> if this Map maps one or more keys to the specified value * @throws NullPointerException if the specified value is null */ public boolean containsValue( Object val ) { if( val == null ) return false; if( val == _val_1 ) return true; // Key 0 for( TypeV V : values() ) if( V == val || V.equals(val) ) return true; return false; }
/** Returns <tt>true</tt> if this Map maps one or more keys to the specified * value. <em>Note</em>: This method requires a full internal traversal of the * hash table and is much slower than {@link #containsKey}. * @param val value whose presence in this map is to be tested * @return <tt>true</tt> if this Map maps one or more keys to the specified value * @throws NullPointerException if the specified value is null */ public boolean containsValue( Object val ) { if( val == null ) return false; if( val == _val_1 ) return true; // Key 0 for( TypeV V : values() ) if( V == val || V.equals(val) ) return true; return false; }
/** Returns <tt>true</tt> if this Map maps one or more keys to the specified * value. <em>Note</em>: This method requires a full internal traversal of the * hash table and is much slower than {@link #containsKey}. * @param val value whose presence in this map is to be tested * @return <tt>true</tt> if this Map maps one or more keys to the specified value * @throws NullPointerException if the specified value is null */ public boolean containsValue( Object val ) { if( val == null ) return false; if( val == _val_1 ) return true; // Key 0 for( TypeV V : values() ) if( V == val || V.equals(val) ) return true; return false; }
Iterator<CacheLine> ownedIterator() { return owned.values().iterator(); }
@Override public List<InternalVertex> getAllNew() { List<InternalVertex> vertices = new ArrayList<InternalVertex>(10); for (InternalVertex v : volatileVertices.values()) { if (v.isNew()) vertices.add(v); } return vertices; }
@Override public List<InternalVertex> getAllNew() { List<InternalVertex> vertices = new ArrayList<InternalVertex>(10); for (InternalVertex v : volatileVertices.values()) { if (v.isNew()) vertices.add(v); } return vertices; }
/** * {@inheritDoc} */ @Override public List<E> query(IIndexQuery query) { List<E> results = new ArrayList<>(); Iterator<CustomWeakReference<E>> iterator = map.values().iterator(); while (iterator.hasNext()) { WeakReference<E> weakReference = iterator.next(); if (null != weakReference) { E element = weakReference.get(); if ((null != element) && element.isQueryComplied(query)) { results.add(weakReference.get()); } } } return results; }
public Map<Long,EntryList> retrievePartitionAggregates() { for (PartitionVertexAggregate agg : partitionVertices.values()) agg.completeIteration(); return Maps.transformValues(partitionVertices, s -> s.getLoadedProperties()); }
private void setOwnerClockPut(short owner, OwnerClock oc, long clock) { for (;;) { final long current = oc.lastPut.get(); if (clock <= current) break; if (oc.lastPut.compareAndSet(current, clock)) { if (owner >= 0) { monitor.addStalePurge(oc.invCounter.get()); oc.invCounter.set(0); } else { int count = 0; for (OwnerClock oc1 : ownerClocks.values()) { // counting is approximate due to concurrent updates, but it's only used for monitoring. count += oc1.invCounter.get(); oc1.invCounter.set(0); } monitor.addStalePurge(count); } break; } } }
void completeIteration() { for (VertexState<M> state : vertexStates.values()) state.completeIteration(); partitionVertices.clear(); previousScopes = currentScopes; }
try { assert !copyImmediately; for (Iterator<BackupEntry> it = oldMap.values().iterator(); it.hasNext();) { final BackupEntry be = it.next(); final CacheLine line = cache.getLine(be.id); currentBackupsLock.lock(); try { for (Iterator<BackupEntry> it = map.values().iterator(); it.hasNext();) { final BackupEntry be = it.next(); final CacheLine line = cache.getLine(be.id); for (Iterator<BackupEntry> it = oldMap.values().iterator(); it.hasNext();) { final BackupEntry be = it.next(); final Message.BACKUP backup = currentBackups.get(be.id);