code stringlengths 73 34.1k | label stringclasses 1
value |
|---|---|
static Selector convertRange(Selector expr, Selector bound1, Selector bound2) {
return new OperatorImpl(Operator.AND,
new OperatorImpl(Operator.GE, (Selector) expr.clone(), bound1),
new OperatorImpl(Operator.LE, (Selector) expr.clone(), bound2));
} | java |
static Selector convertLike(Selector arg, String pattern, String escape) {
try
{
pattern = reduceStringLiteralToken(pattern);
boolean escaped = false;
char esc = 0;
if (escape != null) {
escape = reduceStringLiteralToken(escape);
if (escape.length() != 1)
return... | java |
@Override
public SecurityMetadata getSecurityMetadata() {
SecurityMetadata sm = super.getSecurityMetadata();
if (sm == null) {
return getDefaultAdminSecurityMetadata();
} else {
return sm;
}
} | java |
private void buildPolicyErrorMessage(String msgKey, String defaultMessage, Object... arg1) {
/* The message need to be logged only for level below 'Warning' */
if (TraceComponent.isAnyTracingEnabled() && tc.isWarningEnabled()) {
String messageFromBundle = Tr.formatMessage(tc, msgKey, arg1);
... | java |
public void displaySelectionPage(HttpServletRequest request, HttpServletResponse response, SocialTaiRequest socialTaiRequest) throws IOException {
setRequestAndConfigInformation(request, response, socialTaiRequest);
if (selectableConfigs == null || selectableConfigs.isEmpty()) {
sendDisplayE... | java |
String createJavascript() {
StringBuilder html = new StringBuilder();
html.append("<script>\n");
html.append("function " + createCookieFunctionName + "(value) {\n");
html.append("document.cookie = \"" + ClientConstants.LOGIN_HINT + "=\" + value;\n");
html.append("}\n");
h... | java |
public boolean parseMessage(WsByteBuffer buffer, boolean bExtractValue) throws Exception {
final boolean bTrace = TraceComponent.isAnyTracingEnabled();
boolean rc = false;
if (!isFirstLineComplete()) {
if (bTrace && tc.isDebugEnabled()) {
Tr.debug(tc, "Parsing First L... | java |
public WsByteBuffer[] marshallMessage() throws MessageSentException {
final boolean bTrace = TraceComponent.isAnyTracingEnabled();
if (bTrace && tc.isEntryEnabled()) {
Tr.entry(tc, "marshallMessage");
}
preMarshallMessage();
WsByteBuffer[] marshalledObj = hasFirstLin... | java |
public static URITemplate createTemplate(Path path, List<Parameter> params, String classNameandPath) {
return createTemplate(path == null ? null : path.value(), params, classNameandPath);
} | java |
private boolean isELReserved(String id) {
int i = 0;
int j = reservedWords.length;
while (i < j) {
int k = (i + j) / 2;
int result = reservedWords[k].compareTo(id);
if (result == 0) {
return true;
}
if (result < 0) {
... | java |
@Override
protected synchronized Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
synchronized (getClassLoadingLock(name)) {
Class<?> result = null;
if (name == null || name.length() == 0)
return null;
result = findLoadedC... | java |
private static List<Integer> allocateOffsets(List<List<Integer>> offsetsStorage) {
if ( offsetsStorage.isEmpty() ) {
return new ArrayList<Integer>();
} else {
return ( offsetsStorage.remove(0) );
}
} | java |
private static int[] releaseOffsets(List<List<Integer>> offsetsStorage, List<Integer> offsets) {
int numValues = offsets.size();
int[] extractedValues;
if ( numValues == 0 ) {
extractedValues = EMPTY_OFFSETS_ARRAY;
} else {
extractedValue... | java |
@Trivial
public static Map<String, IteratorData> collectIteratorData(ZipEntryData[] zipEntryData) {
Map<String, IteratorData> allNestingData = new HashMap<String, IteratorData>();
// Re-use offset lists. There can be a lot of these
// created for a busy tree. Offset lists are only needed
... | java |
@Trivial
public static ZipEntryData[] collectZipEntries(ZipFile zipFile) {
final List<ZipEntryData> entriesList = new ArrayList<ZipEntryData>();
final Enumeration<? extends ZipEntry> zipEntries = zipFile.entries();
while ( zipEntries.hasMoreElements() ) {
entriesList.add( create... | java |
@Trivial
public static Map<String, ZipEntryData> setLocations(ZipEntryData[] entryData) {
Map<String, ZipEntryData> entryDataMap = new HashMap<String, ZipEntryData>(entryData.length);
for ( int entryNo = 0; entryNo < entryData.length; entryNo++ ) {
ZipEntryData entry = entryData[entryNo];
... | java |
@Trivial
public static int locatePath(ZipEntryData[] entryData, final String r_path) {
ZipEntryData targetData = new SearchZipEntryData(r_path);
// Given:
//
// 0 gp
// 1 gp/p1
// 2 gp/p1/c1
// 3 gp/p2/c2
//
// A search for "a" answers ... | java |
@Trivial
private static String stripPath(String path) {
int pathLen = path.length();
if ( pathLen == 0 ) {
return path;
} else if ( pathLen == 1 ) {
if ( path.charAt(0) == '/' ) {
return "";
} else {
return path;
... | java |
private static String getDeepestNestedElementName(String configDisplayId) {
int start = configDisplayId.lastIndexOf("]/");
if (start > 1) {
int end = configDisplayId.indexOf('[', start += 2);
if (end > start)
return configDisplayId.substring(start, end);
}... | java |
public void dump_memory(Writer out)
throws IOException
{
int qlist_num;
out.write("First quick size: " + first_quick_size + "\n");
out.write("Last quick size: " + last_quick_size + "\n");
out.write("Grain size: " + grain_size + "\n");
out.write("Acceptable waste: " + acc... | java |
protected Channel createChannel(ChannelData config) throws ChannelException
{
if (tc.isEntryEnabled()) SibTr.entry(this, tc, "createChannel", config);
Channel retChannel;
if (config.isInbound())
{
if (tc.isDebugEnabled()) SibTr.debug(this, tc, "createChannel", "inbound");
... | java |
public Class[] getDeviceInterface() // F177053
{
if (tc.isEntryEnabled()) SibTr.entry(this, tc, "getDeviceInterface"); // F177053
// Start D232185
if (devSideInterfaceClasses == null)
{
devSideInterfaceClasses = new Class[1];
devSid... | java |
private void addRepository(String repositoryId, RepositoryWrapper repositoryHolder) {
repositories.put(repositoryId, repositoryHolder);
try {
numRepos = getNumberOfRepositories();
} catch (WIMException e) {
// okay
}
} | java |
protected String getRepositoryIdByUniqueName(String uniqueName) throws WIMException {
boolean isDn = UniqueNameHelper.isDN(uniqueName) != null;
if (isDn)
uniqueName = UniqueNameHelper.getValidUniqueName(uniqueName).trim();
String repo = null;
int repoMatch = -1;
int ... | java |
@Override
public boolean isSameExecutionZone(FailureScope anotherScope)
{
if (tc.isEntryEnabled())
Tr.entry(tc, "isSameExecutionZone", anotherScope);
boolean isSameZone = equals(anotherScope);
if (tc.isEntryEnabled())
Tr.exit(tc, "isSameExecutionZone", new Boole... | java |
public static String encodeCookie(String string) {
if (string == null) {
return null;
}
string = string.replaceAll("%", "%25");
string = string.replaceAll(";", "%3B");
string = string.replaceAll(",", "%2C");
return string;
} | java |
public static String decodeCookie(String string) {
if (string == null) {
return null;
}
string = string.replaceAll("%2C", ",");
string = string.replaceAll("%3B", ";");
string = string.replaceAll("%25", "%");
return string;
} | java |
@Trivial
public static String getRequestStringForTrace(HttpServletRequest request, String[] secretStrings) {
if (request == null || request.getRequestURL() == null) {
return "[]";
}
StringBuffer sb = new StringBuffer("[" + stripSecretsFromUrl(request.getRequestURL().toString(), ... | java |
public void deleteAbstractAliasDestinationHandler(AbstractAliasDestinationHandler abstractAliasDestinationHandler)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "deleteAbstractAliasDestinationHandler");
//The destination is an alias or a foreign destination, so ... | java |
public int add(Object dependency, ValueSet valueSet, Object entry) {
int returnCode = HTODDynacache.NO_EXCEPTION;
dependencyNotUpdatedTable.remove(dependency);
valueSet.add(entry);
if (valueSet.size() > this.delayOffloadEntriesLimit) {
if (this.type == DEP_ID_TABLE) {
... | java |
public int add(Object dependency, ValueSet valueSet) {
int returnCode = HTODDynacache.NO_EXCEPTION;
if (dependencyToEntryTable.size() >= this.maxSize) {
returnCode = reduceTableSize();
}
dependencyNotUpdatedTable.put(dependency, valueSet);
dependencyToEntryTable.put(d... | java |
public int replace(Object dependency, ValueSet valueSet) {
int returnCode = HTODDynacache.NO_EXCEPTION;
dependencyNotUpdatedTable.remove(dependency);
if (valueSet != null && valueSet.size() > this.delayOffloadEntriesLimit) {
dependencyToEntryTable.remove(dependency);
if (... | java |
public Result removeEntry(Object dependency, Object entry) {
Result result = this.htod.getFromResultPool();
ValueSet valueSet = (ValueSet) dependencyToEntryTable.get(dependency);
if (valueSet == null) {
return result;
}
result.bExist = HTODDynacache.EXIST;
va... | java |
public ValueSet getEntries(Object dependency) {
ValueSet valueSet = (ValueSet) dependencyToEntryTable.get(dependency);
return valueSet;
} | java |
private int reduceTableSize() {
int returnCode = HTODDynacache.NO_EXCEPTION;
int count = this.entryRemove;
if (count > 0) {
int removeSize = 5;
while (count > 0) {
int minSize = Integer.MAX_VALUE;
Iterator<Map.Entry<Object,Set<Object>>> e = dep... | java |
private static String getClassName(String implClassName) {
implClassName = implClassName.substring(0, implClassName.length() - 4);
return implClassName + "ComponentImpl";
} | java |
public void registerThread(StoppableThread thread)
{
if (tc.isEntryEnabled())
SibTr.entry(tc, "registerThread", thread);
synchronized (this)
{
_threadCache.add(thread);
}
if (tc.isEntryEnabled())
SibTr.exit(tc, "registerThread");
} | java |
public void deregisterThread(StoppableThread thread)
{
if (tc.isEntryEnabled())
SibTr.entry(tc, "deregisterThread", thread);
synchronized (this)
{
_threadCache.remove(thread);
}
if (tc.isEntryEnabled())
SibTr.exit(tc, "deregisterThread");
} | java |
public void stopAllThreads()
{
if (tc.isEntryEnabled())
SibTr.entry(tc, "stopAllThreads");
synchronized (this)
{
Iterator iterator = ((ArrayList)_threadCache.clone()).iterator();
while (iterator.hasNext())
{
StoppableThread thread = (StoppableThread)iterator.... | java |
public ArrayList getThreads()
{
if (tc.isEntryEnabled())
{
SibTr.entry(tc, "getThreads");
SibTr.exit(tc, "getThreads", _threadCache);
}
return _threadCache;
} | java |
private int getAndUpdateTail() {
int retMe;
do {
retMe = tailIndex.get();
} while (tailIndex.compareAndSet(retMe, getNext(retMe)) == false);
return retMe;
} | java |
public boolean put(ExpirableReference expirable)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "put", "ObjId=" + expirable.getID() + " ET=" + expirable.getExpiryTime());
boolean reply = tree.insert(expirable);
if (reply)
{
size+... | java |
protected static Map<String, ProductInfo> getAllProductInfo(File wlpInstallationDirectory) throws VersionParsingException {
File versionPropertyDirectory = new File(wlpInstallationDirectory, ProductInfo.VERSION_PROPERTY_DIRECTORY);
if (!versionPropertyDirectory.exists()) {
throw new VersionP... | java |
public boolean remove(V value) {
// peek at what is in the map
K key = value.getKey();
Ref<V> ref = map.get(key);
// only try to remove the mapping if it matches the provided class loader
return (ref != null && ref.get() == value) ? map.remove(key, ref) : false;
} | java |
public V retrieveOrCreate(K key, Factory<V> factory) {
// Clean up stale entries on every put.
// This should avoid a slow memory leak of reference objects.
this.cleanUpStaleEntries();
return retrieveOrCreate(key, factory, new FutureRef<V>());
} | java |
void cleanUpStaleEntries() {
for (KeyedRef<K, V> ref = q.poll(); ref != null; ref = q.poll()) {
map.remove(ref.getKey(), ref); // CONCURRENT remove() operation
}
} | java |
public Object nextElement()
{
if (_array == null)
{
return null;
}
else
{
synchronized(this){
if (_index < _array.length)
{
Object obj = _array[_index];
_index++;
... | java |
public int execute(String[] args) {
Map<String, LevelDetails> levels = readLevels(System.getProperty("logviewer.custom.levels"));
String[] header = readHeader(System.getProperty("logviewer.custom.header"));
return execute(args, levels, header);
} | java |
public int execute(String[] args, Map<String, LevelDetails> levels, String[] header) {
levelString = getLevelsString(levels);
RepositoryReaderImpl logRepository;
try {
// Parse the command line arguments and validate arguments
if (parseCmdLineArgs(args) || validateSetti... | java |
private long collectAllKids(ArrayList<DisplayInstance> result, ServerInstanceLogRecordList list) {
long timestamp = -1;
RepositoryLogRecord first = list.iterator().next();
if (first != null) {
timestamp = first.getMillis();
}
for (Entry<String, ServerInstanceLogReco... | java |
private Level createLevelByString(String levelString) throws IllegalArgumentException {
try {
return Level.parse(levelString.toUpperCase());
//return WsLevel.parse(levelString.toUpperCase());
} catch (Exception npe) {
throw new IllegalArgumentException(getLocalizedPar... | java |
void setInstanceId(String instanceId) throws IllegalArgumentException {
if (instanceId != null && !"".equals(instanceId)) {
subInstanceId = getSubProcessInstanceId(instanceId);
try {
long id = getProcessInstanceId(instanceId);
mainInstanceId = id < 0 ? n... | java |
protected File[] listRepositoryChoices() {
// check current location
String currentDir = System.getProperty("log.repository.root");
if (currentDir == null)
currentDir = System.getProperty("user.dir");
File logDir = new File(currentDir);
if (logDir.isDirectory()) {
... | java |
private int skipPast(byte[] data, int pos, byte target) {
int index = pos;
while (index < data.length) {
if (target == data[index++]) {
return index;
}
}
return index;
} | java |
private int parseTrailer(byte[] input, int inOffset, List<WsByteBuffer> list) throws DataFormatException {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "Parsing trailer, offset=" + this.parseOffset + " val=" + this.parseInt);
}
int offset = inOffset... | java |
public void logClosedException(Exception e) {
// Note: this may be a normal occurance so don't log error, just debug.
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "Connection closed with exception: " + e.getMessage());
}
} | java |
void outOfScope() {
final String methodName = "outOfScope";
if (TRACE.isEntryEnabled()) {
SibTr.entry(this, TRACE, methodName);
}
_outOfScope = true;
try {
// Close cloned connection so that it, and any resource created
// from it, also thr... | java |
public void createAppToSecurityRolesMapping(String appName, Collection<SecurityRole> securityRoles) {
//only add it if we don't have a cached copy
appToSecurityRolesMap.putIfAbsent(appName, securityRoles);
} | java |
public void removeRoleToRunAsMapping(String appName) {
Map<String, RunAs> roleToRunAsMap = roleToRunAsMappingPerApp.get(appName);
if (roleToRunAsMap != null) {
roleToRunAsMap.clear();
}
appToSecurityRolesMap.remove(appName);
if (TraceComponent.isAnyTracingEnabled() &... | java |
public void removeRoleToWarningMapping(String appName) {
Map<String, Boolean> roleToWarningMap = roleToWarningMappingPerApp.get(appName);
if (roleToWarningMap != null) {
roleToWarningMap.clear();
}
roleToWarningMappingPerApp.remove(appName);
} | java |
private static void determineHandlers() {
/*
* find the handlers that we are dispatching to
*/
if (textHandler != null && !logRepositoryConfiguration.isTextEnabled())
textHandler = null ;
// Don't do this work if only text and text is not enabled (if so, it will always be nul... | java |
public void close()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "close");
Enumeration streams = null;
synchronized (this)
{
synchronized (streamTable)
{
closed = true;
closeBrowserSessionsInternal();
streams = streamTable.elem... | java |
public boolean cleanup(boolean flushStreams, boolean redriveDeletionThread)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "cleanup",
new Object[]{Boolean.valueOf(flushStreams), Boolean.valueOf(redriveDeletionThread)});
boolean retvalue = false;
// first che... | java |
public final AOStream getAOStream(String streamKey, SIBUuid12 streamId)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "getAOStream", new Object[]{streamKey, streamId});
StreamInfo streamInfo = getStreamInfo(streamKey, streamId);
if (streamInfo != null)
{
... | java |
private final void handleControlBrowseStatus(SIBUuid8 remoteME, SIBUuid12 gatheringTargetDestUuid, long browseId, int status)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "handleControlBrowseStatus",
new Object[] {remoteME, gatheringTargetDestUuid, Long.valueOf(br... | java |
public final void removeBrowserSession(AOBrowserSessionKey key)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "removeBrowserSession", key);
browserSessionTable.remove(key);
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(tc, "r... | java |
private final StreamInfo getStreamInfo(String streamKey, SIBUuid12 streamId)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "getStreamInfo", new Object[]{streamKey, streamId});
StreamInfo sinfo = streamTable.get(streamKey);
if ((sinfo != null) && sinfo.streamId.eq... | java |
public final void streamIsFlushed(AOStream stream)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "streamIsFlushed", stream);
// we schedule an asynchronous removal of the persistent data
synchronized (streamTable)
{
String key = SIMPUtils.getRemoteGetK... | java |
public final AOValue persistLockAndTick(TransactionCommon t, AOStream stream, long tick,
SIMPMessage msg, int storagePolicy, long waitTime, long prevTick) throws Exception
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "persistLockAndTick",
new Object[] {... | java |
public final void cleanupTicks(StreamInfo sinfo, TransactionCommon t, ArrayList valueTicks) throws MessageStoreException, SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "cleanupTicks", new Object[]{sinfo, t, valueTicks});
try {
int length =... | java |
public final Item writeStartedFlush(TransactionCommon t, AOStream stream) throws Exception
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "writeStartedFlush");
String key =
SIMPUtils.getRemoteGetKey(stream.getRemoteMEUuid(), stream.getGatheringTargetDestUuid()... | java |
public final void writtenStartedFlush(AOStream stream, Item startedFlushItem)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "writtenStartedFlush");
String key =
SIMPUtils.getRemoteGetKey(stream.getRemoteMEUuid(), stream.getGatheringTargetDestUuid());
Stre... | java |
public SIMPItemStream getItemStream()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "getItemStream");
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(tc, "getItemStream", containerItemStream);
return (SIMPItemStream) containerI... | java |
public final String getDestName()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "getDestName");
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(tc, "getDestName", destName);
return destName;
} | java |
public final SIBUuid12 getDestUUID()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
{
SibTr.entry(tc, "getDestUUID");
SibTr.exit(tc, "getDestUUID", destName);
}
return destUuid;
} | java |
public void forceFlushAtSource(SIBUuid8 remoteUuid, SIBUuid12 gatheringTargetDestUuid)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "forceFlushAtSource", new Object[] {remoteUuid, gatheringTargetDestUuid});
StreamInfo sinfo;
boolean success = false;
String ... | java |
private void deleteAndUnlockPersistentStream(StreamInfo sinfo, ArrayList valueTicks) throws MessageStoreException, SIRollbackException, SIConnectionLostException, SIIncorrectCallException, SIResourceException, SIErrorException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc... | java |
protected void init(boolean useDirect, int outSize, int inSize, int cacheSize) {
this.useDirectBuffer = useDirect;
this.outgoingHdrBufferSize = outSize;
this.incomingBufferSize = inSize;
// if cache size has increased, then allocate the larger bytecache
// array, but don't chang... | java |
public void addParseBuffer(WsByteBuffer buffer) {
// increment where we're about to put the new buffer in
int index = ++this.parseIndex;
if (null == this.parseBuffers) {
// first parse buffer to track
this.parseBuffers = new WsByteBuffer[BUFFERS_INITIAL_SIZE];
... | java |
public void addToCreatedBuffer(WsByteBuffer buffer) {
// increment where we're about to put the new buffer in
int index = ++this.createdIndex;
if (null == this.myCreatedBuffers) {
// first allocation
this.myCreatedBuffers = new WsByteBuffer[BUFFERS_INITIAL_SIZE];
... | java |
public void clear() {
final boolean bTrace = TraceComponent.isAnyTracingEnabled();
if (bTrace && tc.isEntryEnabled()) {
Tr.entry(tc, "clear");
}
clearAllHeaders();
this.eohPosition = HeaderStorage.NOTSET;
this.currentElem = null;
this.stateOfParsing =... | java |
private void clearBuffers() {
// simply null out the parse buffers list, then release all the created buffers
final boolean bTrace = TraceComponent.isAnyTracingEnabled();
for (int i = 0; i <= this.parseIndex; i++) {
if (bTrace && tc.isDebugEnabled()) {
Tr.debug(tc, "R... | java |
public void debug() {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "*** Begin Header Debug ***");
HeaderElement elem = this.hdrSequence;
while (null != elem) {
Tr.debug(tc, elem.getName() + ": " + elem.getDebugValue());
... | java |
protected void destroy() {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "Destroying these headers: " + this);
}
// if we have headers present, or reference parse buffers (i.e.
// the first header parsed threw an error perhaps), then clear
... | java |
protected void writeByteArray(ObjectOutput output, byte[] data) throws IOException {
if (null == data || 0 == data.length) {
output.writeInt(-1);
} else {
output.writeInt(data.length);
output.write(data);
}
} | java |
private void scribbleWhiteSpace(WsByteBuffer buffer, int start, int stop) {
if (buffer.hasArray()) {
// buffer has a backing array so directly update that
final byte[] data = buffer.array();
final int offset = buffer.arrayOffset();
int myStart = start + offset;
... | java |
private void eraseValue(HeaderElement elem) {
// wipe out the removed value
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "Erasing existing header: " + elem.getName());
}
int next_index = this.lastCRLFBufferIndex;
int next_pos = this.... | java |
private int overlayBytes(byte[] data, int inOffset, int inLength, int inIndex) {
int length = inLength;
int offset = inOffset;
int index = inIndex;
WsByteBuffer buffer = this.parseBuffers[index];
if (-1 == length) {
length = data.length;
}
while (index... | java |
private void overlayValue(HeaderElement elem) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "Overlaying existing header: " + elem.getName());
}
int next_index = this.lastCRLFBufferIndex;
int next_pos = this.lastCRLFPosition;
if (nul... | java |
private WsByteBuffer[] marshallAddedHeaders(WsByteBuffer[] inBuffers, int index) {
WsByteBuffer[] buffers = inBuffers;
buffers[index] = allocateBuffer(this.outgoingHdrBufferSize);
for (HeaderElement elem = this.hdrSequence; null != elem; elem = elem.nextSequence) {
if (elem.wasAdded(... | java |
private void clearAllHeaders() {
final boolean bTrace = TraceComponent.isAnyTracingEnabled();
if (bTrace && tc.isEntryEnabled()) {
Tr.entry(tc, "clearAllHeaders()");
}
HeaderElement elem = this.hdrSequence;
while (null != elem) {
final HeaderElement next ... | java |
public void removeSpecialHeader(HeaderKeys key) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "removeSpecialHeader(h): " + key.getName());
}
removeHdrInstances(findHeader(key), FILTER_NO);
} | java |
public WsByteBuffer returnCurrentBuffer() {
WsByteBuffer buff = null;
if (HeaderStorage.NOTSET != this.parseIndex) {
buff = this.parseBuffers[this.parseIndex];
this.parseIndex--;
}
return buff;
} | java |
private void createSingleHeader(HeaderKeys key, byte[] value, int offset, int length) {
HeaderElement elem = findHeader(key);
if (null != elem) {
// delete all secondary instances first
if (null != elem.nextInstance) {
HeaderElement temp = elem.nextInstance;
... | java |
private void addHeader(HeaderElement elem, boolean bFilter) {
final HeaderKeys key = elem.getKey();
if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
Tr.event(tc, "Adding header [" + key.getName()
+ "] with value [" + elem.getDebugValue() + "]");
... | java |
private HeaderElement findHeader(HeaderKeys key, int instance) {
final int ord = key.getOrdinal();
if (!storage.containsKey(ord) && ord <= HttpHeaderKeys.ORD_MAX) {
return null;
}
HeaderElement elem = null;
//If the ordinal created for this key is larger than 1024,... | java |
private void removeHdr(HeaderElement elem) {
if (null == elem) {
return;
}
HeaderKeys key = elem.getKey();
elem.remove();
if (key.useFilters()) {
filterRemove(key, elem.asBytes());
}
} | java |
private void removeHdrInstances(HeaderElement root, boolean bFilter) {
if (null == root) {
return;
}
HeaderKeys key = root.getKey();
if (bFilter && key.useFilters()) {
filterRemove(key, null);
}
HeaderElement elem = root;
while (null != ele... | java |
protected void setSpecialHeader(HeaderKeys key, byte[] value) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "setSpecialHeader(h,b[]): " + key.getName());
}
removeHdrInstances(findHeader(key), FILTER_NO);
HeaderElement elem = getElement(key)... | java |
public void setHeaderChangeLimit(int limit) {
this.headerChangeLimit = limit;
this.bOverChangeLimit = false;
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "Setting header change limit to " + limit);
}
} | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.