code stringlengths 73 34.1k | label stringclasses 1
value |
|---|---|
public void quit() {
try {
this.keepOn = false;
if (this.serverSocket != null && !this.serverSocket.isClosed()) {
this.serverSocket.close();
this.serverSocket = null;
}
} catch (final IOException e) {
throw new RuntimeExcept... | java |
boolean contains(String normalizedPath) {
if (normalizedPath == null)
return false;
if (normalizedPath.length() < normalizedRoot.length())
return false;
return normalizedPath.regionMatches(0, normalizedRoot, 0, normalizedRoot.length());
} | java |
private static String getIPAddress () {
String rc;
try {
rc = InetAddress.getLocalHost().getHostAddress();
} catch (Exception e) {
// No FFDC code needed
rc = Long.valueOf(new Random().nextLong()).toString();
}
return rc;
} | java |
private SecurityMetadata getSecurityMetadata(WebAppConfig webAppConfig) {
WebModuleMetaData wmmd = ((WebAppConfigExtended) webAppConfig).getMetaData();
return (SecurityMetadata) wmmd.getSecurityMetaData();
} | java |
private boolean isDenyUncoveredHttpMethods(List<SecurityConstraint> scList) {
for (SecurityConstraint sc : scList) {
List<WebResourceCollection> wrcList = sc.getWebResourceCollections();
for (WebResourceCollection wrc : wrcList) {
if (wrc.getDenyUncoveredHttpMethods()) {
... | java |
@Override
public final DataSource createConnectionFactory(ConnectionManager connMgr) {
final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
if (isTraceOn && tc.isEntryEnabled())
Tr.entry(this, tc, "createConnectionFactory", connMgr);
DataSource connFactory = jdbcR... | java |
private Connection getConnection(PooledConnection pconn, WSConnectionRequestInfoImpl cri, String userName) throws ResourceException
{
final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
if (isTraceOn && tc.isEntryEnabled())
Tr.entry(this, tc, "getConnection", AdapterUtil.toSt... | java |
@Override
public Set<ManagedConnection> getInvalidConnections(@SuppressWarnings("rawtypes") Set connectionSet) throws ResourceException {
final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
if (isTraceOn && tc.isEntryEnabled())
Tr.entry(this, tc, "getInvalidConnections", co... | java |
private Object getTraceable(Object d) throws ResourceException {
WSJdbcTracer tracer = new WSJdbcTracer(helper.getTracer(), helper.getPrintWriter(), d, type, null, true);
Set<Class<?>> classes = new HashSet<Class<?>>();
for (Class<?> cl = d.getClass(); cl != null; cl = cl.getSuperclass())
... | java |
private void onConnect(Connection con, String[] sqlCommands) throws SQLException {
final boolean trace = TraceComponent.isAnyTracingEnabled();
TransactionManager tm = connectorSvc.getTransactionManager();
Transaction suspendedTx = null;
String currentSQL = null;
Throwable failur... | java |
private void postGetConnectionHandling(Connection conn) throws SQLException {
helper.doConnectionSetup(conn);
String[] sqlCommands = dsConfig.get().onConnect;
if (sqlCommands != null && sqlCommands.length > 0)
onConnect(conn, sqlCommands);
// Log the database and driver ver... | java |
final void reallySetLogWriter(final PrintWriter out) throws ResourceException {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(this, tc, "setting the logWriter to:", out);
if (dataSourceOrDriver != null) {
try {
AccessController.doPrivi... | java |
public final int getLoginTimeout() throws SQLException {
try {
if(!Driver.class.equals(type)) {
return ((CommonDataSource) dataSourceOrDriver).getLoginTimeout();
}
//Return that the default value is being used when using the Driver type
return 0;
... | java |
@Override
public String formatRecord(RepositoryLogRecord record, Locale locale) {
if (null == record) {
throw new IllegalArgumentException("Record cannot be null");
}
StringBuilder sb = new StringBuilder(300);
String lineSeparatorPlusPadding = "";
// Use basic format
createEventHeader(record, sb);
l... | java |
private void loadTldFromClassloader(GlobalTagLibConfig globalTagLibConfig, TldParser tldParser) {
for (Iterator itr = globalTagLibConfig.getTldPathList().iterator(); itr.hasNext();) {
TldPathConfig tldPathConfig = (TldPathConfig) itr.next();
InputStream is = globalTagLibConfig.getClasslo... | java |
public void addGlobalTagLibConfig(GlobalTagLibConfig globalTagLibConfig) {
try {
TldParser tldParser = new TldParser(this, configManager, false, globalTagLibConfig.getClassloader());
if (globalTagLibConfig.getClassloader() == null)
loadTldFromJarInputStream(globalTagLibC... | java |
public static synchronized ClientConnectionManager getRef()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "getRef");
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(tc, "getRef", instance);
return instan... | java |
@Override
public WSStatistic getStatistic(int dataId) {
ArrayList members = copyStatistics();
if (members == null || members.size() <= 0)
return null;
int sz = members.size();
for (int i = 0; i < sz; i++) {
StatisticImpl data = (StatisticImpl) members.get(i);... | java |
private synchronized void myupdate(WSStats newStats, boolean keepOld, boolean recursiveUpdate) {
if (newStats == null)
return;
StatsImpl newStats1 = (StatsImpl) newStats;
// update the level and description of this collection
this.instrumentationLevel = newStats1.getLevel();... | java |
public void insert(SimpleTest test, Object target) {
if (size == ranges.length) {
RangeEntry[] tmp = new RangeEntry[2*size];
System.arraycopy(ranges,0,tmp,0,size);
ranges = tmp;
}
ranges[size] = new RangeEntry(test, target);
size++;
} | java |
public Object getExact(SimpleTest test) {
for (int i = 0; i < size; i++) {
if (ranges[i].correspondsTo(test))
return ranges[i].target;
}
return null;
} | java |
public void replace(SimpleTest test, Object target) {
for (int i = 0; i < size; i++)
if (ranges[i].correspondsTo(test)) {
ranges[i].target = target;
return;
}
throw new IllegalStateException();
} | java |
public List find(Number value) { // was NumericValue
List targets = new ArrayList(1);
for (int i = 0; i < size; i++) {
if (ranges[i].contains(value))
targets.add(ranges[i].target);
}
return targets;
} | java |
@FFDCIgnore(XMLStreamException.class)
public boolean parseServerConfiguration(InputStream in, String docLocation, BaseConfiguration config,
MergeBehavior mergeBehavior) throws ConfigParserException, ConfigValidationException {
XMLStreamReader parser = null;
... | java |
public void start(QueuedFuture<?> queuedFuture) {
Runnable timeoutTask = () -> {
queuedFuture.abort(new TimeoutException());
};
start(timeoutTask);
} | java |
private void timeout() {
lock.writeLock().lock();
try {
//if already stopped, do nothing, otherwise check times and run the timeout task
if (!this.stopped) {
long now = System.nanoTime();
long remaining = this.targetEnd - now;
this.... | java |
private void start(Runnable timeoutTask) {
long timeout = timeoutPolicy.getTimeout().toNanos();
start(timeoutTask, timeout);
} | java |
private void start(Runnable timeoutTask, long remainingNanos) {
lock.writeLock().lock();
try {
this.timeoutTask = timeoutTask;
this.start = System.nanoTime();
this.targetEnd = start + remainingNanos;
if (TraceComponent.isAnyTracingEnabled() && tc.isDebug... | java |
public void stop() {
lock.writeLock().lock();
try {
debugRelativeTime("Stop!");
this.stopped = true;
if (this.future != null && !this.future.isDone()) {
debugRelativeTime("Cancelling");
this.future.cancel(true);
}
... | java |
public void restart() {
lock.writeLock().lock();
try {
if (this.timeoutTask == null) {
throw new IllegalStateException(Tr.formatMessage(tc, "internal.error.CWMFT4999E"));
}
stop();
this.stopped = false;
start(this.timeoutTask);
... | java |
public long check() {
long remaining = 0;
lock.readLock().lock();
try {
if (this.timedout) {
// Note: this clears the interrupted flag if it was set
// Assumption is that the interruption was caused by the Timeout
boolean wasInterrupted... | java |
@Trivial
private void debugTime(String message, long nanos) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
FTDebug.debugTime(tc, getDescriptor(), message, nanos);
}
} | java |
public static String createPropertyFilter(String name, String value) {
assert name.matches("[^=><~()]+");
StringBuilder builder = new StringBuilder(name.length() + 3 + (value == null ? 0 : value.length() * 2));
builder.append('(').append(name).append('=');
int begin = 0;
if (va... | java |
public static void delete(final File f) {
if (f != null && f.exists()) {
// Why do we have to specify a return type for the run method and paramatize
// PrivilegedExceptionAction to it, this method should have a void return type ideally.
AccessController.doPrivileged(new Priv... | java |
public static FileInputStream getFileIputStream(final File file) throws FileNotFoundException {
try {
return AccessController.doPrivileged(
new PrivilegedExceptionAction<FileInputStream>() {
@Overri... | java |
public static long getFileLength(final File file) throws FileNotFoundException {
try {
return AccessController.doPrivileged(
new PrivilegedExceptionAction<Long>() {
@Override
... | java |
JavaURLContext createJavaURLContext(Hashtable<?, ?> envmt, Name name) {
return new JavaURLContext(envmt, helperServices, name);
} | java |
public String encodeURL(HttpSession session, String url) {
return encodeURL(session, null, url, null);
} | java |
public void complete(VirtualConnection vc, TCPReadRequestContext rsc) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "complete() called: vc=" + vc);
}
HttpOutboundServiceContextImpl mySC = (HttpOutboundServiceContextImpl) vc.getStateMap().get(Callb... | java |
public void error(VirtualConnection vc, TCPReadRequestContext rsc, IOException ioe) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "error() called: vc=" + vc + " ioe=" + ioe);
}
HttpOutboundServiceContextImpl mySC = (HttpOutboundServiceContextImpl) ... | java |
public static void logLoudAndClear(String textToLog, String callingClass, String callingMethod) {
final String methodName = "logLoudAndClear";
final boolean trace = TraceComponent.isAnyTracingEnabled();
final String cClass = (callingClass != null && !callingClass.isEmpty()) ? callingClass : "cal... | java |
private MessagingEngine createMessageEngine(JsMEConfig me) throws Exception {
String thisMethodName = CLASS_NAME + ".createMessageEngine(JsMEConfig)";
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
SibTr.entry(tc, thisMethodName, "replace ME name here");
}
... | java |
private JsBusImpl getBusProxy(JsMEConfig me) {
String thisMethodName = CLASS_NAME + ".getBusProxy(ConfigObject)";
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
SibTr.entry(tc, thisMethodName, "ME Name");
}
if (TraceComponent.isAnyTracingEnabled() && tc... | java |
private JsBusImpl getBusProxy(String name) throws SIBExceptionBusNotFound {
String thisMethodName = CLASS_NAME + ".getBusProxy(String)";
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
SibTr.entry(tc, thisMethodName, name);
}
if (TraceComponent.isAnyTrac... | java |
public JsBus getBus(String busName) throws SIBExceptionBusNotFound {
String thisMethodName = CLASS_NAME + ".getBus(String)";
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
SibTr.entry(tc, thisMethodName, busName);
}
if (TraceComponent.isAnyTracingEnable... | java |
public Set getMessagingEngineSet(String busName) {
String thisMethodName = CLASS_NAME + ".getMessagingEngineSet(String)";
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
SibTr.entry(tc, thisMethodName, busName);
}
Set retSet = new HashSet();
if (m... | java |
public String[] showMessagingEngines() {
String thisMethodName = CLASS_NAME + ".showMessagingEngines()";
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
SibTr.entry(tc, thisMethodName, this);
}
final String[] list = new String[_messagingEngines.size()];
... | java |
public void startMessagingEngine(String busName, String name)
throws Exception {
String thisMethodName = CLASS_NAME
+ ".startMessagingEngine(String, String)";
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
SibTr.entry(... | java |
public boolean isServerStarted() {
String thisMethodName = CLASS_NAME + ".isServerStarted()";
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
SibTr.entry(tc, thisMethodName, this);
}
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
... | java |
public boolean isServerStopping() {
String thisMethodName = CLASS_NAME + ".isServerStopping()";
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
SibTr.entry(tc, thisMethodName, this);
}
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
... | java |
public boolean isServerInRecoveryMode() {
String thisMethodName = CLASS_NAME + ".isServerInRecoveryMode()";
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
SibTr.entry(tc, thisMethodName, this);
}
boolean ret = false;// (_serverMode == Server.RECOVERY_MO... | java |
public List<String> listDefinedBuses() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
SibTr.entry(tc, "listDefinedBuses", this);
}
List buses = null;
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
SibTr.exit(tc, "listDef... | java |
public static final String base64Decode(String str, String enc) throws UnsupportedEncodingException {
if (str == null) {
return null;
} else {
byte data[] = getBytes(str);
return base64Decode(new String(data, enc));
}
} | java |
public static final String base64Decode(String str) {
if (str == null) {
return null;
} else {
byte data[] = getBytes(str);
return toString(base64Decode(data));
}
} | java |
public SIBusMessage receiveNoWait(final SITransaction tran)
throws SISessionDroppedException, SIConnectionDroppedException,
SISessionUnavailableException, SIConnectionUnavailableException,
SIConnectionLostException, SILimitExceededException,
SINotAuthorizedException, SIRe... | java |
public void start(boolean deliverImmediately)
throws SIConnectionDroppedException, SISessionUnavailableException,
SIConnectionUnavailableException, SIConnectionLostException,
SIResourceException, SIErrorException, SIErrorException {
final String methodName = "start";
... | java |
public void stop() throws SISessionDroppedException,
SIConnectionDroppedException, SISessionUnavailableException,
SIConnectionUnavailableException, SIConnectionLostException,
SIResourceException, SIErrorException {
final String methodName = "stop";
if (TraceComponent... | java |
@Override
public void unlockAll(boolean incrementUnlockCount)
throws SISessionUnavailableException, SISessionDroppedException,
SIConnectionUnavailableException, SIConnectionDroppedException,
SIResourceException, SIConnectionLostException, SIIncorrectCallException
{
throw new SibRaNotSupportedE... | java |
public void setConnectionObjectID(int i)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setConnectionObjectID", ""+i);
connectionObjectID = i;
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "setConnectionObjectID");... | java |
public ProxyQueueConversationGroup getProxyQueueConversationGroup()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "getProxyQueueConversationGroup");
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "getProxyQueueConversationG... | java |
public CatConnectionListenerGroup getCatConnectionListeners()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "getCatConnectionListeners");
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "getCatConnectionListeners", catConnec... | java |
public SICoreConnection getSICoreConnection()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "getSICoreConnection");
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "getSICoreConnection", siCoreConnection);
return siCor... | java |
public final boolean unlink()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "unlink", _positionString());
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "cursor count = " + _cursorCount);
boolean unlinked = ... | java |
private boolean isRequestForbidden(StringBuffer path)
{
boolean requestIsForbidden = false;
String matchString = path.toString();
//PM82876 Start
// The fileName or dirName can have .. , check and fail for ".." in path only which can allow to serve from different location.
if(WCCustomProperties.ALLOW... | java |
private boolean isDirectoryTraverse(StringBuffer path)
{
boolean directoryTraverse = false;
String matchString = path.toString();
//PM82876 Start
if (WCCustomProperties.ALLOW_DOTS_IN_NAME) {
// The fileName can have .. , check for the failing conditions only.
if (matchString.indexOf("..... | java |
public ServiceRegistration<FileMonitor> monitorFiles(Collection<String> paths, long monitorInterval) {
BundleContext bundleContext = actionable.getBundleContext();
final Hashtable<String, Object> fileMonitorProps = new Hashtable<String, Object>();
fileMonitorProps.put(FileMonitor.MONITOR_FILES, ... | java |
public ServiceRegistration<FileMonitor> monitorFiles(String ID, Collection<String> paths, long pollingRate, String trigger) {
BundleContext bundleContext = actionable.getBundleContext();
final Hashtable<String, Object> fileMonitorProps = new Hashtable<String, Object>();
fileMonitorProps.put(File... | java |
private Boolean isActionNeeded(Collection<File> createdFiles, Collection<File> modifiedFiles) {
boolean actionNeeded = false;
for (File createdFile : createdFiles) {
if (currentlyDeletedFiles.contains(createdFile)) {
currentlyDeletedFiles.remove(createdFile);
... | java |
public QueuedMessage[] getQueuedMessages(java.lang.Integer fromIndexInteger,java.lang.Integer toIndexInteger,java.lang.Integer totalMessagesPerpageInteger) throws Exception {
int fromIndex=fromIndexInteger.intValue();
int toIndex=toIndexInteger.intValue();
int totalMessagesPerpage=totalMessagesPerpageInteger.i... | java |
private void initializeCacheData(int cacheSize)
{
final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
if (isTraceOn && (tc.isEntryEnabled() || tcOOM.isEntryEnabled()))
Tr.entry(tc.isEntryEnabled() ? tc : tcOOM,
"initializeCacheData : " + ivCache.getName()... | java |
private void initializeSweepInterval(long sweepInterval)
{
final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
if (isTraceOn && (tc.isEntryEnabled() || tcOOM.isEntryEnabled()))
Tr.entry(tc.isEntryEnabled() ? tc : tcOOM,
"initializeSweepInterval : " + ivCa... | java |
private boolean isTraceEnabled(boolean debug) // d581579
{
if (debug ? tc.isDebugEnabled() : tc.isEntryEnabled())
{
return true;
}
if (ivCache.numSweeps % NUM_SWEEPS_PER_OOMTRACE == 1 &&
(debug ? tcOOM.isDebugEnabled() : tcOOM.isEntryEnabled()))
{
... | java |
protected NetworkConnection getNetworkConnectionInstance(VirtualConnection vc)
{
if (tc.isEntryEnabled()) SibTr.entry(this, tc, "getNetworkConnectionInstance", vc);
NetworkConnection retConn = null;
if (vc != null)
{
// Default to the connection that we were created from
... | java |
private void setChoices(BigInteger multiChoice, JSchema schema) {
JSType topType = (JSType)schema.getJMFType();
if (topType instanceof JSVariant)
setChoices(multiChoice, schema, (JSVariant)topType);
else if (topType instanceof JSTuple)
setChoices(
multiChoice,
topType.getMultiCho... | java |
private void setChoices(BigInteger multiChoice, JSchema schema, JSVariant var) {
for (int i = 0; i < var.getCaseCount(); i++) {
BigInteger count = ((JSType)var.getCase(i)).getMultiChoiceCount();
if (multiChoice.compareTo(count) >= 0)
multiChoice = multiChoice.subtract(count);
else {
... | java |
private void setChoices(BigInteger multiChoice, BigInteger radix, JSchema schema, JSVariant[] vars) {
for (int j = 0; j < vars.length; j++) {
radix = radix.divide(vars[j].getMultiChoiceCount());
BigInteger contrib = multiChoice.divide(radix);
multiChoice = multiChoice.remainder(radix);
setCh... | java |
private static BigInteger getMultiChoice(int[] choices, JSchema schema, JSVariant var) throws JMFUninitializedAccessException {
int choice = choices[var.getIndex()];
if (choice == -1)
throw new JMFUninitializedAccessException(schema.getPathName(var));
BigInteger ans = BigInteger.ZERO;
// First, ad... | java |
private static BigInteger getMultiChoice(int[] choices, JSchema schema, JSVariant[] vars) throws JMFUninitializedAccessException {
// Mixed-radix-encode the contribution from all the subvariants
BigInteger base = BigInteger.ZERO;
for (int i = 0; i < vars.length; i++)
base = base.multiply(vars[i].getMu... | java |
protected String getStyle(FacesContext facesContext, UIComponent link)
{
if (link instanceof HtmlCommandLink)
{
return ((HtmlCommandLink)link).getStyle();
}
return (String)link.getAttributes().get(HTML.STYLE_ATTR);
} | java |
protected String getStyleClass(FacesContext facesContext, UIComponent link)
{
if (link instanceof HtmlCommandLink)
{
return ((HtmlCommandLink)link).getStyleClass();
}
return (String)link.getAttributes().get(HTML.STYLE_CLASS_ATTR);
} | java |
protected void completeConnectionPreface() throws Http2Exception {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "completeConnectionPreface entry: about to send preface SETTINGS frame");
}
FrameSettings settings;
// send out a settings frame ... | java |
private void readWriteTransitionState(Constants.Direction direction) throws Http2Exception {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "readWriteTransitionState: entry: frame type: " + currentFrame.getFrameType() + " state: " + state);
}
if (cu... | java |
private void updateStreamState(StreamState state) {
this.state = state;
if (StreamState.CLOSED.equals(state)) {
setCloseTime(System.currentTimeMillis());
muxLink.closeStream(this);
}
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr... | java |
private void processSETTINGSFrame() throws FlowControlException {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "processSETTINGSFrame entry:\n" + currentFrame.toString());
}
// check if this is the first non-ACK settings frame received; if so, update... | java |
private void updateStreamReadWindow() throws Http2Exception {
if (currentFrame instanceof FrameData) {
long frameSize = currentFrame.getPayloadLength();
streamReadWindowSize -= frameSize; // decrement stream read window
muxLink.connectionReadWindowSize -= frameSize; // decrem... | java |
protected void updateInitialWindowsUpdateSize(int newSize) throws FlowControlException {
// this method should only be called by the thread that came in on processNewFrame.
// newSize should be treated as an unsigned 32-bit int
if (myID == 0) {
// the control stream doesn't care abo... | java |
private void processIdle(Constants.Direction direction) throws Http2Exception {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "processIdle entry: stream " + myID);
}
// Can only receive HEADERS or PRIORITY frame in Idle state
if (direction ==... | java |
private boolean isWindowLimitExceeded(FrameData dataFrame) {
if (streamWindowUpdateWriteLimit - dataFrame.getPayloadLength() < 0 ||
muxLink.getWorkQ().getConnectionWriteLimit() - dataFrame.getPayloadLength() < 0) {
// would exceed window update limit
String s = "Cannot write ... | java |
public void sendRequestToWc(FramePPHeaders frame) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
Tr.entry(tc, "H2StreamProcessor.sendRequestToWc()");
}
if (null == frame) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
... | java |
private void setHeadersComplete() {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "completed headers have been received stream " + myID);
}
headersCompleted = true;
muxLink.setContinuationExpected(false);
} | java |
private void getHeadersFromFrame() {
byte[] hbf = null;
if (currentFrame.getFrameType() == FrameTypes.HEADERS || currentFrame.getFrameType() == FrameTypes.PUSHPROMISEHEADERS) {
hbf = ((FrameHeaders) currentFrame).getHeaderBlockFragment();
} else if (currentFrame.getFrameType() == Fra... | java |
private void getBodyFromFrame() {
if (dataPayload == null) {
dataPayload = new ArrayList<byte[]>();
}
if (currentFrame.getFrameType() == FrameTypes.DATA) {
dataPayload.add(((FrameData) currentFrame).getData());
}
} | java |
private void processCompleteData() throws ProtocolException {
WsByteBufferPoolManager bufManager = HttpDispatcher.getBufferManager();
WsByteBuffer buf = bufManager.allocate(getByteCount(dataPayload));
for (byte[] bytes : dataPayload) {
buf.put(bytes);
}
buf.flip();
... | java |
private void setReadyForRead() throws ProtocolException {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "setReadyForRead entry: stream id:" + myID);
}
muxLink.updateHighestStreamId(myID);
if (headersCompleted) {
ExecutorService ex... | java |
private void moveDataIntoReadBufferArray(WsByteBuffer newReadBuffer) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "moveDataIntoReadBufferArray entry: stream " + myID + " buffer: " + newReadBuffer);
}
// move the data that is to be sent up the cha... | java |
@SuppressWarnings("unchecked")
public VirtualConnection read(long numBytes, WsByteBuffer[] requestBuffers) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "read entry: stream " + myID + " request: " + requestBuffers + " num bytes requested: " + numBytes);
... | java |
public boolean isStreamClosed() {
if (this.myID == 0 && !endStream) {
return false;
}
if (state == StreamState.CLOSED) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "isStreamClosed stream closed; " + streamId());
... | java |
private int getByteCount(ArrayList<byte[]> listOfByteArrays) {
int count = 0;
for (byte[] byteArray : listOfByteArrays) {
if (byteArray != null) {
count += byteArray.length;
}
}
return count;
} | java |
public static String generateIncUuid(Object caller)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "generateIncUuid", "Caller="+caller);
java.util.Date time = new java.util.Date();
int hash = caller.hashCode();
long millis = time.getTime();
... | java |
public static String getMEName(Object o) {
String meName;
if (!threadLocalStack.isEmpty()) {
meName = threadLocalStack.peek();
} else {
meName = DEFAULT_ME_NAME;
}
String str = "";
if (o != null) {
str = "/" + Integer.toHexString(System.identityHashCode(o));
}
// D... | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.