code stringlengths 73 34.1k | label stringclasses 1
value |
|---|---|
private void parseLocationStep(String selector,
int start,
int stepEnd)
throws InvalidXPathSyntaxException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
tc.entry(cclass,
"parseLocationStep",
... | java |
private IdentifierImpl createIdentifierForSubExpression(String subExpression,
String fullExpression,
boolean isLocationStep,
boolean isLastStep)
... | java |
private IdentifierImpl createIdentifierForWildExpression(String selector)
throws InvalidXPathSyntaxException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
tc.entry(cclass,
"createIdentifierForWildExpression",
"selector: " + selector);
Identif... | java |
private void setXPathCharacteristics(IdentifierImpl identifier)
throws InvalidXPathSyntaxException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
tc.entry(cclass,
"setXPathCharacteristics",
"identifier: " + identifier);
// Need to set the domain... | java |
private Selector parsePredicate(String predicate, String fullPath)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
tc.entry(cclass,
"parsePredicate",
"predicate: " + predicate);
Selector parsed = null;
try
{
// Preprocess predicate for sp... | java |
private String preProcessForSpecials(String predicate)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
tc.entry(cclass,
"preProcessForSpecials",
"predicate: " + predicate);
String processed = predicate;
String replace = replaceSpecialsWithSu... | java |
private void postProcessSelectorTree(Selector parsed, String fullPath)
throws InvalidXPathSyntaxException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
tc.entry(cclass,
"postProcessSelectorTree",
"parsed: " + parsed + ", fullPath: " + fullPath);
... | java |
private void postProcessOperands(OperatorImpl opImpl, String fullPath)
throws InvalidXPathSyntaxException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
tc.entry(cclass,
"postProcessOperands",
"opImpl: " + opImpl + ", fullPath: " + fullPath);
... | java |
private String replaceSpecialsWithSub(String inString)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
tc.entry(cclass,
"replaceSpecialsWithSub",
"inString: " + inString);
String outString = null;
StringBuffer sb = null;
// First of... | java |
private String replaceSubForSpecials(String inString)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
tc.entry(cclass,
"replaceSubForSpecials",
"inString: " + inString);
String outString = null;
StringBuffer sb = null;
// First deal with a... | java |
private void wrapLocationStep(String selector,
int start,
int stepEnd)
throws InvalidXPathSyntaxException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
tc.entry(cclass,
"wrapLocationStep",
... | java |
private void wrapLastLocationStep(String selector,
int start,
boolean bumpLocationStep)
throws InvalidXPathSyntaxException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
tc.entry(cclass,
"wrapLastL... | java |
public void addChain(ChainData newChain) throws ChainException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
Tr.entry(tc, "addChain: " + newChain.getName());
}
if (containsChain(newChain.getName())) {
ChainException e = new ChainException("Chain al... | java |
public void removeChain(ChainData inputChain) throws ChainException {
String chainname = inputChain.getName();
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
Tr.entry(tc, "removeChain: " + chainname);
}
if (!containsChain(chainname)) {
ChainEx... | java |
public void updateChain(ChainData inputChain) {
String chainname = inputChain.getName();
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "updateChain: " + chainname);
}
// Find the chain in the group.
for (int i = 0; i < this.chainArra... | java |
private void removeListenerFromChain(ChainEventListener listener, ChainData chainData) {
ChainGroupData[] otherGroups = null;
boolean foundOtherGroupWithListener = false;
// Extract the groups that this chain is involved in.
try {
otherGroups = this.framework.getAllChainGroup... | java |
public final void addChainEventListener(ChainEventListener listener) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "addChainEventListener: " + listener);
}
if ((null != listener) && (!getChainEventListeners().contains(listener))) {
// A... | java |
public final void removeChainEventListener(ChainEventListener listener) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "removeChainEventListener: " + listener);
}
if (null != listener) {
// Remove the listener from the list monitored by... | java |
public void addJSONObject(JSONObject obj)
{
if (logger.isLoggable(Level.FINER)) logger.entering(className, "addJSONObject(JSONObject)");
Vector vect = (Vector) this.jsonObjects.get(obj.objectName);
if (vect != null)
{
vect.add(obj);
}
else
{
... | java |
public void writeObject(Writer writer, int indentDepth, boolean contentOnly, boolean compact)
throws IOException
{
if (logger.isLoggable(Level.FINER)) logger.entering(className, "writeObject(Writer, int, boolean, boolean)");
if (writer != null)
{
try
{
... | java |
private void writeIndention(Writer writer, int indentDepth)
throws IOException
{
if (logger.isLoggable(Level.FINER)) logger.entering(className, "writeIndention(Writer, int)");
try
{
for (int i = 0; i < indentDepth; i++)
{
writer.write(indent);
... | java |
public void setAttributes(FaceletContext ctx, Object obj)
{
DateTimeConverter c = (DateTimeConverter) obj;
if (this.locale != null)
{
c.setLocale(ComponentSupport.getLocale(ctx, this.locale));
}
if (this.pattern != null)
{
c.setPattern(this.pat... | java |
public void createShellStreamSet()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "createShellStreamSet");
StreamSet streamSet = null;
synchronized (streamSets)
{
streamSet = new StreamSet(null,
... | java |
public void processAckExpected(long stamp,
int priority,
Reliability reliability,
SIBUuid12 streamID)
throws SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEnt... | java |
public void forceFlush(SIBUuid12 streamID) throws SIErrorException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "forceFlush", streamID);
StreamSet streamSet = streamSets.get(streamID);
streamSet.dereferenceControlAdapter();
// Send ... | java |
public ControlNotFlushed stampNotFlushed(ControlNotFlushed msg, SIBUuid12 streamID) throws SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "stampNotFlushed", new Object[] { msg });
int count = 0;
//the maximum possible numb... | java |
public StatisticImpl getStatistic() {
if (enabled) {
if (proxy == null) {
System.out.println("[SpdStatisticExternal] null proxy");
return null;
}
proxy.updateStatisticOnRequest(dataId);
// onReqStatistic will be updated by the com... | java |
static String[] uniquify(String[] arr, boolean alwaysClone) {
int numUnique = uniquifyCountAndCopy(arr, null);
if (numUnique == 0)
return EMPTY_STRING_ARRAY;
if (numUnique == arr.length)
return alwaysClone ? arr.clone() : arr;
String[] out = new String[numUnique]... | java |
private static int uniquifyCountAndCopy(String[] in, String[] out) {
int count = 0;
outer: for (int i = 0; i < in.length; i++) {
if (in[i] != null) {
for (int j = 0; j < i; j++)
if (in[i].equals(in[j]))
continue outer;
... | java |
private Integer findMinimumSafeLevel(PackageIndex<Integer> index) {
if (index == null) {
return null;
}
Integer minimumLevel = index.find(name);
if (minimumLevel == null) {
// Find by groups
for (String group : groups) {
minimumLevel = ... | java |
private TranLogConfiguration createCustomTranLogConfiguration(String recoveredServerIdentity, String logDir, boolean isPeerRecoverySupported) throws URISyntaxException {
if (tc.isEntryEnabled())
Tr.entry(tc, "createCustomTranLogConfiguration", new java.lang.Object[] { recoveredServerIdentity, logDir... | java |
private TranLogConfiguration createFileTranLogConfiguration(String recoveredServerIdentity,
FailureScope fs,
String logDir,
int ... | java |
private int getPeerLeaseCheckInterval() {
if (tc.isEntryEnabled())
Tr.entry(tc, "getPeerLeaseCheckInterval");
int intToReturn;
Integer peerLeaseCheckInterval = null;
try {
peerLeaseCheckInterval = AccessController.doPrivileged(
... | java |
private boolean doNotShutdownOnRecoveryFailure() {
if (tc.isEntryEnabled())
Tr.entry(tc, "doNotShutdownOnRecoveryFailure");
boolean doCheck = true;
Boolean doNotShutdownOnRecoveryFailure = null;
try {
doNotShutdownOnRecoveryFailure = AccessController.doPrivilege... | java |
private static String getStringKey(String propertyKey) {
if (WCCustomProperties.FullyQualifiedPropertiesMap.containsKey(propertyKey)) {
return WCCustomProperties.FullyQualifiedPropertiesMap.get(propertyKey).toLowerCase();
} else {
return propertyKey;
}
} | java |
protected void createLockFile(String pid, String label) throws IOException {
if (!AccessHelper.isDirectory(repositoryLocation)) {
AccessHelper.makeDirectories(repositoryLocation);
}
// Remove stale lock files if any.
for (File lock : listFiles(LOCKFILE_FILTER)) {
... | java |
protected File getLogFile(File parentLocation, long timestamp) {
if (timestamp < 0) {
throw new IllegalArgumentException("timestamp cannot be negative");
}
StringBuilder sb = new StringBuilder();
sb.append(timestamp).append(EXTENSION);
return new File(parentLocation, ... | java |
public long getLogFileTimestamp(File file) {
if (file == null) {
return -1L;
}
String name = file.getName();
// Check name for extension
if (name == null || name.length() == 0 || !name.endsWith(EXTENSION)) {
return -1L;
}
try {
... | java |
public String getLogDirectoryName(long timestamp, String pid, String label) {
if (pid == null || pid.isEmpty()) {
throw new IllegalArgumentException("pid cannot be empty");
}
StringBuilder sb = new StringBuilder();
if (timestamp > 0) {
sb.append(timestamp).append... | java |
public static long parseTimeStamp(String fileName) {
if (fileName == null || fileName.isEmpty()) {
return -1L;
}
int pidIndex = fileName.indexOf(TIMESEPARATOR);
int labelIndex = fileName.indexOf(LABELSEPARATOR);
// If no time separator or it's a part of the label ther... | java |
public static String parsePIDandLabel(String fileName) {
if (fileName == null || fileName.isEmpty()) {
return null;
}
int pidIndex = fileName.indexOf(TIMESEPARATOR);
int labelIndex = fileName.indexOf(LABELSEPARATOR);
// If no time separator or it's a part of the labe... | java |
public static String getFormattedMessageFromLocalizedMessage(String localizedMessage, Object[] args, boolean quiet) {
return TraceNLSResolver.getInstance().getFormattedMessage(localizedMessage, args);
} | java |
public void resolveBundles(BundleContext bContext, List<Bundle> bundlesToResolve) {
if (bundlesToResolve == null || bundlesToResolve.size() == 0) {
return;
}
FrameworkWiring wiring = adaptSystemBundle(bContext, FrameworkWiring.class);
if (wiring != null) {
Resolu... | java |
public static String getBundleLocation(String urlString, String productName) {
String productNameInfo = (productName != null && !productName.isEmpty()) ? (BUNDLE_LOC_PROD_EXT_TAG + productName + ":") : "";
return BUNDLE_LOC_FEATURE_TAG + productNameInfo + urlString;
} | java |
private String getRegionName(String productName) {
if (productName == null || productName.isEmpty()) {
return kernelRegion.getName();
}
return REGION_EXTENSION_PREFIX + INVALID_REGION_CHARS.matcher(productName).replaceAll("-");
} | java |
public static String getESIDependencies(Enumeration e1, Enumeration e2) {
if ((e1 == null || !e1.hasMoreElements()))
if ((e2 == null || !e2.hasMoreElements()))
return null;
StringBuffer sb = new StringBuffer("dependencies=\"");
if (e1 != null)
while (e1.hasMoreElements())... | java |
public E getBy(String attributeName, String attributeValue) {
String methodName = "get" + Character.toUpperCase(attributeName.charAt(0)) + attributeName.substring(1);
for (E element : this)
if (element != null)
try {
Object value = element.getClass().getMe... | java |
public E getById(String id) {
if (id == null) {
for (E element : this) {
if (element != null && element.getId() == null) {
return element;
}
}
} else {
for (E element : this) {
if (element != null && ... | java |
public E removeById(String id) {
// traverses the list twice, but reuse code
E element = this.getById(id);
if (element != null) {
this.remove(element); // this should always return true since we already found the element
}
return element;
} | java |
public E getOrCreateById(String id, Class<E> type) throws IllegalAccessException, InstantiationException {
E element = this.getById(id);
if (element == null) {
element = type.newInstance();
element.setId(id);
this.add(element);
}
return element;
} | java |
public final static TrmMessageType getTrmMessageType(int aValue) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc,"Value = " + aValue);
return set[aValue];
} | java |
public V getService(K key) {
ComponentContext ctx = context;
if (ctx == null || key == null)
return null;
ConcurrentServiceReferenceElement<V> e = elementMap.get(key);
if (e == null) {
return null;
} else {
return e.getService(ctx);
}... | java |
public ServiceReference<V> getReference(K key) {
if (key == null)
return null;
ConcurrentServiceReferenceElement<V> e = elementMap.get(key);
if (e == null) {
return null;
} else {
return e.getReference();
}
} | java |
public static List<ProductExtensionInfo> getProductExtensions(File installDir) {
ArrayList<ProductExtensionInfo> productList = new ArrayList<ProductExtensionInfo>();
Set<String> extensionsSoFar = new HashSet<String>();
// Get the embedder SPI product extensions
HashMap<String, Propertie... | java |
public static ProductExtensionInfo getProductExtension(String extensionName) throws IOException {
ProductExtensionInfo productExtensionInfo = null;
List<ProductExtensionInfo> productExtensionList = getProductExtensions(Utils.getInstallDir());
for (ProductExtensionInfo currentProductExtension :... | java |
@Override
public void start(BundleContext context) {
initialContextFactories = initServiceTracker(context, InitialContextFactory.class, ServiceTrackerCustomizers.ICF_CACHE);
objectFactories = initServiceTracker(context, ObjectFactory.class, ServiceTrackerCustomizers.URL_FACTORY_CACHE);
icfB... | java |
public void initialize(Map<String, Object> configProps) throws WIMException {
try {
reposId = (String) configProps.get(KEY_ID);
setCustomProperties((List<Map<String, String>>) configProps.get(ConfigConstants.CONFIG_DO_CUSTOM_PROPERTIES));
setMapping();
setBaseEnt... | java |
private void setBaseEntry(Map<String, Object> configProps) throws WIMException {
/*
* Map<String, List<Map<String, Object>>> configMap = Nester.nest(configProps, BASE_ENTRY);
*
* for (Map<String, Object> entry : configMap.get(BASE_ENTRY)) {
* baseEntryName = (String) entry.get(BASE_ENTRY_NAME);
* }
*/
bas... | java |
private void setCustomProperties(List<Map<String, String>> propList) throws WIMException {
final String METHODNAME = "setCustomProperties";
customPropertyMap = new HashMap<String, String>();
if (propList == null) {
return;
}
Iterator<Map<String, String>> itr = propLis... | java |
private void setConfigEntityMapping(Map<String, Object> configProps) throws WIMException {
List<String> entityTypes = getSupportedEntityTypes();
String rdnProp;
String type = null;
entityConfigMap = new HashMap<String, String>();
for (int i = 0; i < entityTypes.size(); i++) {
... | java |
private String validateEntity(Entity entity) throws WIMException {
String METHODNAME = "validateEntity";
String type = null;
String secName = null;
String uniqueId = null;
String uniqueName = null;
if (entity.getIdentifier().isSet(SchemaConstants.PROP_UNIQUE_NAME)) {
... | java |
private String getSecNameFromUniqueID(String uniqueId) throws WIMException {
String METHODNAME = "getSecNameFromUniqueID";
String secName = null;
try {
secName = getUserSecurityName(uniqueId);
} catch (EntryNotFoundException e) {
try {
secName = ge... | java |
private String getRDN(String name) {
if (name == null) {
return name;
}
int indexOfEqual = name.indexOf('=');
if (indexOfEqual < 0) {
return name;
}
String rdnValue = name.substring(0, indexOfEqual);
return rdnValue;
} | java |
@FFDCIgnore(Exception.class)
public boolean isEntityInRealm(String uniqueName) {
if (isSafRegistry()) {
try {
return userRegistry.isValidUser(uniqueName);
} catch (Exception e) {
/* Ignore. */
}
try {
return us... | java |
private void setFields(Connection connection,
JFapByteBuffer buffer,
int priority,
boolean isPooled,
boolean isExchange,
int segmentType,
int conversationId,
... | java |
private void reset(Connection connection,
JFapByteBuffer buffer,
int priority,
boolean isPooled,
boolean isExchange,
int segmentType,
int conversationId,
int requestN... | java |
public boolean hasNext()
{
if (tc.isEntryEnabled()) SibTr.entry(this, tc, "hasNext");
if (tc.isEntryEnabled()) SibTr.exit(this, tc, "hasNext", ""+transmissionsRemaining);
return transmissionsRemaining;
} | java |
protected static TransmissionDataIterator allocateFromPool(Connection connection,
JFapByteBuffer buffer,
int priority,
boolean isPoole... | java |
protected void release()
{
if (tc.isEntryEnabled()) SibTr.entry(this, tc, "release");
if (!transmissionsRemaining)
{
if (tc.isDebugEnabled()) SibTr.debug(this, tc, "no more transmissions remaining - repooling");
// Ensure we release the byte buffers back into the pool
... | java |
protected int getPriority()
{
if (tc.isEntryEnabled()) SibTr.entry(this, tc, "getPriority");
if (tc.isEntryEnabled()) SibTr.exit(this, tc, "getPriority", ""+priority);
return priority;
} | java |
protected void setPriority(int priority)
{
if (tc.isEntryEnabled()) SibTr.entry(this, tc, "setPriority", ""+priority);
this.priority = priority;
if (tc.isEntryEnabled()) SibTr.exit(this, tc, "setPriority");
} | java |
protected int getSize()
{
if (tc.isEntryEnabled()) SibTr.entry(this, tc, "getSize");
if (tc.isEntryEnabled()) SibTr.exit(this, tc, "getSize", ""+size);
return size;
} | java |
public static boolean isDebugEnabled() {
String value = System.getProperty(DEBUG_PROPERTY);
if (value != null && "true".equalsIgnoreCase(value)) {
return true;
}
return false;
} | java |
private String getDefaultPackageExtension() {
// Default package format on z/OS is a pax
if ("z/OS".equalsIgnoreCase(bootProps.get("os.name"))) {
return "pax";
}
if (PackageProcessor.IncludeOption.RUNNABLE.matches(includeOption)) {
return "jar";
}
... | java |
public static ASN1Set getInstance(
Object obj)
{
if (obj == null || obj instanceof ASN1Set)
{
return (ASN1Set)obj;
}
throw new IllegalArgumentException("unknown object in getInstance");
} | java |
@Override
public Conduit getConduit(EndpointInfo endpointInfo, EndpointReferenceType target) throws IOException {
//create our LibertyHTTPConduit so that we can set the TCCL when run the handleResponseInternal asynchronously
LibertyHTTPConduit conduit = new LibertyHTTPConduit(bus, endpointInfo, targ... | java |
protected static final void setRSAKey(byte[][] key) {
BigInteger[] k = new BigInteger[8];
for (int i = 0; i < 8; i++) {
if (key[i] != null) {
k[i] = new BigInteger(1, key[i]);
}
}
if (k[3].compareTo(k[4]) < 0) {
BigInteger tmp;
... | java |
protected static final byte[] encrypt(byte[] data, byte[] key, String cipher) throws Exception {
SecretKey sKey = constructSecretKey(key, cipher);
Cipher ci = createCipher(Cipher.ENCRYPT_MODE, key, cipher, sKey);
return ci.doFinal(data);
} | java |
protected static final byte[] decrypt(byte[] msg, byte[] key, String cipher) throws Exception {
SecretKey sKey = constructSecretKey(key, cipher);
Cipher ci = createCipher(Cipher.DECRYPT_MODE, key, cipher, sKey);
return ci.doFinal(msg);
} | java |
public void populatePrefixTable() {
if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
SibTr.entry(TRACE, "populatePrefixTable");
}
// Create the storage.
prefixTable = new HashMap<Class,String>();
// Populate with the supported (non-null) data t... | java |
public Map getMapFromReference(final Reference ref, final Map defaults) {
if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
SibTr.entry(this, TRACE, "getMapFromReference", new Object[] {ref,defaults});
}
Map extractedProps = null;
// Extract a Map of th... | java |
public void populateReference(final Reference reference,
final Map properties, final Map defaults) {
if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
SibTr.entry(this, TRACE, "populateReference", new Object[] {
reference, properties, defaults});
... | java |
@Override
protected void setCommsConnection(CommsConnection cc) {
if (tc.isEntryEnabled())
SibTr.entry(this, tc, "setCommsConnection");
// Retrieve Client Conversation State if necessary
validateConversationState();
sConState.setCommsConnection(cc);
if (tc.isEn... | java |
public ConversationReceiveListener acceptConnection(Conversation cfConversation) {
if (tc.isEntryEnabled())
SibTr.entry(tc, "acceptConnection");
// Return new instance of a GenericTransportReceiveListener. This listener
// determines whether data has been received from a client or M... | java |
public static QueuedMessage createSIBQueuedMessage(SIMPQueuedMessageControllable qmc) {
String id = null;
int jsApproximateLength = 0;
String name = null;
String state = null;
String transactionId = null;
String type = null;
String busSystemMessageId = null;
... | java |
public static MessagingSubscription createSIBSubscription(SIMPLocalSubscriptionControllable ls) {
long depth = 0;
String id = null;
int maxMsgs = 0;
String name = null;
String selector = null;
String subscriberId = null;
String[] topics = null;
depth = l... | java |
private static NLS getNLS(Locale l, String resourceBundle, String statsType) {
// init Locale
boolean bDefaultLocale = false;
if (l == null || l == Locale.getDefault()) {
bDefaultLocale = true;
l = Locale.getDefault();
}
NLS aNLS = null;
if (resou... | java |
public static PmiModuleConfig getStatsConfig(String statsType) {
PmiModuleConfig cfg = (PmiModuleConfig) rawConfigMap.get(statsType);
if (cfg == null)
cfg = _getStatsConfig(statsType, false, null);
return cfg;
} | java |
public static PmiModuleConfig getTranslatedStatsConfig(String statsType, Locale locale) {
PmiModuleConfig aCfg = getConfig(locale, statsType);
if (aCfg == null)
aCfg = _getStatsConfig(statsType, true, locale);
return aCfg;
} | java |
public static void translateAndCache(PmiModuleConfig cfg, Locale l) {
PmiModuleConfig aCfg = getConfig(l, cfg.getUID());
if (aCfg == null) {
aCfg = cfg.copy(); // create a copy before translating
// filter sub-module entry
if (aCfg != null) {
PmiData... | java |
public String[] getPath() {
if (path != null)
return path;
else if (instanceName == null && type == TYPE_SUBMODULE)
return new String[] { moduleID, submoduleName };
else
return super.getPath();
} | java |
public final static SubscriptionMessageType getSubscriptionMessageType(int aValue) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc,"Value = " + aValue);
return set[aValue];
} | java |
private void fail(final K key) {
final String methodName = "fail(): ";
stateLock.writeLock().lock();
try {
Integer index = actualIndices.remove(key);
if (index == null)
throw new IllegalArgumentException("unknown key: " + key);
elements[index] ... | java |
private void checkForCompletion() {
final String methodName = "checkForCompletion(): ";
// mark the list complete if that was the last awaited key
if (actualIndices.isEmpty()) {
if (tc.isDebugEnabled())
Tr.debug(tc, methodName + "setting state=COMPLETE");
... | java |
@Override
public int size() {
stateLock.readLock().lock();
try {
switch (state) {
default:
// This list might be empty or full or somewhere in between:
// we don't know until we look!
preFetchAll();
... | java |
@FFDCIgnore(IndexOutOfBoundsException.class)
private boolean ensureElement(int index) {
try {
get(index);
return true;
} catch (IndexOutOfBoundsException e) {
return false;
}
} | java |
public Set<K> getUnmatchedKeys() {
stateLock.readLock().lock();
try {
return new HashSet<K>(this.actualIndices.keySet());
} finally {
stateLock.readLock().unlock();
}
} | java |
private String getTopic(FrameworkEvent frameworkEvent) {
StringBuilder topic = new StringBuilder(FRAMEWORK_EVENT_TOPIC_PREFIX);
switch (frameworkEvent.getType()) {
case FrameworkEvent.STARTED:
topic.append("STARTED");
break;
case FrameworkEvent.ER... | java |
void resetStatistics(boolean clearHistory) {
lastTimerPop = System.currentTimeMillis();
previousCompleted = threadPool == null ? 0 : threadPool.getCompletedTaskCount();
previousThroughput = 0;
consecutiveQueueEmptyCount = 0;
consecutiveNoAdjustment = 0;
consecutiveOutlie... | java |
void resetThreadPool() {
if (threadPool == null)
return; // if no pool (during shutdown), nothing to retune/reset
// 8/22/2012: Introduced factor - was hard coded at 2
final int availableProcessors = NUMBER_CPUS;
int factor = 2500 * availableProcessors / Math.max(1, (int) p... | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.