/*
@see com.ibm.io.async.IAsyncProvider#getCompletionData2(long, int, long)
339269
@Override
    public boolean getCompletionData2(long bufferAddress, int timeout, long completionPort) throws AsyncException {
        boolean gotData = false;

        if (aioInitialized == AIO_INITIALIZED) {
            gotData = aio_getioev2(bufferAddress, timeout, completionPort);
            if (aioInitialized == AIO_SHUTDOWN) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "getCompletionData2: Shutdown after callout");
                }
                gotData = false;
            }
        }

        return gotData;
    }
233628
@Override
  public long getRecordCount(Path filepath) {
    String[] components = filepath.getName().split(Pattern.quote(SEPARATOR));
    Preconditions.checkArgument(components.length >= 2 && StringUtils.isNumeric(components[components.length - 2]),
        String.format("Filename %s does not follow the pattern: FILENAME.RECORDCOUNT.EXTENSION", filepath));
    return Long.parseLong(components[components.length - 2]);
  }
930089
protected long getPersistentData(int priority, Reliability reliability) throws SIResourceException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(
        tc,
        "getPersistentData",
        new Object[] { new Integer(priority), reliability });

    long prefix = getSubset(reliability).getPersistentData(priority);
        
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getPersistentData", new Long(prefix));
      
    return prefix;
  }
855420
@Override
  protected MtasDataItemLongBasic getItem(int i) {
    if (i >= 0 && i < size) {
      return new MtasDataItemLongBasic(basicValueSumList[i], basicValueNList[i],
          hasSub() ? subCollectorListNextLevel[i] : null, getStatsItems(),
          sortType, sortDirection, errorNumber[i], errorList[i],
          sourceNumberList[i]);
    } else {
      return null;
    }
  }
834350
public static <T> T getCompleted(CompletionStage<T> stage) {
    CompletableFuture<T> future = stage.toCompletableFuture();
    Preconditions.checkArgument(future.isDone() && !future.isCompletedExceptionally());
    try {
      return future.get();
    } catch (InterruptedException | ExecutionException e) {
      // Neither can happen given the precondition
      throw new AssertionError("Unexpected error", e);
    }
  }
672214
public static void afterCompletion(TransactionImpl tran, int status, int syncLevel) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "afterCompletion", new Object[] { tran, status, syncLevel });

        if (syncLevel >= 0) {
            final ArrayList syncs = _syncLevels.get(syncLevel);

            if (syncs != null) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                    Tr.debug(tc, "syncs.length=" + syncs.size());

                final int localID = (int) tran.getLocalTID();
                final byte[] globalID = tran.getTID();
                // d281425 - status maybe committed, unknown or rolledback
                final boolean committed = !(status == Status.STATUS_ROLLEDBACK); // @281425C
                final int numSyncs = syncs.size();

                for (int s = 0; s < numSyncs; s++) {
                    try {
                        ((SynchronizationCallback) syncs.get(s)).afterCompletion(localID, globalID, committed);
                    } catch (Throwable t) {
                        // No FFDC needed
                        Tr.error(tc, "WTRN0074_SYNCHRONIZATION_EXCEPTION", new Object[] { "afterCompletion", syncs.get(s), t });
                        // absorb and allow other afterCompletions to run.
                    }
                }
            } else if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                Tr.debug(tc, "syncs is null");
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.exit(tc, "afterCompletion");
    }
176039
@Override
    public long prepare2(long fd, long completionPort) throws AsyncException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "prepare2: fd = " + fd + " port = " + completionPort);
        }
        return aio_prepare2(fd, completionPort);
    }
1349915
private String getClientData(BufferedReader inFromClient) {
    StringBuilder stringFromClient = new StringBuilder();
    try {
      String line;
      while ((line = inFromClient.readLine()) != null) {
        if (line.matches("<ENDOFDOCUMENT>")) {
          break;
        }
        stringFromClient.append(line).append("\n");
        if (line.matches("</NAF>")) {
          break;
        }
      }
    } catch (IOException e) {
      e.printStackTrace();
    }
    return stringFromClient.toString();
  }
131058
protected int getAllowCachedTimerData(J2EEName j2eeName) {
        Integer allowCachedTimerData = null;
        Map<String, Integer> localAllowCachedTimerDataMap = allowCachedTimerDataMap;
        if (localAllowCachedTimerDataMap != null) {
            allowCachedTimerData = localAllowCachedTimerDataMap.get(j2eeName.toString());
            if (allowCachedTimerData == null) {
                allowCachedTimerData = localAllowCachedTimerDataMap.get("*");
            }
        }
        return allowCachedTimerData != null ? allowCachedTimerData : 0;
    }
754774
public void getPersistentData(ObjectOutputStream dout)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getPersistentData", dout);

    try
    {
      dout.writeLong(tick);
      dout.writeLong(msgId);
      dout.writeInt(storagePolicy);
      dout.writeLong(plockId);
      dout.writeLong(prevTick);
      dout.writeLong(waitTime);
      dout.writeInt(priority);
      dout.writeInt(reliability);
      dout.writeLong(aiRequestTick);
      dout.writeUTF(sourceMEUuid.toString());
    }
    catch (IOException e)
    {
      // No FFDC code needed
      SIErrorException e2 = new SIErrorException(e);

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(tc, "getPersistentData", e2);

      throw e2;
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getPersistentData");
  }
894308
public boolean endOfData(TextProvider textProvider)        
    {
    	clearLastToken(textProvider);
    	clearLeadingSpaces(textProvider);
    	mark(textProvider);
    	if (m_debug)
    		debug("testing",textProvider);
    	try
    	{
    		char c = getNextChar(textProvider);
    		if (c == 0) {
    			unmark(textProvider);
    			return true;
    		}
    	}
    	catch (Exception e)
    	{
			unmark(textProvider);
        	debug(textProvider);
    		return true;
    	}
    	reset(textProvider);
    	return false;
    }
294631
public static String getString(ValueData valueData) throws RepositoryException
   {
      if (valueData instanceof TransientValueData)
      {
         return getString(((TransientValueData)valueData).delegate);
      }

      return ((AbstractValueData)valueData).getString();
   }
1048296
@Override
	public String getInputToParse(String completeInput, int offset, int completionOffset) {
		int fixedOffset = getOffsetIncludingWhitespace(completeInput, offset, Math.min(completeInput.length(), completionOffset));
		return super.getInputToParse(completeInput, fixedOffset, completionOffset);
	}
330235
public void getPersistentData(ObjectOutputStream dout)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getPersistentData", dout);

    try
    {
      dout.writeUTF(_streamKey);
      dout.writeUTF(_streamId.toString());
    }
    catch (IOException e)
    {
      // No FFDC code needed
      SIErrorException e2 = new SIErrorException(e);

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(tc, "getPersistentData", e2);

      throw e2;
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getPersistentData");
  }
928030
public String getCompleteValue() {
	if (concatValue == null) {
	    return value;
	} else {
	    StringBuffer buf = new StringBuffer(value);
	    buf.append(concatValue.getCompleteValue());
	    return buf.toString();
	}
    }
1219263
public static long getLongParameter (
        HttpServletRequest req, String name, long defval, String invalidDataMessage)
        throws DataValidationException
    {
        String value = getParameter(req, name, false);
        if (StringUtil.isBlank(value)) {
            return defval;
        }
        return parseLongParameter(value, invalidDataMessage);
    }
1183762
protected long getFileDescriptor() throws AsyncException {
        FieldReturn fRet = AccessController.doPrivileged(new PrivFieldCheck(channel));
        if (fRet.e != null) {
            throw fRet.e;
        }
        return fRet.val;
    }