public Object[] getEvents() { return this.cqEvents.toArray(); }
/** * Use {@link #atmosphereFrameworkListeners()} * * @return {@link org.atmosphere.runtime.AtmosphereFrameworkListener} */ @Deprecated public List<AtmosphereFrameworkListener> frameworkListeners() { return Arrays.asList(frameworkListeners.toArray(new AtmosphereFrameworkListener[frameworkListeners.size()])); }
eventArray = queuedEvents.toArray();
Long[] allTimes = runTimes.toArray(new Long[0]); Arrays.sort(allTimes); long maxTimeMs = allTimes[4];
public void processQueueObjectAt( int i ) throws KettleStepException { int index = i - 1; Object[] rows = data.data.toArray();
Object[] jobOutputQueue = testHarness.getOutput().toArray();
public <TYPE extends Message> List<TYPE> getEventsOfType(String eventName, Class<TYPE> eventClass) { List<TYPE> foundEvents = new ArrayList<>(); if (eventName != null && eventClass != null) { List<JsonObject> capturedEvents = Arrays.asList(readEvents.toArray(new JsonObject[0])); for (JsonObject event : capturedEvents) { logger.info("Found event: " + event.toString()); if (EventUtils.getEventName(event).equals(eventName)) { foundEvents.add(ProtobufUtil.jsonToProtobuf(event.toString(), eventClass)); readEvents.remove(event); } } } else { logger.error("Event name or event class is null"); } return foundEvents; }
public <TYPE extends Message> List<TYPE> getEventsOfType(Class<TYPE> eventClass) { List<TYPE> foundEvents = new ArrayList<>(); if (eventClass != null) { List<JsonObject> capturedEvents = Arrays.asList(readEvents.toArray(new JsonObject[0])); for (JsonObject event : capturedEvents) { logger.info("Found event: " + event.toString()); if (EventUtils.getEventName(event).equals(eventClass.getSimpleName())) { foundEvents.add(ProtobufUtil.jsonToProtobuf(event.toString(), eventClass)); readEvents.remove(event); } } } else { logger.error("Event class is null"); } return foundEvents; }
@Override public Object[] toArray() { return _underlying.toArray(); }
@Override public <T> T[] toArray(final T[] a) { return _underlying.toArray(a); }
@Override public StatisticRecord[] getRecords() { return records.toArray(new StatisticRecord[0]); }
/** * Fetch all pending user data records. * @return List of user data Object. */ public synchronized Object[] fetchAll() { Object[] ret = queue.toArray(); queue.clear(); return ret; }
/** * @return the client's listeners. */ public final RakNetClientListener[] getListeners() { return listeners.toArray(new RakNetClientListener[listeners.size()]); }
/** * @return the clients that are currently using the discovery system. */ public RakNetClient[] getClients() { return clients.toArray(new RakNetClient[clients.size()]); }
/** * @return the server's listeners. */ public final RakNetServerListener[] getListeners() { return listeners.toArray(new RakNetServerListener[listeners.size()]); }
/** * Gets a history of all the messages sent on the server. * * @return A list of cached messages. */ public List<CachedMessage> getMessages() { return Lists.reverse(Arrays.asList(messages.toArray(new CachedMessage[0]))); }
/** * Gets a history of all the commands run on the server. * * @return The commands run on the server. */ public List<CachedCommandCall> getCommandCalls() { return Lists.reverse(Arrays.asList(commandCalls.toArray(new CachedCommandCall[0]))); }
public List<OUT> getList() { ESOutputItem[] array = q.toArray(new ESOutputItem[0]); if (needOrder) { Arrays.sort(array, COMPARATOR); } List<OUT> list = new ArrayList<OUT>(array.length); for (ESOutputItem<OUT> esoi : array) { list.add(esoi.out); } return list; } }
public byte[][] getIdentifiersForFailedTransactions() { TransactionInformation identifiers[] = failedTransactions.toArray(new TransactionInformation[0]); byte identifiersBytes[][] = new byte[identifiers.length][]; int i = 0; for(TransactionInformation identifier: identifiers) { identifiersBytes[i++] = identifier.getBytes(); } return identifiersBytes; }