public TIntLongIterator iterator() { return m.iterator(); // Must be manually synched by user! }
public TIntLongIterator iterator() { return new TIntLongIterator() { TIntLongIterator iter = m.iterator(); public int key() { return iter.key(); } public long value() { return iter.value(); } public void advance() { iter.advance(); } public boolean hasNext() { return iter.hasNext(); } public long setValue( long val ) { throw new UnsupportedOperationException(); } public void remove() { throw new UnsupportedOperationException(); } }; }
/** * Find all tasks that are currently invisible but have passed their invisibility timeout without being marked * completed, and make all these tasks visible again for delivery. * TODO maybe this should only be triggered when the awaiting delivery queue is empty to reduce double-delivery. */ public int redeliver () { long now = System.currentTimeMillis(); TIntLongIterator invisibleIterator = invisibleUntil.iterator(); int nRedelivered = 0; while (invisibleIterator.hasNext()) { invisibleIterator.advance(); int taskId = invisibleIterator.key(); long timeout = invisibleIterator.value(); if (now > timeout) { invisibleIterator.remove(); tasksAwaitingDelivery.add(tasksById.get(taskId)); LOG.warn("Task {} of job {} was not completed in time, queueing it for re-delivery.", taskId, jobId); nRedelivered += 1; } } return nRedelivered; }
/** {@inheritDoc} */ public void putAll( TIntLongMap map ) { ensureCapacity( map.size() ); TIntLongIterator iter = map.iterator(); while ( iter.hasNext() ) { iter.advance(); this.put( iter.key(), iter.value() ); } }
public TIntLongIterator iterator() { return m.iterator(); // Must be manually synched by user! }
@Override public TIntLongIterator iterator() { return m.iterator(); // Must be manually synched by user! }
public TIntLongIterator iterator() { return m.iterator(); // Must be manually synched by user! }
public TIntLongIterator iterator() { return m.iterator(); // Must be manually synched by user! }
public TIntLongIterator iterator() { return new TIntLongIterator() { TIntLongIterator iter = m.iterator(); public int key() { return iter.key(); } public long value() { return iter.value(); } public void advance() { iter.advance(); } public boolean hasNext() { return iter.hasNext(); } public long setValue( long val ) { throw new UnsupportedOperationException(); } public void remove() { throw new UnsupportedOperationException(); } }; }
public TIntLongIterator iterator() { return new TIntLongIterator() { TIntLongIterator iter = m.iterator(); public int key() { return iter.key(); } public long value() { return iter.value(); } public void advance() { iter.advance(); } public boolean hasNext() { return iter.hasNext(); } public long setValue( long val ) { throw new UnsupportedOperationException(); } public void remove() { throw new UnsupportedOperationException(); } }; }
public TIntLongIterator iterator() { return new TIntLongIterator() { TIntLongIterator iter = m.iterator(); public int key() { return iter.key(); } public long value() { return iter.value(); } public void advance() { iter.advance(); } public boolean hasNext() { return iter.hasNext(); } public long setValue( long val ) { throw new UnsupportedOperationException(); } public void remove() { throw new UnsupportedOperationException(); } }; }
@Override public TIntLongIterator iterator() { return new TIntLongIterator() { TIntLongIterator iter = m.iterator(); @Override public int key() { return iter.key(); } @Override public long value() { return iter.value(); } @Override public void advance() { iter.advance(); } @Override public boolean hasNext() { return iter.hasNext(); } @Override public long setValue( long val ) { throw new UnsupportedOperationException(); } @Override public void remove() { throw new UnsupportedOperationException(); } }; }
/** {@inheritDoc} */ public void putAll( TIntLongMap map ) { ensureCapacity( map.size() ); TIntLongIterator iter = map.iterator(); while ( iter.hasNext() ) { iter.advance(); this.put( iter.key(), iter.value() ); } }
/** {@inheritDoc} */ public void putAll( TIntLongMap map ) { ensureCapacity( map.size() ); TIntLongIterator iter = map.iterator(); while ( iter.hasNext() ) { iter.advance(); this.put( iter.key(), iter.value() ); } }
/** {@inheritDoc} */ @Override public void putAll( TIntLongMap map ) { ensureCapacity( map.size() ); TIntLongIterator iter = map.iterator(); while ( iter.hasNext() ) { iter.advance(); this.put( iter.key(), iter.value() ); } }
/** {@inheritDoc} */ @Override public void putAll( TIntLongMap map ) { ensureCapacity( map.size() ); TIntLongIterator iter = map.iterator(); while ( iter.hasNext() ) { iter.advance(); this.put( iter.key(), iter.value() ); } }
/** {@inheritDoc} */ public void putAll( TIntLongMap map ) { ensureCapacity( map.size() ); TIntLongIterator iter = map.iterator(); while ( iter.hasNext() ) { iter.advance(); this.put( iter.key(), iter.value() ); } }