public boolean isEmpty(){ synchronized( mutex ) { return m.isEmpty(); } } public boolean containsKey( long key ) {
public boolean isEmpty() { return m.isEmpty(); } public boolean containsKey( long key ) { return m.containsKey( key ); }
@Override public void run() { if (pendingChunks.isEmpty()) return; synchronized (pendingChunks) { TLongLongIterator it = pendingChunks.iterator(); List<JSONArray> requests = new LinkedList<>(); JSONArray arr = new JSONArray(); while (it.hasNext()) { // key=guild_id, value=timeout it.advance(); if (System.currentTimeMillis() <= it.value()) continue; arr.put(it.key()); if (arr.length() == 50) { requests.add(arr); arr = new JSONArray(); } } if (arr.length() > 0) requests.add(arr); requests.forEach(GuildSetupController.this::sendChunkRequest); } } }
public boolean isEmpty() { return m.isEmpty(); } public boolean containsKey( long key ) { return m.containsKey( key ); }
@Override public boolean isEmpty(){ synchronized( mutex ) { return m.isEmpty(); } } @Override
public boolean isEmpty(){ synchronized( mutex ) { return m.isEmpty(); } } public boolean containsKey( long key ) {
public boolean isEmpty(){ synchronized( mutex ) { return m.isEmpty(); } } public boolean containsKey( long key ) {
public boolean isEmpty(){ synchronized( mutex ) { return m.isEmpty(); } } public boolean containsKey( long key ) {
@Override public boolean isEmpty() { return m.isEmpty(); } @Override
public boolean isEmpty() { return m.isEmpty(); } public boolean containsKey( long key ) { return m.containsKey( key ); }
public boolean isEmpty() { return m.isEmpty(); } public boolean containsKey( long key ) { return m.containsKey( key ); }