5657585960616263646566
List<UserAchievement> userAchievements = userAchievementDaoService.last(maxResults); List<UserLevel> userLevels = userLevelDaoService.last(maxResults); if (cancelled.get()) { throw new CancelledException(); } List<StreamsEntry> achievementLogEntries = transformAchievementEntries(userAchievements); List<StreamsEntry> levelsLogEntries = transformLevelEntries(userLevels);
5960616263646566676869
} } void notifyListener(int numBytes) throws IOException{ if( listener.isCancelled() ) { throw new CancelledException(); } bytesSinceLastNotify += numBytes; if (bytesSinceLastNotify < 1000) { return; }
6061626364656667686970
} void notifyListener(int numBytes) throws IOException{ listener.onRead(numBytes); if( listener.isCancelled() ) { throw new CancelledException(); } bytesSinceLastNotify += numBytes; if (bytesSinceLastNotify < 1000) { return; }
289290291292293294295296297298
int consumed = 0; while (buffer.hasRemaining()) { byte b = buffer.get(); consumed++; if (content[index++] != b) { throw new CancelledException(); } } return consumed; }
149150151152153154155156
public void stop() { shallStop = true; } public void checkCancelled() throws CancelledException { if (shallStop) { throw new CancelledException(); } }
262263264265266267268269270271272
cmd.file(Path.create("file1")); cmd.set(new CancelSupport() { int i = 0; public void checkCancelled() throws CancelledException { if (i++ == 2) { throw new CancelledException(); } } }); try { cmd.execute(new ByteChannel() {
198199200201202203204205206207
HgCallbackTargetException ex = (HgCallbackTargetException) failure; failure = null; throw ex; } if (failure instanceof CancelledException) { CancelledException ex = (CancelledException) failure; failure = null; throw ex; } }
83848586878889909192
if (failure != null) { HgCallbackTargetException toThrow = failure; throw toThrow; } if (lifecycleBridge.isCancelled()) { CancelledException toThrow = lifecycleBridge.getCancelOrigin(); assert toThrow != null; throw toThrow; } }