Get the N instances that have most recently canceled.

@return
180357
@Override
    public List<Pair<Long, String>> getLastNCanceledInstances() {
        List<Pair<Long, String>> list = new ArrayList<Pair<Long, String>>();
        synchronized (recentCanceledQueue) {
            for (Pair<Long, String> aRecentCanceledQueue : recentCanceledQueue) {
                list.add(aRecentCanceledQueue);
            }
        }
        Collections.reverse(list);
        return list;
    }
1128276
public java.util.List<String> getReservedInstancesOfferingIds() {
        if (reservedInstancesOfferingIds == null) {
            reservedInstancesOfferingIds = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return reservedInstancesOfferingIds;
    }
1242188
@Override
  public Collection<TriggerInstance> getRecentlyFinished(final int limit) {
    final String query = String.format(SELECT_RECENTLY_FINISHED, limit);
    try {
      return this.dbOperator
          .query(query, new TriggerInstanceHandler(SORT_MODE.SORT_ON_START_TIME_ASC));
    } catch (final SQLException ex) {
      handleSQLException(ex);
    }
    return Collections.emptyList();
  }
1044810
public ArrayList<Integer> getVisited() {
    if (0 == (this.registry.length - this.unvisitedCount)) {
      return new ArrayList<Integer>();
    }
    ArrayList<Integer> res = new ArrayList<Integer>(this.registry.length - this.unvisitedCount);
    for (int i = 0; i < this.registry.length; i++) {
      if (ONE == this.registry[i]) {
        res.add(i);
      }
    }
    return res;
  }
409359
public java.util.List<InstanceCount> getInstanceCounts() {
        if (instanceCounts == null) {
            instanceCounts = new com.amazonaws.internal.SdkInternalList<InstanceCount>();
        }
        return instanceCounts;
    }
561461
public java.util.List<String> getRemoveSubnetIds() {
        if (removeSubnetIds == null) {
            removeSubnetIds = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return removeSubnetIds;
    }
1109794
public java.util.List<com.google.appengine.v1.Instance> getInstancesList() {
    return instances_;
  }
862196
public java.util.List<ReservedInstancesOffering> getReservedInstancesOfferings() {
        if (reservedInstancesOfferings == null) {
            reservedInstancesOfferings = new com.amazonaws.internal.SdkInternalList<ReservedInstancesOffering>();
        }
        return reservedInstancesOfferings;
    }
441612
public java.util.List<ActiveInstance> getActiveInstances() {
        if (activeInstances == null) {
            activeInstances = new com.amazonaws.internal.SdkInternalList<ActiveInstance>();
        }
        return activeInstances;
    }
607370
public List<ModelServiceInstance> getAllInstances() {
        List<ModelServiceInstance> result = Collections.emptyList();
        try {
            result = getDirectoryServiceClient().getAllInstances();
        }catch (ServiceException se){
            LOGGER.error("Error when getAllInstances()",se);
        }
        return result;
    }
33675
def getTimeOfClassesRemaining(self,numClasses=0):
        '''
        
        '''
        occurrences = EventOccurrence.objects.filter(
            cancelled=False,
            event__in=[x.event for x in self.temporaryeventregistration_set.filter(event__series__isnull=False)],
        ).order_by('-endTime')
        if occurrences.count() > numClasses:
            return occurrences[numClasses].endTime
        else:
            return occurrences.last().startTime
66205
public List<I> getNewInstanceList(String[] clsssList) {
        List<I> instances = new ArrayList<>();
        for (String className : clsssList) {
            I instance = new ReflectUtil<I>().getNewInstance(className);
            instances.add(instance);
        }
        return instances;
    }
691719
public final Throwable getException() {
        int s = status & DONE_MASK;
        return ((s >= NORMAL)    ? null :
                (s == CANCELLED) ? new CancellationException() :
                getThrowableException());
    }
1028253
public long getLastCompleted() {
    // If there are any queued events, return the index prior to the first event in the queue.
    EventHolder event = events.peek();
    if (event != null && event.eventIndex > completeIndex) {
      return event.eventIndex - 1;
    }
    // If no events are queued, return the highest index applied to the session.
    return lastApplied;
  }
890119
public List<Instance> listInstances() {
    // [START instance_admin_client_list_instances]
    List<Instance> instances =
        Lists.newArrayList(instanceAdminClient.listInstances(Options.pageSize(1)).iterateAll());
    // [END instance_admin_client_list_instances]
    return instances;
  }
677961
public Set<NFAState<T>> getNonEpsilonDestinations()
    {
        Set<NFAState<T>> set = new HashSet<>();
        for (CharRange range : transitions.keySet())
        {
            if (range != null)
            {
                Set<Transition<NFAState<T>>> set2 = transitions.get(range);
                for (Transition<NFAState<T>> tr : set2)
                {
                    set.add(tr.getTo());
                }
            }
        }
        return set;
    }
588028
public final double sampleCount()
  {
    long count = _count.get();
    long lastCount = _lastCount.getAndSet(count);

    return count - lastCount;
  }