repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
OpenLiberty/open-liberty | dev/com.ibm.ws.jca.cm/src/com/ibm/ejs/j2c/ConnectionManagerServiceImpl.java | ConnectionManagerServiceImpl.getCMConfigData | private final CMConfigData getCMConfigData(AbstractConnectionFactoryService cfSvc, ResourceInfo refInfo) {
final boolean trace = TraceComponent.isAnyTracingEnabled();
if (trace && tc.isEntryEnabled())
Tr.entry(this, tc, "getCMConfigData");
// Defaults for direct lookup
int a... | java | private final CMConfigData getCMConfigData(AbstractConnectionFactoryService cfSvc, ResourceInfo refInfo) {
final boolean trace = TraceComponent.isAnyTracingEnabled();
if (trace && tc.isEntryEnabled())
Tr.entry(this, tc, "getCMConfigData");
// Defaults for direct lookup
int a... | [
"private",
"final",
"CMConfigData",
"getCMConfigData",
"(",
"AbstractConnectionFactoryService",
"cfSvc",
",",
"ResourceInfo",
"refInfo",
")",
"{",
"final",
"boolean",
"trace",
"=",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
";",
"if",
"(",
"trace",
"&&"... | Construct the CMConfigData, including properties from the resource reference, if applicable.
@param cfSvc connection factory service
@param ref resource reference.
@return com.ibm.ejs.j2c.CMConfigData | [
"Construct",
"the",
"CMConfigData",
"including",
"properties",
"from",
"the",
"resource",
"reference",
"if",
"applicable",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.cm/src/com/ibm/ejs/j2c/ConnectionManagerServiceImpl.java#L288-L330 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.jca.cm/src/com/ibm/ejs/j2c/ConnectionManagerServiceImpl.java | ConnectionManagerServiceImpl.getConnectionManager | @Override
public ConnectionManager getConnectionManager(ResourceInfo refInfo, AbstractConnectionFactoryService svc) throws ResourceException {
final boolean trace = TraceComponent.isAnyTracingEnabled();
if (trace && tc.isEntryEnabled())
Tr.entry(this, tc, "getConnectionManager", refInfo... | java | @Override
public ConnectionManager getConnectionManager(ResourceInfo refInfo, AbstractConnectionFactoryService svc) throws ResourceException {
final boolean trace = TraceComponent.isAnyTracingEnabled();
if (trace && tc.isEntryEnabled())
Tr.entry(this, tc, "getConnectionManager", refInfo... | [
"@",
"Override",
"public",
"ConnectionManager",
"getConnectionManager",
"(",
"ResourceInfo",
"refInfo",
",",
"AbstractConnectionFactoryService",
"svc",
")",
"throws",
"ResourceException",
"{",
"final",
"boolean",
"trace",
"=",
"TraceComponent",
".",
"isAnyTracingEnabled",
... | Returns the connection manager for this configuration.
This method lazily initializes the connection manager service if necessary.
@param ref reference to the connection factory.
@param svc the connection factory service
@return the connection manager for this configuration.
@throws ResourceException if an error occur... | [
"Returns",
"the",
"connection",
"manager",
"for",
"this",
"configuration",
".",
"This",
"method",
"lazily",
"initializes",
"the",
"connection",
"manager",
"service",
"if",
"necessary",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.cm/src/com/ibm/ejs/j2c/ConnectionManagerServiceImpl.java#L341-L387 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.jca.cm/src/com/ibm/ejs/j2c/ConnectionManagerServiceImpl.java | ConnectionManagerServiceImpl.toHashMap | private final static HashMap<String, String> toHashMap(List<? extends ResourceInfo.Property> propList) {
if (propList == null)
return null;
HashMap<String, String> propMap = new HashMap<String, String>();
for (ResourceInfo.Property prop : propList)
propMap.put(prop.getNa... | java | private final static HashMap<String, String> toHashMap(List<? extends ResourceInfo.Property> propList) {
if (propList == null)
return null;
HashMap<String, String> propMap = new HashMap<String, String>();
for (ResourceInfo.Property prop : propList)
propMap.put(prop.getNa... | [
"private",
"final",
"static",
"HashMap",
"<",
"String",
",",
"String",
">",
"toHashMap",
"(",
"List",
"<",
"?",
"extends",
"ResourceInfo",
".",
"Property",
">",
"propList",
")",
"{",
"if",
"(",
"propList",
"==",
"null",
")",
"return",
"null",
";",
"HashM... | Utility method that converts a list of properties to HashMap.
@param propList list of name/value pairs
@return mapping of name/value pairs | [
"Utility",
"method",
"that",
"converts",
"a",
"list",
"of",
"properties",
"to",
"HashMap",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.cm/src/com/ibm/ejs/j2c/ConnectionManagerServiceImpl.java#L666-L675 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.iiop/src/com/ibm/ws/transport/iiop/internal/WSPortableRemoteObjectImpl.java | WSPortableRemoteObjectImpl.narrow | @Override
@FFDCIgnore(BAD_OPERATION.class)
public Object narrow(Object narrowFrom, @SuppressWarnings("rawtypes") Class narrowTo) throws ClassCastException {
if (narrowFrom == null) {
return null;
}
if (narrowTo.isInstance(narrowFrom)) {
if (TraceComponent.isAnyTr... | java | @Override
@FFDCIgnore(BAD_OPERATION.class)
public Object narrow(Object narrowFrom, @SuppressWarnings("rawtypes") Class narrowTo) throws ClassCastException {
if (narrowFrom == null) {
return null;
}
if (narrowTo.isInstance(narrowFrom)) {
if (TraceComponent.isAnyTr... | [
"@",
"Override",
"@",
"FFDCIgnore",
"(",
"BAD_OPERATION",
".",
"class",
")",
"public",
"Object",
"narrow",
"(",
"Object",
"narrowFrom",
",",
"@",
"SuppressWarnings",
"(",
"\"rawtypes\"",
")",
"Class",
"narrowTo",
")",
"throws",
"ClassCastException",
"{",
"if",
... | An implementation of narrow that always attempts to load stub classes
from the class loader before dynamically generating a stub class. | [
"An",
"implementation",
"of",
"narrow",
"that",
"always",
"attempts",
"to",
"load",
"stub",
"classes",
"from",
"the",
"class",
"loader",
"before",
"dynamically",
"generating",
"a",
"stub",
"class",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.iiop/src/com/ibm/ws/transport/iiop/internal/WSPortableRemoteObjectImpl.java#L36-L89 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.jpa.container.ormdiagnostics/src/com/ibm/ws/jpa/diagnostics/puscanner/PersistenceUnitScanner.java | PersistenceUnitScanner.scanClasses | private void scanClasses() throws PersistenceUnitScannerException {
try {
for (URL url : urlSet) {
final HashSet<ClassInfoType> citSet = new HashSet<ClassInfoType>();
final String urlProtocol = url.getProtocol();
if ("file".equalsIgnoreCase(urlProtocol... | java | private void scanClasses() throws PersistenceUnitScannerException {
try {
for (URL url : urlSet) {
final HashSet<ClassInfoType> citSet = new HashSet<ClassInfoType>();
final String urlProtocol = url.getProtocol();
if ("file".equalsIgnoreCase(urlProtocol... | [
"private",
"void",
"scanClasses",
"(",
")",
"throws",
"PersistenceUnitScannerException",
"{",
"try",
"{",
"for",
"(",
"URL",
"url",
":",
"urlSet",
")",
"{",
"final",
"HashSet",
"<",
"ClassInfoType",
">",
"citSet",
"=",
"new",
"HashSet",
"<",
"ClassInfoType",
... | Scan classes in persistence unit root and referenced jar-files | [
"Scan",
"classes",
"in",
"persistence",
"unit",
"root",
"and",
"referenced",
"jar",
"-",
"files"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jpa.container.ormdiagnostics/src/com/ibm/ws/jpa/diagnostics/puscanner/PersistenceUnitScanner.java#L92-L121 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.jpa.container.ormdiagnostics/src/com/ibm/ws/jpa/diagnostics/puscanner/PersistenceUnitScanner.java | PersistenceUnitScanner.scanEntityMappings | private void scanEntityMappings() throws PersistenceUnitScannerException {
/*
* From the JPA 2.1 Specification:
*
* 8.2.1.6.2 Object/relational Mapping Files
* An object/relational mapping XML file contains mapping information for the classes listed in it.
*
... | java | private void scanEntityMappings() throws PersistenceUnitScannerException {
/*
* From the JPA 2.1 Specification:
*
* 8.2.1.6.2 Object/relational Mapping Files
* An object/relational mapping XML file contains mapping information for the classes listed in it.
*
... | [
"private",
"void",
"scanEntityMappings",
"(",
")",
"throws",
"PersistenceUnitScannerException",
"{",
"/*\n * From the JPA 2.1 Specification:\n *\n * 8.2.1.6.2 Object/relational Mapping Files\n * An object/relational mapping XML file contains mapping information for th... | Scan Entity Mappings Files | [
"Scan",
"Entity",
"Mappings",
"Files"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jpa.container.ormdiagnostics/src/com/ibm/ws/jpa/diagnostics/puscanner/PersistenceUnitScanner.java#L401-L461 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.jpa.container.ormdiagnostics/src/com/ibm/ws/jpa/diagnostics/puscanner/PersistenceUnitScanner.java | PersistenceUnitScanner.findORMResources | private List<URL> findORMResources(PersistenceUnitInfo pui, String ormFileName) throws IOException {
final boolean isMetaInfoOrmXML = "META-INF/orm.xml".equals(ormFileName);
final ArrayList<URL> retArr = new ArrayList<URL>();
Enumeration<URL> ormEnum = pui.getClassLoader().getResources(ormFileN... | java | private List<URL> findORMResources(PersistenceUnitInfo pui, String ormFileName) throws IOException {
final boolean isMetaInfoOrmXML = "META-INF/orm.xml".equals(ormFileName);
final ArrayList<URL> retArr = new ArrayList<URL>();
Enumeration<URL> ormEnum = pui.getClassLoader().getResources(ormFileN... | [
"private",
"List",
"<",
"URL",
">",
"findORMResources",
"(",
"PersistenceUnitInfo",
"pui",
",",
"String",
"ormFileName",
")",
"throws",
"IOException",
"{",
"final",
"boolean",
"isMetaInfoOrmXML",
"=",
"\"META-INF/orm.xml\"",
".",
"equals",
"(",
"ormFileName",
")",
... | Finds all specified ORM files, by name, constrained in location by the persistence unit root and jar files.
@param ormFileName The name of the ORM file to search for
@return A List of URLs of resources found by the ClassLoader. Will be an empty List if none are found.
@throws IOException | [
"Finds",
"all",
"specified",
"ORM",
"files",
"by",
"name",
"constrained",
"in",
"location",
"by",
"the",
"persistence",
"unit",
"root",
"and",
"jar",
"files",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jpa.container.ormdiagnostics/src/com/ibm/ws/jpa/diagnostics/puscanner/PersistenceUnitScanner.java#L470-L502 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/gd/InternalOutputStream.java | InternalOutputStream.writeSilence | public boolean writeSilence(SIMPMessage m)
throws SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "writeSilence", new Object[] { m });
JsMessage jsMsg = m.getMessage();
// There may be Completed ticks af... | java | public boolean writeSilence(SIMPMessage m)
throws SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "writeSilence", new Object[] { m });
JsMessage jsMsg = m.getMessage();
// There may be Completed ticks af... | [
"public",
"boolean",
"writeSilence",
"(",
"SIMPMessage",
"m",
")",
"throws",
"SIResourceException",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"tc",
",... | This method uses a Value message to write Silence into the stream,
either because a message has been filtered out or because it has
been rolled back
@param m The value message
@return boolean true if the message can be sent downstream
message is not sent if it has the RequestedOnly
flag set and its tick in the stream... | [
"This",
"method",
"uses",
"a",
"Value",
"message",
"to",
"write",
"Silence",
"into",
"the",
"stream",
"either",
"because",
"a",
"message",
"has",
"been",
"filtered",
"out",
"or",
"because",
"it",
"has",
"been",
"rolled",
"back"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/gd/InternalOutputStream.java#L597-L651 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/gd/InternalOutputStream.java | InternalOutputStream.writeSilence | public void writeSilence(ControlSilence m) throws SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "writeSilence", new Object[] { m });
boolean sendMessage = false;
// to use in messages sent downstream
long complete... | java | public void writeSilence(ControlSilence m) throws SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "writeSilence", new Object[] { m });
boolean sendMessage = false;
// to use in messages sent downstream
long complete... | [
"public",
"void",
"writeSilence",
"(",
"ControlSilence",
"m",
")",
"throws",
"SIResourceException",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"tc",
",... | This method writes the ticks in a Silence message into the stream
It is called when a Silence message arrives from another ME
If the RequestedOnly flag in the message is set then the message is
only sent on to downstream MEs if they have previously requested
it. Otherwise it is always sent.
@param m The Silence messag... | [
"This",
"method",
"writes",
"the",
"ticks",
"in",
"a",
"Silence",
"message",
"into",
"the",
"stream",
"It",
"is",
"called",
"when",
"a",
"Silence",
"message",
"arrives",
"from",
"another",
"ME",
"If",
"the",
"RequestedOnly",
"flag",
"in",
"the",
"message",
... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/gd/InternalOutputStream.java#L663-L745 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/gd/InternalOutputStream.java | InternalOutputStream.writeAckPrefix | public void writeAckPrefix(long stamp) throws SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "writeAckPrefix", Long.valueOf(stamp));
synchronized (this)
{
// SIB0105
// Update controllable health sta... | java | public void writeAckPrefix(long stamp) throws SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "writeAckPrefix", Long.valueOf(stamp));
synchronized (this)
{
// SIB0105
// Update controllable health sta... | [
"public",
"void",
"writeAckPrefix",
"(",
"long",
"stamp",
")",
"throws",
"SIResourceException",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"tc",
",",
... | This method is called when an Ack message is recieved from a downstream
ME. It updates the ackPrefix of the stream and then passes the message
up to the PubSubInputHandler which will aggregate the Acks from all
InternalOutputStreams.
@param stamp The ackPrefix | [
"This",
"method",
"is",
"called",
"when",
"an",
"Ack",
"message",
"is",
"recieved",
"from",
"a",
"downstream",
"ME",
".",
"It",
"updates",
"the",
"ackPrefix",
"of",
"the",
"stream",
"and",
"then",
"passes",
"the",
"message",
"up",
"to",
"the",
"PubSubInput... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/gd/InternalOutputStream.java#L793-L837 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/gd/InternalOutputStream.java | InternalOutputStream.writeSilenceForced | public void writeSilenceForced(TickRange vtr)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "writeSilenceForced", new Object[] { vtr });
long start = vtr.startstamp;
long end = vtr.endstamp;
if (TraceComponent.isAnyTracingEnabled() &... | java | public void writeSilenceForced(TickRange vtr)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "writeSilenceForced", new Object[] { vtr });
long start = vtr.startstamp;
long end = vtr.endstamp;
if (TraceComponent.isAnyTracingEnabled() &... | [
"public",
"void",
"writeSilenceForced",
"(",
"TickRange",
"vtr",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"tc",
",",
"\"writeSilenceForced\"",
"... | This method uses a Value TickRange to write Silence into the stream,
because a message has expired before it was sent and so needs to be removed
from the stream
It forces the stream to be updated to Silence without checking the
existing state
It then updates the upstream control with this new completed prefix
@param m... | [
"This",
"method",
"uses",
"a",
"Value",
"TickRange",
"to",
"write",
"Silence",
"into",
"the",
"stream",
"because",
"a",
"message",
"has",
"expired",
"before",
"it",
"was",
"sent",
"and",
"so",
"needs",
"to",
"be",
"removed",
"from",
"the",
"stream",
"It",
... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/gd/InternalOutputStream.java#L1308-L1353 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/util/SerializationUtility.java | SerializationUtility.serialize | public static final byte[] serialize(Serializable serializable) throws IOException {
if (serializable == null) {
return null;
}
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
ObjectOutputStream objectOutputStream = null;
byte[] result = null;
if (null != _instance ){
... | java | public static final byte[] serialize(Serializable serializable) throws IOException {
if (serializable == null) {
return null;
}
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
ObjectOutputStream objectOutputStream = null;
byte[] result = null;
if (null != _instance ){
... | [
"public",
"static",
"final",
"byte",
"[",
"]",
"serialize",
"(",
"Serializable",
"serializable",
")",
"throws",
"IOException",
"{",
"if",
"(",
"serializable",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"ByteArrayOutputStream",
"byteArrayOutputStream",
"... | This serializes an object into a byte array.
@param serializable The object to be serialized.
@return The serialized object. | [
"This",
"serializes",
"an",
"object",
"into",
"a",
"byte",
"array",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/util/SerializationUtility.java#L72-L107 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.ejbcontainer.remote.portable.core/src/com/ibm/ejs/persistence/PortableFinderEnumerator.java | PortableFinderEnumerator.nextElement | public Object nextElement()
{
try {
return nextElementR();
} catch (NoMoreElementsException e) {
// FFDCFilter.processException(e, CLASS_NAME + ".nextElement", "109", this);
throw new NoSuchElementException();
} catch (EnumeratorException e) {
... | java | public Object nextElement()
{
try {
return nextElementR();
} catch (NoMoreElementsException e) {
// FFDCFilter.processException(e, CLASS_NAME + ".nextElement", "109", this);
throw new NoSuchElementException();
} catch (EnumeratorException e) {
... | [
"public",
"Object",
"nextElement",
"(",
")",
"{",
"try",
"{",
"return",
"nextElementR",
"(",
")",
";",
"}",
"catch",
"(",
"NoMoreElementsException",
"e",
")",
"{",
"// FFDCFilter.processException(e, CLASS_NAME + \".nextElement\", \"109\", this);",
"throw",
"new",
"NoSuc... | Obtain the next element from the enumeration | [
"Obtain",
"the",
"next",
"element",
"from",
"the",
"enumeration"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.remote.portable.core/src/com/ibm/ejs/persistence/PortableFinderEnumerator.java#L92-L109 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.ejbcontainer.remote.portable.core/src/com/ibm/ejs/persistence/PortableFinderEnumerator.java | PortableFinderEnumerator.hasMoreElements | public boolean hasMoreElements()
{
try {
return hasMoreElementsR();
} catch (NoMoreElementsException e) {
// FFDCFilter.processException(e, CLASS_NAME + ".hasMoreElements", "131", this);
return false;
} catch (EnumeratorException e) {
// FFDCFi... | java | public boolean hasMoreElements()
{
try {
return hasMoreElementsR();
} catch (NoMoreElementsException e) {
// FFDCFilter.processException(e, CLASS_NAME + ".hasMoreElements", "131", this);
return false;
} catch (EnumeratorException e) {
// FFDCFi... | [
"public",
"boolean",
"hasMoreElements",
"(",
")",
"{",
"try",
"{",
"return",
"hasMoreElementsR",
"(",
")",
";",
"}",
"catch",
"(",
"NoMoreElementsException",
"e",
")",
"{",
"// FFDCFilter.processException(e, CLASS_NAME + \".hasMoreElements\", \"131\", this);",
"return",
"... | Find out if there are any more elements available | [
"Find",
"out",
"if",
"there",
"are",
"any",
"more",
"elements",
"available"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.remote.portable.core/src/com/ibm/ejs/persistence/PortableFinderEnumerator.java#L114-L131 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.ejbcontainer.remote.portable.core/src/com/ibm/ejs/persistence/PortableFinderEnumerator.java | PortableFinderEnumerator.hasMoreElementsR | public synchronized boolean hasMoreElementsR()
throws RemoteException, EnumeratorException
{
if (elements != null && index < elements.length) {
return true;
} else if (!exhausted) {
// Reset our local cache and attempt to fetch the next batch
... | java | public synchronized boolean hasMoreElementsR()
throws RemoteException, EnumeratorException
{
if (elements != null && index < elements.length) {
return true;
} else if (!exhausted) {
// Reset our local cache and attempt to fetch the next batch
... | [
"public",
"synchronized",
"boolean",
"hasMoreElementsR",
"(",
")",
"throws",
"RemoteException",
",",
"EnumeratorException",
"{",
"if",
"(",
"elements",
"!=",
"null",
"&&",
"index",
"<",
"elements",
".",
"length",
")",
"{",
"return",
"true",
";",
"}",
"else",
... | Find out if there are any more elements available; this method
will perform prefetching from the remote result set. | [
"Find",
"out",
"if",
"there",
"are",
"any",
"more",
"elements",
"available",
";",
"this",
"method",
"will",
"perform",
"prefetching",
"from",
"the",
"remote",
"result",
"set",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.remote.portable.core/src/com/ibm/ejs/persistence/PortableFinderEnumerator.java#L142-L170 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.ejbcontainer.remote.portable.core/src/com/ibm/ejs/persistence/PortableFinderEnumerator.java | PortableFinderEnumerator.nextNElements | public synchronized Object[] nextNElements(int n)
throws RemoteException, EnumeratorException
{
if (!hasMoreElementsR()) {
throw new NoMoreElementsException();
}
EJBObject[] remainder = null;
final int numCached = elements.length - index;
if... | java | public synchronized Object[] nextNElements(int n)
throws RemoteException, EnumeratorException
{
if (!hasMoreElementsR()) {
throw new NoMoreElementsException();
}
EJBObject[] remainder = null;
final int numCached = elements.length - index;
if... | [
"public",
"synchronized",
"Object",
"[",
"]",
"nextNElements",
"(",
"int",
"n",
")",
"throws",
"RemoteException",
",",
"EnumeratorException",
"{",
"if",
"(",
"!",
"hasMoreElementsR",
"(",
")",
")",
"{",
"throw",
"new",
"NoMoreElementsException",
"(",
")",
";",... | Obtain the next n elements from the enumeration; the array may
contain fewer than n elements if the enumeration is exhausted. | [
"Obtain",
"the",
"next",
"n",
"elements",
"from",
"the",
"enumeration",
";",
"the",
"array",
"may",
"contain",
"fewer",
"than",
"n",
"elements",
"if",
"the",
"enumeration",
"is",
"exhausted",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.remote.portable.core/src/com/ibm/ejs/persistence/PortableFinderEnumerator.java#L189-L229 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.ejbcontainer.remote.portable.core/src/com/ibm/ejs/persistence/PortableFinderEnumerator.java | PortableFinderEnumerator.loadEntireCollection | public EJBObject[] loadEntireCollection() {
EJBObject[] result = null;
try {
result = (EJBObject[]) allRemainingElements();
} catch (NoMoreElementsException e) {
// FFDCFilter.processException(e, CLASS_NAME + ".loadEntireCollection",
// ... | java | public EJBObject[] loadEntireCollection() {
EJBObject[] result = null;
try {
result = (EJBObject[]) allRemainingElements();
} catch (NoMoreElementsException e) {
// FFDCFilter.processException(e, CLASS_NAME + ".loadEntireCollection",
// ... | [
"public",
"EJBObject",
"[",
"]",
"loadEntireCollection",
"(",
")",
"{",
"EJBObject",
"[",
"]",
"result",
"=",
"null",
";",
"try",
"{",
"result",
"=",
"(",
"EJBObject",
"[",
"]",
")",
"allRemainingElements",
"(",
")",
";",
"}",
"catch",
"(",
"NoMoreElemen... | Load the entire result set in a greedy fashion. This is required
to support methods on the Collection interface | [
"Load",
"the",
"entire",
"result",
"set",
"in",
"a",
"greedy",
"fashion",
".",
"This",
"is",
"required",
"to",
"support",
"methods",
"on",
"the",
"Collection",
"interface"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.remote.portable.core/src/com/ibm/ejs/persistence/PortableFinderEnumerator.java#L248-L277 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.ejbcontainer.remote.portable.core/src/com/ibm/ejs/persistence/PortableFinderEnumerator.java | PortableFinderEnumerator.allRemainingElements | public synchronized Object[] allRemainingElements()
throws RemoteException, EnumeratorException
{
if (!hasMoreElementsR()) {
throw new NoMoreElementsException();
}
EJBObject[] remainder = null;
if (!exhausted) {
// We must fetch the rema... | java | public synchronized Object[] allRemainingElements()
throws RemoteException, EnumeratorException
{
if (!hasMoreElementsR()) {
throw new NoMoreElementsException();
}
EJBObject[] remainder = null;
if (!exhausted) {
// We must fetch the rema... | [
"public",
"synchronized",
"Object",
"[",
"]",
"allRemainingElements",
"(",
")",
"throws",
"RemoteException",
",",
"EnumeratorException",
"{",
"if",
"(",
"!",
"hasMoreElementsR",
"(",
")",
")",
"{",
"throw",
"new",
"NoMoreElementsException",
"(",
")",
";",
"}",
... | Obtain all of the remaining elements from the enumeration | [
"Obtain",
"all",
"of",
"the",
"remaining",
"elements",
"from",
"the",
"enumeration"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.remote.portable.core/src/com/ibm/ejs/persistence/PortableFinderEnumerator.java#L282-L336 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/JPAPxmlInfo.java | JPAPxmlInfo.extractPersistenceUnits | void extractPersistenceUnits(JPAPXml pxml) {
final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
if (isTraceOn && tc.isEntryEnabled())
Tr.entry(tc, "extractPersistenceUnits : " + pxml);
// Determines the correct schema version, and uses the correct version
// of ... | java | void extractPersistenceUnits(JPAPXml pxml) {
final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
if (isTraceOn && tc.isEntryEnabled())
Tr.entry(tc, "extractPersistenceUnits : " + pxml);
// Determines the correct schema version, and uses the correct version
// of ... | [
"void",
"extractPersistenceUnits",
"(",
"JPAPXml",
"pxml",
")",
"{",
"final",
"boolean",
"isTraceOn",
"=",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
";",
"if",
"(",
"isTraceOn",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"Tr",
".",
"entr... | Populates the list of persistence units defined in this persistence.xml.
@param pxml
@param looseConfig | [
"Populates",
"the",
"list",
"of",
"persistence",
"units",
"defined",
"in",
"this",
"persistence",
".",
"xml",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/JPAPxmlInfo.java#L75-L191 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/JPAPxmlInfo.java | JPAPxmlInfo.close | void close() {
synchronized (ivPuList) {
for (JPAPUnitInfo puInfo : ivPuList.values()) {
puInfo.close();
}
ivPuList.clear();
}
} | java | void close() {
synchronized (ivPuList) {
for (JPAPUnitInfo puInfo : ivPuList.values()) {
puInfo.close();
}
ivPuList.clear();
}
} | [
"void",
"close",
"(",
")",
"{",
"synchronized",
"(",
"ivPuList",
")",
"{",
"for",
"(",
"JPAPUnitInfo",
"puInfo",
":",
"ivPuList",
".",
"values",
"(",
")",
")",
"{",
"puInfo",
".",
"close",
"(",
")",
";",
"}",
"ivPuList",
".",
"clear",
"(",
")",
";"... | Close all the active EntityManagers declared in this persistence.xml. | [
"Close",
"all",
"the",
"active",
"EntityManagers",
"declared",
"in",
"this",
"persistence",
".",
"xml",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/JPAPxmlInfo.java#L196-L203 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/JPAPxmlInfo.java | JPAPxmlInfo.addPU | JPAPUnitInfo addPU(String puName, JPAPUnitInfo puInfo) {
synchronized (ivPuList) {
return ivPuList.put(puName, puInfo);
}
} | java | JPAPUnitInfo addPU(String puName, JPAPUnitInfo puInfo) {
synchronized (ivPuList) {
return ivPuList.put(puName, puInfo);
}
} | [
"JPAPUnitInfo",
"addPU",
"(",
"String",
"puName",
",",
"JPAPUnitInfo",
"puInfo",
")",
"{",
"synchronized",
"(",
"ivPuList",
")",
"{",
"return",
"ivPuList",
".",
"put",
"(",
"puName",
",",
"puInfo",
")",
";",
"}",
"}"
] | Adds the puInfo to the collection maintained in this xml info object.
@param puName
@param puInfo
@return JPAUnitInfo just added. | [
"Adds",
"the",
"puInfo",
"to",
"the",
"collection",
"maintained",
"in",
"this",
"xml",
"info",
"object",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/JPAPxmlInfo.java#L222-L226 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/JPAPxmlInfo.java | JPAPxmlInfo.toStringBuilder | StringBuilder toStringBuilder(StringBuilder sbuf) {
synchronized (ivPuList) {
sbuf.append("\n PxmlInfo: ScopeName=").append(ivScopeInfo.getScopeName()).append("\tRootURL = ").append(ivRootURL).append("\t# PUs = ").append(ivPuList.size()).append("\t[");
int index = 0;
for (JP... | java | StringBuilder toStringBuilder(StringBuilder sbuf) {
synchronized (ivPuList) {
sbuf.append("\n PxmlInfo: ScopeName=").append(ivScopeInfo.getScopeName()).append("\tRootURL = ").append(ivRootURL).append("\t# PUs = ").append(ivPuList.size()).append("\t[");
int index = 0;
for (JP... | [
"StringBuilder",
"toStringBuilder",
"(",
"StringBuilder",
"sbuf",
")",
"{",
"synchronized",
"(",
"ivPuList",
")",
"{",
"sbuf",
".",
"append",
"(",
"\"\\n PxmlInfo: ScopeName=\"",
")",
".",
"append",
"(",
"ivScopeInfo",
".",
"getScopeName",
"(",
")",
")",
".",
... | Dump this persistence.xml data to the input StringBuilder. | [
"Dump",
"this",
"persistence",
".",
"xml",
"data",
"to",
"the",
"input",
"StringBuilder",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/JPAPxmlInfo.java#L253-L267 | train |
OpenLiberty/open-liberty | dev/com.ibm.websphere.security/src/com/ibm/websphere/security/auth/WSSubject.java | WSSubject.restoreInvocationSubject | private static void restoreInvocationSubject(SubjectCookie cookie) {
try {
if (cookie.token != null) {
// We sync'ed the subject's identity to the thread under setInvocationSubject.
// Now restore the previous identity using the token returned when we sync'ed.
... | java | private static void restoreInvocationSubject(SubjectCookie cookie) {
try {
if (cookie.token != null) {
// We sync'ed the subject's identity to the thread under setInvocationSubject.
// Now restore the previous identity using the token returned when we sync'ed.
... | [
"private",
"static",
"void",
"restoreInvocationSubject",
"(",
"SubjectCookie",
"cookie",
")",
"{",
"try",
"{",
"if",
"(",
"cookie",
".",
"token",
"!=",
"null",
")",
"{",
"// We sync'ed the subject's identity to the thread under setInvocationSubject. ",
"// Now restore the p... | Restore the invocation subject. | [
"Restore",
"the",
"invocation",
"subject",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.websphere.security/src/com/ibm/websphere/security/auth/WSSubject.java#L595-L610 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.microprofile.faulttolerance.2.0/src/com/ibm/ws/microprofile/faulttolerance20/state/FaultToleranceStateFactory.java | FaultToleranceStateFactory.createRetryState | public RetryState createRetryState(RetryPolicy policy, MetricRecorder metricRecorder) {
if (policy == null) {
return new RetryStateNullImpl();
} else {
return new RetryStateImpl(policy, metricRecorder);
}
} | java | public RetryState createRetryState(RetryPolicy policy, MetricRecorder metricRecorder) {
if (policy == null) {
return new RetryStateNullImpl();
} else {
return new RetryStateImpl(policy, metricRecorder);
}
} | [
"public",
"RetryState",
"createRetryState",
"(",
"RetryPolicy",
"policy",
",",
"MetricRecorder",
"metricRecorder",
")",
"{",
"if",
"(",
"policy",
"==",
"null",
")",
"{",
"return",
"new",
"RetryStateNullImpl",
"(",
")",
";",
"}",
"else",
"{",
"return",
"new",
... | Create an object implementing Retry
@param policy the RetryPolicy, may be {@code null}
@return a new RetryState | [
"Create",
"an",
"object",
"implementing",
"Retry"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.faulttolerance.2.0/src/com/ibm/ws/microprofile/faulttolerance20/state/FaultToleranceStateFactory.java#L53-L59 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.microprofile.faulttolerance.2.0/src/com/ibm/ws/microprofile/faulttolerance20/state/FaultToleranceStateFactory.java | FaultToleranceStateFactory.createSyncBulkheadState | public SyncBulkheadState createSyncBulkheadState(BulkheadPolicy policy, MetricRecorder metricRecorder) {
if (policy == null) {
return new SyncBulkheadStateNullImpl();
} else {
return new SyncBulkheadStateImpl(policy, metricRecorder);
}
} | java | public SyncBulkheadState createSyncBulkheadState(BulkheadPolicy policy, MetricRecorder metricRecorder) {
if (policy == null) {
return new SyncBulkheadStateNullImpl();
} else {
return new SyncBulkheadStateImpl(policy, metricRecorder);
}
} | [
"public",
"SyncBulkheadState",
"createSyncBulkheadState",
"(",
"BulkheadPolicy",
"policy",
",",
"MetricRecorder",
"metricRecorder",
")",
"{",
"if",
"(",
"policy",
"==",
"null",
")",
"{",
"return",
"new",
"SyncBulkheadStateNullImpl",
"(",
")",
";",
"}",
"else",
"{"... | Create an object implementing a synchronous Bulkhead
@param policy the BulkheadPolicy, may be {@code null}
@return a new SyncBulkheadState | [
"Create",
"an",
"object",
"implementing",
"a",
"synchronous",
"Bulkhead"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.faulttolerance.2.0/src/com/ibm/ws/microprofile/faulttolerance20/state/FaultToleranceStateFactory.java#L67-L73 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.microprofile.faulttolerance.2.0/src/com/ibm/ws/microprofile/faulttolerance20/state/FaultToleranceStateFactory.java | FaultToleranceStateFactory.createTimeoutState | public TimeoutState createTimeoutState(ScheduledExecutorService executorService, TimeoutPolicy policy, MetricRecorder metricRecorder) {
if (policy == null) {
return new TimeoutStateNullImpl();
} else {
return new TimeoutStateImpl(executorService, policy, metricRecorder);
... | java | public TimeoutState createTimeoutState(ScheduledExecutorService executorService, TimeoutPolicy policy, MetricRecorder metricRecorder) {
if (policy == null) {
return new TimeoutStateNullImpl();
} else {
return new TimeoutStateImpl(executorService, policy, metricRecorder);
... | [
"public",
"TimeoutState",
"createTimeoutState",
"(",
"ScheduledExecutorService",
"executorService",
",",
"TimeoutPolicy",
"policy",
",",
"MetricRecorder",
"metricRecorder",
")",
"{",
"if",
"(",
"policy",
"==",
"null",
")",
"{",
"return",
"new",
"TimeoutStateNullImpl",
... | Create an object implementing Timeout
@param executorService the executor to use to schedule the timeout callback
@param policy the TimeoutPolicy, may be {@code null}
@return a new TimeoutState | [
"Create",
"an",
"object",
"implementing",
"Timeout"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.faulttolerance.2.0/src/com/ibm/ws/microprofile/faulttolerance20/state/FaultToleranceStateFactory.java#L82-L88 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.microprofile.faulttolerance.2.0/src/com/ibm/ws/microprofile/faulttolerance20/state/FaultToleranceStateFactory.java | FaultToleranceStateFactory.createCircuitBreakerState | public CircuitBreakerState createCircuitBreakerState(CircuitBreakerPolicy policy, MetricRecorder metricRecorder) {
if (policy == null) {
return new CircuitBreakerStateNullImpl();
} else {
return new CircuitBreakerStateImpl(policy, metricRecorder);
}
} | java | public CircuitBreakerState createCircuitBreakerState(CircuitBreakerPolicy policy, MetricRecorder metricRecorder) {
if (policy == null) {
return new CircuitBreakerStateNullImpl();
} else {
return new CircuitBreakerStateImpl(policy, metricRecorder);
}
} | [
"public",
"CircuitBreakerState",
"createCircuitBreakerState",
"(",
"CircuitBreakerPolicy",
"policy",
",",
"MetricRecorder",
"metricRecorder",
")",
"{",
"if",
"(",
"policy",
"==",
"null",
")",
"{",
"return",
"new",
"CircuitBreakerStateNullImpl",
"(",
")",
";",
"}",
"... | Create an object implementing CircuitBreaker
@param policy the CircuitBreakerPolicy, may be {@code null}
@return a new CircuitBreakerState | [
"Create",
"an",
"object",
"implementing",
"CircuitBreaker"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.faulttolerance.2.0/src/com/ibm/ws/microprofile/faulttolerance20/state/FaultToleranceStateFactory.java#L96-L102 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/matching/MessageProcessorSearchResults.java | MessageProcessorSearchResults.getResults | public Object[] getResults(String topic)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "getResults", topic);
if (cachedResults != null)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "getResults", cachedResults);
re... | java | public Object[] getResults(String topic)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "getResults", topic);
if (cachedResults != null)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "getResults", cachedResults);
re... | [
"public",
"Object",
"[",
"]",
"getResults",
"(",
"String",
"topic",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"tc",
",",
"\"getResults\"",
",... | postProcessMatches methods of the handlers. | [
"postProcessMatches",
"methods",
"of",
"the",
"handlers",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/matching/MessageProcessorSearchResults.java#L219-L234 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.openidconnect.clients.common/src/com/ibm/ws/security/openidconnect/token/JWT.java | JWT.createPlainTextJWT | protected String createPlainTextJWT() {
com.google.gson.JsonObject header = createHeader();
com.google.gson.JsonObject payload = createPayload();
String plainTextTokenString = computeBaseString(header, payload);
StringBuffer sb = new StringBuffer(plainTextTokenString);
sb.append... | java | protected String createPlainTextJWT() {
com.google.gson.JsonObject header = createHeader();
com.google.gson.JsonObject payload = createPayload();
String plainTextTokenString = computeBaseString(header, payload);
StringBuffer sb = new StringBuffer(plainTextTokenString);
sb.append... | [
"protected",
"String",
"createPlainTextJWT",
"(",
")",
"{",
"com",
".",
"google",
".",
"gson",
".",
"JsonObject",
"header",
"=",
"createHeader",
"(",
")",
";",
"com",
".",
"google",
".",
"gson",
".",
"JsonObject",
"payload",
"=",
"createPayload",
"(",
")",... | Creates the plain text JWT. | [
"Creates",
"the",
"plain",
"text",
"JWT",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.openidconnect.clients.common/src/com/ibm/ws/security/openidconnect/token/JWT.java#L157-L165 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/octracker/ConnectionDataGroup.java | ConnectionDataGroup.findConnectionDataToUse | private ConnectionData findConnectionDataToUse()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "findConnectionDataToUse");
// Look through the the connection data in this group to try and find
// a connection with the lowest use count.
... | java | private ConnectionData findConnectionDataToUse()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "findConnectionDataToUse");
// Look through the the connection data in this group to try and find
// a connection with the lowest use count.
... | [
"private",
"ConnectionData",
"findConnectionDataToUse",
"(",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"this",
",",
"tc",
",",
"\"findConnectionDat... | Helper method, chooses the connection to use for a new conversation.
@return The connection data object relating to a connection to use for multiplexing
a new conversation with. | [
"Helper",
"method",
"chooses",
"the",
"connection",
"to",
"use",
"for",
"a",
"new",
"conversation",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/octracker/ConnectionDataGroup.java#L506-L556 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/octracker/ConnectionDataGroup.java | ConnectionDataGroup.doConnect | private Conversation doConnect(ConversationReceiveListener conversationReceiveListener, ConversationUsageType usageType, JFapAddressHolder jfapAddressHolder,
final NetworkConnectionFactoryHolder ncfHolder) throws JFapConnectFailedException, SIResourceException
{
if (TraceC... | java | private Conversation doConnect(ConversationReceiveListener conversationReceiveListener, ConversationUsageType usageType, JFapAddressHolder jfapAddressHolder,
final NetworkConnectionFactoryHolder ncfHolder) throws JFapConnectFailedException, SIResourceException
{
if (TraceC... | [
"private",
"Conversation",
"doConnect",
"(",
"ConversationReceiveListener",
"conversationReceiveListener",
",",
"ConversationUsageType",
"usageType",
",",
"JFapAddressHolder",
"jfapAddressHolder",
",",
"final",
"NetworkConnectionFactoryHolder",
"ncfHolder",
")",
"throws",
"JFapCo... | Actually do the connecting, creating a new ConnectionData if required
@param conversationReceiveListener The receive listener for the conversation
@param usageType Usage type for the conversation.
@param jfapAddressHolder The holder for jfapAddress over which to connect (if any)
@param ncfHolder The holder from which ... | [
"Actually",
"do",
"the",
"connecting",
"creating",
"a",
"new",
"ConnectionData",
"if",
"required"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/octracker/ConnectionDataGroup.java#L671-L741 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/octracker/ConnectionDataGroup.java | ConnectionDataGroup.connectOverNetwork | private NetworkConnection connectOverNetwork(JFapAddressHolder addressHolder, NetworkConnectionFactoryHolder factoryHolder) throws JFapConnectFailedException, FrameworkException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "connectOverNetwork", new Obj... | java | private NetworkConnection connectOverNetwork(JFapAddressHolder addressHolder, NetworkConnectionFactoryHolder factoryHolder) throws JFapConnectFailedException, FrameworkException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "connectOverNetwork", new Obj... | [
"private",
"NetworkConnection",
"connectOverNetwork",
"(",
"JFapAddressHolder",
"addressHolder",
",",
"NetworkConnectionFactoryHolder",
"factoryHolder",
")",
"throws",
"JFapConnectFailedException",
",",
"FrameworkException",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingE... | Create a new connection over the network
@param addressHolder The holder from which to obtain the jfap address (if any) over which to connect
@param factoryHolder The holder from which to get the a network connection factory (from which the virtual connection can be obtained)
@return NetworkConnection the network conn... | [
"Create",
"a",
"new",
"connection",
"over",
"the",
"network"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/octracker/ConnectionDataGroup.java#L752-L791 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/octracker/ConnectionDataGroup.java | ConnectionDataGroup.createnewConnectionData | private ConnectionData createnewConnectionData(NetworkConnection vc) throws FrameworkException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "createnewConnectionData", vc);
ConnectionData connectionDataToUse;
NetworkConnectionContext co... | java | private ConnectionData createnewConnectionData(NetworkConnection vc) throws FrameworkException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "createnewConnectionData", vc);
ConnectionData connectionDataToUse;
NetworkConnectionContext co... | [
"private",
"ConnectionData",
"createnewConnectionData",
"(",
"NetworkConnection",
"vc",
")",
"throws",
"FrameworkException",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"en... | Create a new Connection data object
@param vc The network connection over which to create a connection data
@return ConnectionData A new connection data object
@throws FrameworkException is thrown if the new connection data cannot be created | [
"Create",
"a",
"new",
"Connection",
"data",
"object"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/octracker/ConnectionDataGroup.java#L800-L824 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/octracker/ConnectionDataGroup.java | ConnectionDataGroup.startNewConversation | private Conversation startNewConversation(ConnectionData connectionDataToUse, ConversationReceiveListener conversationReceiveListener, boolean isNewConnectionData,
boolean handshake) throws SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isE... | java | private Conversation startNewConversation(ConnectionData connectionDataToUse, ConversationReceiveListener conversationReceiveListener, boolean isNewConnectionData,
boolean handshake) throws SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isE... | [
"private",
"Conversation",
"startNewConversation",
"(",
"ConnectionData",
"connectionDataToUse",
",",
"ConversationReceiveListener",
"conversationReceiveListener",
",",
"boolean",
"isNewConnectionData",
",",
"boolean",
"handshake",
")",
"throws",
"SIResourceException",
"{",
"if... | start a new conversation using the specified ConnectionData object
@param connectionDataToUse The connection data on which to start a new conversation
@param conversationReceiveListener The conversation receive listener for the new conversation
@param isNewConnectionData Does the connection data still need to be added... | [
"start",
"a",
"new",
"conversation",
"using",
"the",
"specified",
"ConnectionData",
"object"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/octracker/ConnectionDataGroup.java#L836-L863 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/octracker/ConnectionDataGroup.java | ConnectionDataGroup.connectionPending | protected synchronized void connectionPending()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "connectionPending");
++connectAttemptsPending;
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
SibTr.debug(this, ... | java | protected synchronized void connectionPending()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "connectionPending");
++connectAttemptsPending;
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
SibTr.debug(this, ... | [
"protected",
"synchronized",
"void",
"connectionPending",
"(",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"this",
",",
"tc",
",",
"\"connectionPen... | Marks the group as having been selected to establish a new conversation. This is
used to close a window where the group can be selected, but then get closed before
the connect call is made. | [
"Marks",
"the",
"group",
"as",
"having",
"been",
"selected",
"to",
"establish",
"a",
"new",
"conversation",
".",
"This",
"is",
"used",
"to",
"close",
"a",
"window",
"where",
"the",
"group",
"can",
"be",
"selected",
"but",
"then",
"get",
"closed",
"before",... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/octracker/ConnectionDataGroup.java#L870-L879 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/octracker/ConnectionDataGroup.java | ConnectionDataGroup.close | protected synchronized void close(OutboundConnection connection)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "close", connection);
// Paranoia: Check that this connection believes that it belongs in this group.
if (connection.getConne... | java | protected synchronized void close(OutboundConnection connection)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "close", connection);
// Paranoia: Check that this connection believes that it belongs in this group.
if (connection.getConne... | [
"protected",
"synchronized",
"void",
"close",
"(",
"OutboundConnection",
"connection",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"this",
",",
"tc... | Close a conversation on the specified connection. The connection must be part of this
group. If the connection has no more conversations left using it, then it is added
to the idle pool.
@param connection The connection to close a conversation on. | [
"Close",
"a",
"conversation",
"on",
"the",
"specified",
"connection",
".",
"The",
"connection",
"must",
"be",
"part",
"of",
"this",
"group",
".",
"If",
"the",
"connection",
"has",
"no",
"more",
"conversations",
"left",
"using",
"it",
"then",
"it",
"is",
"a... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/octracker/ConnectionDataGroup.java#L888-L924 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/octracker/ConnectionDataGroup.java | ConnectionDataGroup.isEmpty | protected boolean isEmpty()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "isEmpty");
boolean result;
synchronized (this)
{
synchronized (connectionData)
{
result = connectionData.isEmpty(... | java | protected boolean isEmpty()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "isEmpty");
boolean result;
synchronized (this)
{
synchronized (connectionData)
{
result = connectionData.isEmpty(... | [
"protected",
"boolean",
"isEmpty",
"(",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"this",
",",
"tc",
",",
"\"isEmpty\"",
")",
";",
"boolean",... | Determines if this group is empty.
For the group to be empty, it must contain no connection
data objects, and have no connection attempts pending. This second criteria stops
the group from being discarded between selection for establishing a new conversation
and actually establishing the conversation.
@return True iff... | [
"Determines",
"if",
"this",
"group",
"is",
"empty",
".",
"For",
"the",
"group",
"to",
"be",
"empty",
"it",
"must",
"contain",
"no",
"connection",
"data",
"objects",
"and",
"have",
"no",
"connection",
"attempts",
"pending",
".",
"This",
"second",
"criteria",
... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/octracker/ConnectionDataGroup.java#L945-L964 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/octracker/ConnectionDataGroup.java | ConnectionDataGroup.purgeFromInvalidateImpl | protected void purgeFromInvalidateImpl(OutboundConnection connection, boolean notifyPeer)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "purgeFromInvalidateImpl", new Object[] { connection, Boolean.valueOf(notifyPeer) });
purge(connection, true,... | java | protected void purgeFromInvalidateImpl(OutboundConnection connection, boolean notifyPeer)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "purgeFromInvalidateImpl", new Object[] { connection, Boolean.valueOf(notifyPeer) });
purge(connection, true,... | [
"protected",
"void",
"purgeFromInvalidateImpl",
"(",
"OutboundConnection",
"connection",
",",
"boolean",
"notifyPeer",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"e... | Purge a connection from this group from within invalidate processing.
Purging a connection removes it from the group even if the connection
still has conversations associated with it.
The purged connection is closed and not added to the idle pool.
@param connection The connection to purge
@param notifyPeer Should we n... | [
"Purge",
"a",
"connection",
"from",
"this",
"group",
"from",
"within",
"invalidate",
"processing",
".",
"Purging",
"a",
"connection",
"removes",
"it",
"from",
"the",
"group",
"even",
"if",
"the",
"connection",
"still",
"has",
"conversations",
"associated",
"with... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/octracker/ConnectionDataGroup.java#L1019-L1026 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/octracker/ConnectionDataGroup.java | ConnectionDataGroup.purgeClosedConnection | protected void purgeClosedConnection(OutboundConnection connection)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "purgeClosedConnection", connection);
purge(connection, false, false);
if (TraceComponent.isAnyTracingEnabled() && tc.isEnt... | java | protected void purgeClosedConnection(OutboundConnection connection)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "purgeClosedConnection", connection);
purge(connection, false, false);
if (TraceComponent.isAnyTracingEnabled() && tc.isEnt... | [
"protected",
"void",
"purgeClosedConnection",
"(",
"OutboundConnection",
"connection",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"this",
",",
"tc",... | Purge a connection from this group, because it has already been closed.
The purged connection is not added to the idle pool.
@param connection The connection to purge | [
"Purge",
"a",
"connection",
"from",
"this",
"group",
"because",
"it",
"has",
"already",
"been",
"closed",
".",
"The",
"purged",
"connection",
"is",
"not",
"added",
"to",
"the",
"idle",
"pool",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/octracker/ConnectionDataGroup.java#L1034-L1041 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/octracker/ConnectionDataGroup.java | ConnectionDataGroup.removeConnectionDataFromGroup | public void removeConnectionDataFromGroup(ConnectionData cd) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "removeConnectionDataFromGroup", new Object[] { cd });
boolean removed = false;
synchronized (connectionData)
{
r... | java | public void removeConnectionDataFromGroup(ConnectionData cd) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "removeConnectionDataFromGroup", new Object[] { cd });
boolean removed = false;
synchronized (connectionData)
{
r... | [
"public",
"void",
"removeConnectionDataFromGroup",
"(",
"ConnectionData",
"cd",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"this",
",",
"tc",
",",... | Remove the connection from the group
@param cd | [
"Remove",
"the",
"connection",
"from",
"the",
"group"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/octracker/ConnectionDataGroup.java#L1089-L1101 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapHelper.java | LdapHelper.getDateString | public static String getDateString(Date date) {
SimpleDateFormat sdf = new SimpleDateFormat(sdformatMillisec);
sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
StringBuffer dateBuffer = new StringBuffer(sdf.format(date));
// above string is in this format
// 2005-05-04T09:34:18.4... | java | public static String getDateString(Date date) {
SimpleDateFormat sdf = new SimpleDateFormat(sdformatMillisec);
sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
StringBuffer dateBuffer = new StringBuffer(sdf.format(date));
// above string is in this format
// 2005-05-04T09:34:18.4... | [
"public",
"static",
"String",
"getDateString",
"(",
"Date",
"date",
")",
"{",
"SimpleDateFormat",
"sdf",
"=",
"new",
"SimpleDateFormat",
"(",
"sdformatMillisec",
")",
";",
"sdf",
".",
"setTimeZone",
"(",
"TimeZone",
".",
"getTimeZone",
"(",
"\"GMT\"",
")",
")"... | Returns a date String from the specified Date object. It is expected to be called before passing the date to SDO set method.
For example:
date = new Date();
entity.set("registerDate", SDOHelper.getDateString(date));
Input: 2005-05-04T09:34:18.444-0400
Output: 2005-05-04T09:34:18.444-04:00
@param date The Date object... | [
"Returns",
"a",
"date",
"String",
"from",
"the",
"specified",
"Date",
"object",
".",
"It",
"is",
"expected",
"to",
"be",
"called",
"before",
"passing",
"the",
"date",
"to",
"SDO",
"set",
"method",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapHelper.java#L89-L99 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapHelper.java | LdapHelper.getRDNAttributes | public static String[] getRDNAttributes(String dn) {
String rdnstr = getRDN(dn);
StringTokenizer st = new StringTokenizer(rdnstr.toLowerCase(), "+");
List<String> list = new ArrayList<String>();
while (st.hasMoreTokens()) {
String rdn = st.nextToken();
int index =... | java | public static String[] getRDNAttributes(String dn) {
String rdnstr = getRDN(dn);
StringTokenizer st = new StringTokenizer(rdnstr.toLowerCase(), "+");
List<String> list = new ArrayList<String>();
while (st.hasMoreTokens()) {
String rdn = st.nextToken();
int index =... | [
"public",
"static",
"String",
"[",
"]",
"getRDNAttributes",
"(",
"String",
"dn",
")",
"{",
"String",
"rdnstr",
"=",
"getRDN",
"(",
"dn",
")",
";",
"StringTokenizer",
"st",
"=",
"new",
"StringTokenizer",
"(",
"rdnstr",
".",
"toLowerCase",
"(",
")",
",",
"... | Return an array of RDN attributes of the given DN in lower case form.
@param dn
@return | [
"Return",
"an",
"array",
"of",
"RDN",
"attributes",
"of",
"the",
"given",
"DN",
"in",
"lower",
"case",
"form",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapHelper.java#L246-L258 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapHelper.java | LdapHelper.getRDN | public static String getRDN(String DN) {
if (DN == null || DN.trim().length() == 0) {
return DN;
}
String RDN = null;
try {
LdapName name = new LdapName(DN);
if (name.size() == 0) {
return DN;
}
RDN = name.get(na... | java | public static String getRDN(String DN) {
if (DN == null || DN.trim().length() == 0) {
return DN;
}
String RDN = null;
try {
LdapName name = new LdapName(DN);
if (name.size() == 0) {
return DN;
}
RDN = name.get(na... | [
"public",
"static",
"String",
"getRDN",
"(",
"String",
"DN",
")",
"{",
"if",
"(",
"DN",
"==",
"null",
"||",
"DN",
".",
"trim",
"(",
")",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"return",
"DN",
";",
"}",
"String",
"RDN",
"=",
"null",
";",
... | Gets the RDN from the specified DN
For example "uid=persona" will be returned for given "uid=persona,cn=users,dc=yourco,dc=com".
@param DN The DN
@return The RDN | [
"Gets",
"the",
"RDN",
"from",
"the",
"specified",
"DN",
"For",
"example",
"uid",
"=",
"persona",
"will",
"be",
"returned",
"for",
"given",
"uid",
"=",
"persona",
"cn",
"=",
"users",
"dc",
"=",
"yourco",
"dc",
"=",
"com",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapHelper.java#L267-L292 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapHelper.java | LdapHelper.getLdapURLs | static public LdapURL[] getLdapURLs(Attribute attr) throws WIMException {
final String METHODNAME = "getLdapURLs";
LdapURL[] ldapURLs = new LdapURL[0];
if (attr != null) {
List<LdapURL> ldapURLList = new ArrayList<LdapURL>(attr.size());
try {
for (NamingE... | java | static public LdapURL[] getLdapURLs(Attribute attr) throws WIMException {
final String METHODNAME = "getLdapURLs";
LdapURL[] ldapURLs = new LdapURL[0];
if (attr != null) {
List<LdapURL> ldapURLList = new ArrayList<LdapURL>(attr.size());
try {
for (NamingE... | [
"static",
"public",
"LdapURL",
"[",
"]",
"getLdapURLs",
"(",
"Attribute",
"attr",
")",
"throws",
"WIMException",
"{",
"final",
"String",
"METHODNAME",
"=",
"\"getLdapURLs\"",
";",
"LdapURL",
"[",
"]",
"ldapURLs",
"=",
"new",
"LdapURL",
"[",
"0",
"]",
";",
... | Gets the LdapURL array from the given dynamic member attribute.
@param attr The dynamic member attribute.
@return The LdapURL array.
@throws WIMException | [
"Gets",
"the",
"LdapURL",
"array",
"from",
"the",
"given",
"dynamic",
"member",
"attribute",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapHelper.java#L421-L447 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapHelper.java | LdapHelper.getUniqueKey | public static String getUniqueKey(X509Certificate cert) {
// TBD - Would like to use public key instead of subject name, but
// cert.getPublicKey().getEncoded() appears to return different
// values for each call, using the same certificate??
StringBuffer key = new StringBuffer("subjectD... | java | public static String getUniqueKey(X509Certificate cert) {
// TBD - Would like to use public key instead of subject name, but
// cert.getPublicKey().getEncoded() appears to return different
// values for each call, using the same certificate??
StringBuffer key = new StringBuffer("subjectD... | [
"public",
"static",
"String",
"getUniqueKey",
"(",
"X509Certificate",
"cert",
")",
"{",
"// TBD - Would like to use public key instead of subject name, but",
"// cert.getPublicKey().getEncoded() appears to return different",
"// values for each call, using the same certificate??",
"StringBuf... | Get a unique key for a certificate. | [
"Get",
"a",
"unique",
"key",
"for",
"a",
"certificate",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapHelper.java#L553-L562 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapHelper.java | LdapHelper.getDNSubField | static String getDNSubField(String varName, String DN) throws CertificateMapperException {
if (varName.equals("DN")) {
return DN; // return the whole DN
}
// Parse the DN looking for 'varName'
StringTokenizer st = new StringTokenizer(DN);
for (;;) {
String... | java | static String getDNSubField(String varName, String DN) throws CertificateMapperException {
if (varName.equals("DN")) {
return DN; // return the whole DN
}
// Parse the DN looking for 'varName'
StringTokenizer st = new StringTokenizer(DN);
for (;;) {
String... | [
"static",
"String",
"getDNSubField",
"(",
"String",
"varName",
",",
"String",
"DN",
")",
"throws",
"CertificateMapperException",
"{",
"if",
"(",
"varName",
".",
"equals",
"(",
"\"DN\"",
")",
")",
"{",
"return",
"DN",
";",
"// return the whole DN",
"}",
"// Par... | Given 'input', return the digest version. | [
"Given",
"input",
"return",
"the",
"digest",
"version",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapHelper.java#L567-L594 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapHelper.java | LdapHelper.getMembershipScope | public static short getMembershipScope(String scope) {
if (scope != null) {
scope = scope.trim();
if (LdapConstants.LDAP_DIRECT_GROUP_MEMBERSHIP_STRING.equalsIgnoreCase(scope)) {
return LdapConstants.LDAP_DIRECT_GROUP_MEMBERSHIP;
} else if (LdapConstants.LDAP_... | java | public static short getMembershipScope(String scope) {
if (scope != null) {
scope = scope.trim();
if (LdapConstants.LDAP_DIRECT_GROUP_MEMBERSHIP_STRING.equalsIgnoreCase(scope)) {
return LdapConstants.LDAP_DIRECT_GROUP_MEMBERSHIP;
} else if (LdapConstants.LDAP_... | [
"public",
"static",
"short",
"getMembershipScope",
"(",
"String",
"scope",
")",
"{",
"if",
"(",
"scope",
"!=",
"null",
")",
"{",
"scope",
"=",
"scope",
".",
"trim",
"(",
")",
";",
"if",
"(",
"LdapConstants",
".",
"LDAP_DIRECT_GROUP_MEMBERSHIP_STRING",
".",
... | Gets the short form the scope from the string form of the scope
@param scope A string represent a scope ('direct', 'nested' and 'all').
@return The short represent a scope (0, 1, 2) | [
"Gets",
"the",
"short",
"form",
"the",
"scope",
"from",
"the",
"string",
"form",
"of",
"the",
"scope"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapHelper.java#L844-L859 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapHelper.java | LdapHelper.inAttributes | public static boolean inAttributes(String attrName, Attributes attrs) {
for (NamingEnumeration<String> neu = attrs.getIDs(); neu.hasMoreElements();) {
String attrId = neu.nextElement();
if (attrId.equalsIgnoreCase(attrName)) {
return true;
}
}
... | java | public static boolean inAttributes(String attrName, Attributes attrs) {
for (NamingEnumeration<String> neu = attrs.getIDs(); neu.hasMoreElements();) {
String attrId = neu.nextElement();
if (attrId.equalsIgnoreCase(attrName)) {
return true;
}
}
... | [
"public",
"static",
"boolean",
"inAttributes",
"(",
"String",
"attrName",
",",
"Attributes",
"attrs",
")",
"{",
"for",
"(",
"NamingEnumeration",
"<",
"String",
">",
"neu",
"=",
"attrs",
".",
"getIDs",
"(",
")",
";",
"neu",
".",
"hasMoreElements",
"(",
")",... | Whether the specified attribute name is contained in the attributes.
@param attrName The name of the attribute
@param attrs The Attributes object
@return true if the Attributes contain the attribute name (case-insensitive); false otherwise | [
"Whether",
"the",
"specified",
"attribute",
"name",
"is",
"contained",
"in",
"the",
"attributes",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapHelper.java#L880-L888 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapHelper.java | LdapHelper.cloneAttribute | public static Attribute cloneAttribute(String newAttrName, Attribute attr) throws WIMSystemException {
Attribute newAttr = new BasicAttribute(newAttrName);
try {
for (NamingEnumeration<?> neu = attr.getAll(); neu.hasMoreElements();) {
newAttr.add(neu.nextElement());
... | java | public static Attribute cloneAttribute(String newAttrName, Attribute attr) throws WIMSystemException {
Attribute newAttr = new BasicAttribute(newAttrName);
try {
for (NamingEnumeration<?> neu = attr.getAll(); neu.hasMoreElements();) {
newAttr.add(neu.nextElement());
... | [
"public",
"static",
"Attribute",
"cloneAttribute",
"(",
"String",
"newAttrName",
",",
"Attribute",
"attr",
")",
"throws",
"WIMSystemException",
"{",
"Attribute",
"newAttr",
"=",
"new",
"BasicAttribute",
"(",
"newAttrName",
")",
";",
"try",
"{",
"for",
"(",
"Nami... | Clone the specified attribute with a new name.
@param newAttrName The new name of the attribute
@param attr The Attribute object to be cloned.
@return The cloned Attribute object with the new name.
@throws WIMSystemException | [
"Clone",
"the",
"specified",
"attribute",
"with",
"a",
"new",
"name",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapHelper.java#L898-L908 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapHelper.java | LdapHelper.convertToDashedString | public static String convertToDashedString(byte[] objectGUID) {
StringBuilder displayStr = new StringBuilder();
displayStr.append(prefixZeros(objectGUID[3] & 0xFF));
displayStr.append(prefixZeros(objectGUID[2] & 0xFF));
displayStr.append(prefixZeros(objectGUID[1] & 0xFF));
displ... | java | public static String convertToDashedString(byte[] objectGUID) {
StringBuilder displayStr = new StringBuilder();
displayStr.append(prefixZeros(objectGUID[3] & 0xFF));
displayStr.append(prefixZeros(objectGUID[2] & 0xFF));
displayStr.append(prefixZeros(objectGUID[1] & 0xFF));
displ... | [
"public",
"static",
"String",
"convertToDashedString",
"(",
"byte",
"[",
"]",
"objectGUID",
")",
"{",
"StringBuilder",
"displayStr",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"displayStr",
".",
"append",
"(",
"prefixZeros",
"(",
"objectGUID",
"[",
"3",
"]",
... | Convert the byte array to Active Directory GUID format.
@return | [
"Convert",
"the",
"byte",
"array",
"to",
"Active",
"Directory",
"GUID",
"format",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapHelper.java#L915-L940 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.repository/src/com/ibm/ws/repository/transport/client/DataModelSerializer.java | DataModelSerializer.serializeAsJson | public static JsonValue serializeAsJson(Object o) throws IOException {
try {
return findFieldsToSerialize(o).mainObject;
} catch (IllegalStateException ise) {
// the reflective attempt to build the object failed.
throw new IOException("Unable to build JSON for Object"... | java | public static JsonValue serializeAsJson(Object o) throws IOException {
try {
return findFieldsToSerialize(o).mainObject;
} catch (IllegalStateException ise) {
// the reflective attempt to build the object failed.
throw new IOException("Unable to build JSON for Object"... | [
"public",
"static",
"JsonValue",
"serializeAsJson",
"(",
"Object",
"o",
")",
"throws",
"IOException",
"{",
"try",
"{",
"return",
"findFieldsToSerialize",
"(",
"o",
")",
".",
"mainObject",
";",
"}",
"catch",
"(",
"IllegalStateException",
"ise",
")",
"{",
"// th... | Convert a POJO into a serialized JsonValue object
@param o the POJO to serialize
@return | [
"Convert",
"a",
"POJO",
"into",
"a",
"serialized",
"JsonValue",
"object"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.repository/src/com/ibm/ws/repository/transport/client/DataModelSerializer.java#L349-L358 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.repository/src/com/ibm/ws/repository/transport/client/DataModelSerializer.java | DataModelSerializer.getClassForFieldName | private static ClassAndMethod getClassForFieldName(String fieldName, Class<?> classToLookForFieldIn) {
return internalGetClassForFieldName(fieldName, classToLookForFieldIn, false);
} | java | private static ClassAndMethod getClassForFieldName(String fieldName, Class<?> classToLookForFieldIn) {
return internalGetClassForFieldName(fieldName, classToLookForFieldIn, false);
} | [
"private",
"static",
"ClassAndMethod",
"getClassForFieldName",
"(",
"String",
"fieldName",
",",
"Class",
"<",
"?",
">",
"classToLookForFieldIn",
")",
"{",
"return",
"internalGetClassForFieldName",
"(",
"fieldName",
",",
"classToLookForFieldIn",
",",
"false",
")",
";",... | Gets a class for a JSON field name, by looking in a given Class for an appropriate setter.
The setter is assumed not to be a Collection.
@param fieldName the name to use to search for the getter.
@param classToLookForFieldIn the Class to search for the getter within.
@return instance of ClassAndMethod if one is found,... | [
"Gets",
"a",
"class",
"for",
"a",
"JSON",
"field",
"name",
"by",
"looking",
"in",
"a",
"given",
"Class",
"for",
"an",
"appropriate",
"setter",
".",
"The",
"setter",
"is",
"assumed",
"not",
"to",
"be",
"a",
"Collection",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.repository/src/com/ibm/ws/repository/transport/client/DataModelSerializer.java#L395-L397 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.repository/src/com/ibm/ws/repository/transport/client/DataModelSerializer.java | DataModelSerializer.getClassForCollectionOfFieldName | private static ClassAndMethod getClassForCollectionOfFieldName(String fieldName, Class<?> classToLookForFieldIn) {
return internalGetClassForFieldName(fieldName, classToLookForFieldIn, true);
} | java | private static ClassAndMethod getClassForCollectionOfFieldName(String fieldName, Class<?> classToLookForFieldIn) {
return internalGetClassForFieldName(fieldName, classToLookForFieldIn, true);
} | [
"private",
"static",
"ClassAndMethod",
"getClassForCollectionOfFieldName",
"(",
"String",
"fieldName",
",",
"Class",
"<",
"?",
">",
"classToLookForFieldIn",
")",
"{",
"return",
"internalGetClassForFieldName",
"(",
"fieldName",
",",
"classToLookForFieldIn",
",",
"true",
... | Gets a class for a JSON field name, by looking in a given Class for an appropriate setter.
The setter is assumed to be a Collection.
@param fieldName the name to use to search for the getter.
@param classToLookForFieldIn the Class to search for the getter within.
@return instance of ClassAndMethod if one is found, nul... | [
"Gets",
"a",
"class",
"for",
"a",
"JSON",
"field",
"name",
"by",
"looking",
"in",
"a",
"given",
"Class",
"for",
"an",
"appropriate",
"setter",
".",
"The",
"setter",
"is",
"assumed",
"to",
"be",
"a",
"Collection",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.repository/src/com/ibm/ws/repository/transport/client/DataModelSerializer.java#L407-L409 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.repository/src/com/ibm/ws/repository/transport/client/DataModelSerializer.java | DataModelSerializer.internalGetClassForFieldName | private static ClassAndMethod internalGetClassForFieldName(String fieldName, Class<?> classToLookForFieldIn, boolean isForArray) {
Method found = null;
//precalc the field name as a setter to use for each method test.
String fieldNameAsASetter = new StringBuilder("set").append(fieldName.substri... | java | private static ClassAndMethod internalGetClassForFieldName(String fieldName, Class<?> classToLookForFieldIn, boolean isForArray) {
Method found = null;
//precalc the field name as a setter to use for each method test.
String fieldNameAsASetter = new StringBuilder("set").append(fieldName.substri... | [
"private",
"static",
"ClassAndMethod",
"internalGetClassForFieldName",
"(",
"String",
"fieldName",
",",
"Class",
"<",
"?",
">",
"classToLookForFieldIn",
",",
"boolean",
"isForArray",
")",
"{",
"Method",
"found",
"=",
"null",
";",
"//precalc the field name as a setter to... | Utility method, given a JSON field name, and an associated POJO, it will hunt for the appropriate setter to use, and if located return
the type the setter expects, along with a reflected reference to the method itself.
@param fieldName the name of the json key being queried.
@param classToLookForFieldIn the object to ... | [
"Utility",
"method",
"given",
"a",
"JSON",
"field",
"name",
"and",
"an",
"associated",
"POJO",
"it",
"will",
"hunt",
"for",
"the",
"appropriate",
"setter",
"to",
"use",
"and",
"if",
"located",
"return",
"the",
"type",
"the",
"setter",
"expects",
"along",
"... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.repository/src/com/ibm/ws/repository/transport/client/DataModelSerializer.java#L420-L456 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.kernel.security.thread/src/com/ibm/ws/kernel/security/thread/ThreadIdentityManager.java | ThreadIdentityManager.addThreadIdentityService | public static void addThreadIdentityService(ThreadIdentityService tis) {
if (tis != null) {
threadIdentityServices.add(tis);
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "A ThreadIdentityService implementation was added.", tis.getClass()... | java | public static void addThreadIdentityService(ThreadIdentityService tis) {
if (tis != null) {
threadIdentityServices.add(tis);
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "A ThreadIdentityService implementation was added.", tis.getClass()... | [
"public",
"static",
"void",
"addThreadIdentityService",
"(",
"ThreadIdentityService",
"tis",
")",
"{",
"if",
"(",
"tis",
"!=",
"null",
")",
"{",
"threadIdentityServices",
".",
"add",
"(",
"tis",
")",
";",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
... | Add a ThreadIdentityService reference. This method is called by
ThreadIdentityManagerConfigurator when a ThreadIdentityService shows
up in the OSGI framework.
@param tis | [
"Add",
"a",
"ThreadIdentityService",
"reference",
".",
"This",
"method",
"is",
"called",
"by",
"ThreadIdentityManagerConfigurator",
"when",
"a",
"ThreadIdentityService",
"shows",
"up",
"in",
"the",
"OSGI",
"framework",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.security.thread/src/com/ibm/ws/kernel/security/thread/ThreadIdentityManager.java#L57-L64 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.kernel.security.thread/src/com/ibm/ws/kernel/security/thread/ThreadIdentityManager.java | ThreadIdentityManager.addJ2CIdentityService | public static void addJ2CIdentityService(J2CIdentityService j2cIdentityService) {
if (j2cIdentityService != null) {
j2cIdentityServices.add(j2cIdentityService);
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "A J2CIdentityService implement... | java | public static void addJ2CIdentityService(J2CIdentityService j2cIdentityService) {
if (j2cIdentityService != null) {
j2cIdentityServices.add(j2cIdentityService);
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "A J2CIdentityService implement... | [
"public",
"static",
"void",
"addJ2CIdentityService",
"(",
"J2CIdentityService",
"j2cIdentityService",
")",
"{",
"if",
"(",
"j2cIdentityService",
"!=",
"null",
")",
"{",
"j2cIdentityServices",
".",
"add",
"(",
"j2cIdentityService",
")",
";",
"if",
"(",
"TraceComponen... | Add a J2CIdentityService reference. This method is called by
ThreadIdentityManagerConfigurator when a J2CIdentityService shows
up in the OSGI framework.
@param j2cIdentityService | [
"Add",
"a",
"J2CIdentityService",
"reference",
".",
"This",
"method",
"is",
"called",
"by",
"ThreadIdentityManagerConfigurator",
"when",
"a",
"J2CIdentityService",
"shows",
"up",
"in",
"the",
"OSGI",
"framework",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.security.thread/src/com/ibm/ws/kernel/security/thread/ThreadIdentityManager.java#L73-L80 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.kernel.security.thread/src/com/ibm/ws/kernel/security/thread/ThreadIdentityManager.java | ThreadIdentityManager.removeThreadIdentityService | public static void removeThreadIdentityService(ThreadIdentityService tis) {
if (tis != null) {
threadIdentityServices.remove(tis);
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "A ThreadIdentityService implementation was removed.", tis.ge... | java | public static void removeThreadIdentityService(ThreadIdentityService tis) {
if (tis != null) {
threadIdentityServices.remove(tis);
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "A ThreadIdentityService implementation was removed.", tis.ge... | [
"public",
"static",
"void",
"removeThreadIdentityService",
"(",
"ThreadIdentityService",
"tis",
")",
"{",
"if",
"(",
"tis",
"!=",
"null",
")",
"{",
"threadIdentityServices",
".",
"remove",
"(",
"tis",
")",
";",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnab... | Remove a ThreadIdentityService reference. This method is called by
ThreadIdentityManagerConfigurator when a ThreadIdentityService leaves
the OSGI framework.
@param tis | [
"Remove",
"a",
"ThreadIdentityService",
"reference",
".",
"This",
"method",
"is",
"called",
"by",
"ThreadIdentityManagerConfigurator",
"when",
"a",
"ThreadIdentityService",
"leaves",
"the",
"OSGI",
"framework",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.security.thread/src/com/ibm/ws/kernel/security/thread/ThreadIdentityManager.java#L89-L96 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.kernel.security.thread/src/com/ibm/ws/kernel/security/thread/ThreadIdentityManager.java | ThreadIdentityManager.removeJ2CIdentityService | public static void removeJ2CIdentityService(J2CIdentityService j2cIdentityService) {
if (j2cIdentityService != null) {
j2cIdentityServices.remove(j2cIdentityService);
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "A J2CIdentityService imp... | java | public static void removeJ2CIdentityService(J2CIdentityService j2cIdentityService) {
if (j2cIdentityService != null) {
j2cIdentityServices.remove(j2cIdentityService);
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "A J2CIdentityService imp... | [
"public",
"static",
"void",
"removeJ2CIdentityService",
"(",
"J2CIdentityService",
"j2cIdentityService",
")",
"{",
"if",
"(",
"j2cIdentityService",
"!=",
"null",
")",
"{",
"j2cIdentityServices",
".",
"remove",
"(",
"j2cIdentityService",
")",
";",
"if",
"(",
"TraceCo... | Remove a J2CIdentityService reference. This method is called by
ThreadIdentityManagerConfigurator when a J2CIdentityService leaves
the OSGI framework.
@param j2cIdentityService | [
"Remove",
"a",
"J2CIdentityService",
"reference",
".",
"This",
"method",
"is",
"called",
"by",
"ThreadIdentityManagerConfigurator",
"when",
"a",
"J2CIdentityService",
"leaves",
"the",
"OSGI",
"framework",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.security.thread/src/com/ibm/ws/kernel/security/thread/ThreadIdentityManager.java#L105-L112 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.kernel.security.thread/src/com/ibm/ws/kernel/security/thread/ThreadIdentityManager.java | ThreadIdentityManager.removeAllThreadIdentityServices | public static void removeAllThreadIdentityServices() {
threadIdentityServices.clear();
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "All the ThreadIdentityService implementations were removed.");
}
} | java | public static void removeAllThreadIdentityServices() {
threadIdentityServices.clear();
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "All the ThreadIdentityService implementations were removed.");
}
} | [
"public",
"static",
"void",
"removeAllThreadIdentityServices",
"(",
")",
"{",
"threadIdentityServices",
".",
"clear",
"(",
")",
";",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"Tr",... | Remove all the ThreadIdentityService references. This method is called by
ThreadIdentityManagerConfigurator when the ThreadIdentityService service tracker is closed. | [
"Remove",
"all",
"the",
"ThreadIdentityService",
"references",
".",
"This",
"method",
"is",
"called",
"by",
"ThreadIdentityManagerConfigurator",
"when",
"the",
"ThreadIdentityService",
"service",
"tracker",
"is",
"closed",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.security.thread/src/com/ibm/ws/kernel/security/thread/ThreadIdentityManager.java#L118-L123 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.kernel.security.thread/src/com/ibm/ws/kernel/security/thread/ThreadIdentityManager.java | ThreadIdentityManager.removeAllJ2CIdentityServices | public static void removeAllJ2CIdentityServices() {
j2cIdentityServices.clear();
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "All the J2CIdentityService implementations were removed.");
}
} | java | public static void removeAllJ2CIdentityServices() {
j2cIdentityServices.clear();
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "All the J2CIdentityService implementations were removed.");
}
} | [
"public",
"static",
"void",
"removeAllJ2CIdentityServices",
"(",
")",
"{",
"j2cIdentityServices",
".",
"clear",
"(",
")",
";",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"Tr",
"."... | Remove all the J2CIdentityService references. This method is called by
ThreadIdentityManagerConfigurator when the J2CIdentityService service tracker is closed. | [
"Remove",
"all",
"the",
"J2CIdentityService",
"references",
".",
"This",
"method",
"is",
"called",
"by",
"ThreadIdentityManagerConfigurator",
"when",
"the",
"J2CIdentityService",
"service",
"tracker",
"is",
"closed",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.security.thread/src/com/ibm/ws/kernel/security/thread/ThreadIdentityManager.java#L129-L134 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.kernel.security.thread/src/com/ibm/ws/kernel/security/thread/ThreadIdentityManager.java | ThreadIdentityManager.checkForRecursionAndSet | private static boolean checkForRecursionAndSet() {
if (recursionMarker.get() == null) {
recursionMarker.set(Boolean.TRUE);
return false;
} else {
return true; // recursion detected.
}
} | java | private static boolean checkForRecursionAndSet() {
if (recursionMarker.get() == null) {
recursionMarker.set(Boolean.TRUE);
return false;
} else {
return true; // recursion detected.
}
} | [
"private",
"static",
"boolean",
"checkForRecursionAndSet",
"(",
")",
"{",
"if",
"(",
"recursionMarker",
".",
"get",
"(",
")",
"==",
"null",
")",
"{",
"recursionMarker",
".",
"set",
"(",
"Boolean",
".",
"TRUE",
")",
";",
"return",
"false",
";",
"}",
"else... | Check for recursion.
As a rule, ThreadIdentityManager should NEVER be re-entered. However, it can
be called from the Tr code (during log rollover, for example), so if the
ThreadIdentityService issues another Tr (or if ANY code called by ThreadIdentityService
issues a Tr), it will likely cause infinite recursion.
If w... | [
"Check",
"for",
"recursion",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.security.thread/src/com/ibm/ws/kernel/security/thread/ThreadIdentityManager.java#L282-L289 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.kernel.security.thread/src/com/ibm/ws/kernel/security/thread/ThreadIdentityManager.java | ThreadIdentityManager.runAsServer | public static Object runAsServer() {
LinkedHashMap<ThreadIdentityService, Object> token = null;
if (!checkForRecursionAndSet()) {
try {
for (int i = 0, size = threadIdentityServices.size(); i < size; ++i) {
ThreadIdentityService tis = threadIdentityServic... | java | public static Object runAsServer() {
LinkedHashMap<ThreadIdentityService, Object> token = null;
if (!checkForRecursionAndSet()) {
try {
for (int i = 0, size = threadIdentityServices.size(); i < size; ++i) {
ThreadIdentityService tis = threadIdentityServic... | [
"public",
"static",
"Object",
"runAsServer",
"(",
")",
"{",
"LinkedHashMap",
"<",
"ThreadIdentityService",
",",
"Object",
">",
"token",
"=",
"null",
";",
"if",
"(",
"!",
"checkForRecursionAndSet",
"(",
")",
")",
"{",
"try",
"{",
"for",
"(",
"int",
"i",
"... | Set the server's identity as the thread identity.
@return A token representing the identity previously on the thread.
This token must be passed to the subsequent reset call. | [
"Set",
"the",
"server",
"s",
"identity",
"as",
"the",
"thread",
"identity",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.security.thread/src/com/ibm/ws/kernel/security/thread/ThreadIdentityManager.java#L304-L323 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.kernel.security.thread/src/com/ibm/ws/kernel/security/thread/ThreadIdentityManager.java | ThreadIdentityManager.resetCheckedInternal | @SuppressWarnings({ "rawtypes" })
private static void resetCheckedInternal(Object token, Exception firstException) throws ThreadIdentityException {
Exception cachedException = firstException;
if (threadIdentityServices.isEmpty() == false || j2cIdentityServices.isEmpty() == false) {
if (!... | java | @SuppressWarnings({ "rawtypes" })
private static void resetCheckedInternal(Object token, Exception firstException) throws ThreadIdentityException {
Exception cachedException = firstException;
if (threadIdentityServices.isEmpty() == false || j2cIdentityServices.isEmpty() == false) {
if (!... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"rawtypes\"",
"}",
")",
"private",
"static",
"void",
"resetCheckedInternal",
"(",
"Object",
"token",
",",
"Exception",
"firstException",
")",
"throws",
"ThreadIdentityException",
"{",
"Exception",
"cachedException",
"=",
"firstExce... | Reset the identity on the thread.
@param token The token returned by a previous call to set the thread identity.
The token represents the previous identity on the thread.
@param firstException This is the first exception that may have been thrown by set()
@throws ThreadIdentityException | [
"Reset",
"the",
"identity",
"on",
"the",
"thread",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.security.thread/src/com/ibm/ws/kernel/security/thread/ThreadIdentityManager.java#L344-L386 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.kernel.security.thread/src/com/ibm/ws/kernel/security/thread/ThreadIdentityManager.java | ThreadIdentityManager.getJ2CInvocationSubject | public static Subject getJ2CInvocationSubject() {
Subject j2cSubject = null;
for (J2CIdentityService j2cIdentityService : j2cIdentityServices) {
if (j2cIdentityService.isJ2CThreadIdentityEnabled()) {
Subject subject = j2cIdentityService.getJ2CInvocationSubject();
... | java | public static Subject getJ2CInvocationSubject() {
Subject j2cSubject = null;
for (J2CIdentityService j2cIdentityService : j2cIdentityServices) {
if (j2cIdentityService.isJ2CThreadIdentityEnabled()) {
Subject subject = j2cIdentityService.getJ2CInvocationSubject();
... | [
"public",
"static",
"Subject",
"getJ2CInvocationSubject",
"(",
")",
"{",
"Subject",
"j2cSubject",
"=",
"null",
";",
"for",
"(",
"J2CIdentityService",
"j2cIdentityService",
":",
"j2cIdentityServices",
")",
"{",
"if",
"(",
"j2cIdentityService",
".",
"isJ2CThreadIdentity... | Get a J2C subject based on the invocation subject.
Use first subject that is not null. | [
"Get",
"a",
"J2C",
"subject",
"based",
"on",
"the",
"invocation",
"subject",
".",
"Use",
"first",
"subject",
"that",
"is",
"not",
"null",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.security.thread/src/com/ibm/ws/kernel/security/thread/ThreadIdentityManager.java#L392-L404 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.authentication.builtin/src/com/ibm/ws/security/authentication/internal/jaas/JAASConfigurationImpl.java | JAASConfigurationImpl.getEntries | @Override
public Map<String, List<AppConfigurationEntry>> getEntries() {
Map<String, List<AppConfigurationEntry>> jaasConfigurationEntries = new HashMap<String, List<AppConfigurationEntry>>();
Map<String, String> jaasConfigIDs = new HashMap<String, String>();
if (jaasLoginContextEntries != ... | java | @Override
public Map<String, List<AppConfigurationEntry>> getEntries() {
Map<String, List<AppConfigurationEntry>> jaasConfigurationEntries = new HashMap<String, List<AppConfigurationEntry>>();
Map<String, String> jaasConfigIDs = new HashMap<String, String>();
if (jaasLoginContextEntries != ... | [
"@",
"Override",
"public",
"Map",
"<",
"String",
",",
"List",
"<",
"AppConfigurationEntry",
">",
">",
"getEntries",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"List",
"<",
"AppConfigurationEntry",
">",
">",
"jaasConfigurationEntries",
"=",
"new",
"HashMap",
"... | Get all jaasLoginContextEntry in the server.xml and create any missing default entries.
If there are no jaas configuration, then create all the default entries system.DEFAULT,
system.WEB_INBOUND, system.DESERIALIZE_CONTEXT, system.UNAUTHENTICATED and WSLogin
@return | [
"Get",
"all",
"jaasLoginContextEntry",
"in",
"the",
"server",
".",
"xml",
"and",
"create",
"any",
"missing",
"default",
"entries",
".",
"If",
"there",
"are",
"no",
"jaas",
"configuration",
"then",
"create",
"all",
"the",
"default",
"entries",
"system",
".",
... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.authentication.builtin/src/com/ibm/ws/security/authentication/internal/jaas/JAASConfigurationImpl.java#L76-L113 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.kernel.boot.nested/src/com/ibm/ws/kernel/launch/internal/TraceInstrumentation.java | TraceInstrumentation.invoke | @Override
@Trivial
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
if ("addTransformer".equals(method.getName())) {
addTransformer((ClassFileTransformer) args[0], args.length > 1 ? (Boolean) args[1] : false);
return null;
}
if (... | java | @Override
@Trivial
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
if ("addTransformer".equals(method.getName())) {
addTransformer((ClassFileTransformer) args[0], args.length > 1 ? (Boolean) args[1] : false);
return null;
}
if (... | [
"@",
"Override",
"@",
"Trivial",
"public",
"Object",
"invoke",
"(",
"Object",
"proxy",
",",
"Method",
"method",
",",
"Object",
"[",
"]",
"args",
")",
"throws",
"Throwable",
"{",
"if",
"(",
"\"addTransformer\"",
".",
"equals",
"(",
"method",
".",
"getName",... | If this method is traced it can call proxy.toString which causes another invoke call leading to an infinite loop. | [
"If",
"this",
"method",
"is",
"traced",
"it",
"can",
"call",
"proxy",
".",
"toString",
"which",
"causes",
"another",
"invoke",
"call",
"leading",
"to",
"an",
"infinite",
"loop",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.boot.nested/src/com/ibm/ws/kernel/launch/internal/TraceInstrumentation.java#L53-L90 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.jca.inbound.security/src/com/ibm/ws/jca/security/internal/J2CSecurityHelper.java | J2CSecurityHelper.addSubjectCustomData | public static void addSubjectCustomData(Subject callSubject, Hashtable<String, Object> newCred) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
Tr.entry(tc, "addSubjectCustomData", newCred);
}
AddPrivateCredentials action = new AddPrivateCredentials(callSubject, ... | java | public static void addSubjectCustomData(Subject callSubject, Hashtable<String, Object> newCred) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
Tr.entry(tc, "addSubjectCustomData", newCred);
}
AddPrivateCredentials action = new AddPrivateCredentials(callSubject, ... | [
"public",
"static",
"void",
"addSubjectCustomData",
"(",
"Subject",
"callSubject",
",",
"Hashtable",
"<",
"String",
",",
"Object",
">",
"newCred",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"... | This method adds the custom Hashtable provided to the private credentials of the
Subject passed in.
@param callSubject The Subject which should have its private credentials updated with the custom Hashtable
@param newCred The custom Hashtable with information in the format required for WebSphere
to do a Hashtable logi... | [
"This",
"method",
"adds",
"the",
"custom",
"Hashtable",
"provided",
"to",
"the",
"private",
"credentials",
"of",
"the",
"Subject",
"passed",
"in",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.inbound.security/src/com/ibm/ws/jca/security/internal/J2CSecurityHelper.java#L161-L170 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.jca.inbound.security/src/com/ibm/ws/jca/security/internal/J2CSecurityHelper.java | J2CSecurityHelper.getCustomCredentials | public static Hashtable<String, Object> getCustomCredentials(Subject callSubject, String cacheKey) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
Tr.entry(tc, "getCustomCredentials", cacheKey);
}
if (callSubject == null || cacheKey == null) {
if (Tra... | java | public static Hashtable<String, Object> getCustomCredentials(Subject callSubject, String cacheKey) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
Tr.entry(tc, "getCustomCredentials", cacheKey);
}
if (callSubject == null || cacheKey == null) {
if (Tra... | [
"public",
"static",
"Hashtable",
"<",
"String",
",",
"Object",
">",
"getCustomCredentials",
"(",
"Subject",
"callSubject",
",",
"String",
"cacheKey",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
... | This method extracts the custom hashtable from the provided Subject using the
cacheKey.
@param callSubject The Subject which is checked for the custom hashtable
@param cacheKey The cache key for the entries in the custom hashtable
@return The custom hashtable containing the security information. | [
"This",
"method",
"extracts",
"the",
"custom",
"hashtable",
"from",
"the",
"provided",
"Subject",
"using",
"the",
"cacheKey",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.inbound.security/src/com/ibm/ws/jca/security/internal/J2CSecurityHelper.java#L224-L240 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.jca.inbound.security/src/com/ibm/ws/jca/security/internal/J2CSecurityHelper.java | J2CSecurityHelper.handlePasswordValidationCallback | public static void handlePasswordValidationCallback(PasswordValidationCallback callback, Subject executionSubject, Hashtable<String, Object> addedCred, String appRealm,
Invocation[] invocations)
throws RemoteException, WSSecurityException {
... | java | public static void handlePasswordValidationCallback(PasswordValidationCallback callback, Subject executionSubject, Hashtable<String, Object> addedCred, String appRealm,
Invocation[] invocations)
throws RemoteException, WSSecurityException {
... | [
"public",
"static",
"void",
"handlePasswordValidationCallback",
"(",
"PasswordValidationCallback",
"callback",
",",
"Subject",
"executionSubject",
",",
"Hashtable",
"<",
"String",
",",
"Object",
">",
"addedCred",
",",
"String",
"appRealm",
",",
"Invocation",
"[",
"]",... | The PasswordValidationCallback is used for password validation. This callback is used by the Resource Adapter
to employ the password validation facilities of its containing runtime. This Callback is passed to the CallbackHandler
provided by the J2C runtime during invocation of the handle method by the Resource Adapter.... | [
"The",
"PasswordValidationCallback",
"is",
"used",
"for",
"password",
"validation",
".",
"This",
"callback",
"is",
"used",
"by",
"the",
"Resource",
"Adapter",
"to",
"employ",
"the",
"password",
"validation",
"facilities",
"of",
"its",
"containing",
"runtime",
".",... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.inbound.security/src/com/ibm/ws/jca/security/internal/J2CSecurityHelper.java#L260-L304 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.jca.inbound.security/src/com/ibm/ws/jca/security/internal/J2CSecurityHelper.java | J2CSecurityHelper.addUniqueIdAndGroupsForUser | private static void addUniqueIdAndGroupsForUser(String securityName,
Hashtable<String, Object> credData, String appRealm) // 675924
throws WSSecurityException, RemoteException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
... | java | private static void addUniqueIdAndGroupsForUser(String securityName,
Hashtable<String, Object> credData, String appRealm) // 675924
throws WSSecurityException, RemoteException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
... | [
"private",
"static",
"void",
"addUniqueIdAndGroupsForUser",
"(",
"String",
"securityName",
",",
"Hashtable",
"<",
"String",
",",
"Object",
">",
"credData",
",",
"String",
"appRealm",
")",
"// 675924",
"throws",
"WSSecurityException",
",",
"RemoteException",
"{",
"if... | Checks if the provided securityName is valid against the user registry. In case it is
valid it then gets uniqueId and the groups for the user with the given securityName.
It then uses this information to create the custom hashtable required for login.
@param securityName The user security name
@param credData The hash... | [
"Checks",
"if",
"the",
"provided",
"securityName",
"is",
"valid",
"against",
"the",
"user",
"registry",
".",
"In",
"case",
"it",
"is",
"valid",
"it",
"then",
"gets",
"uniqueId",
"and",
"the",
"groups",
"for",
"the",
"user",
"with",
"the",
"given",
"securit... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.inbound.security/src/com/ibm/ws/jca/security/internal/J2CSecurityHelper.java#L489-L544 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.jca.inbound.security/src/com/ibm/ws/jca/security/internal/J2CSecurityHelper.java | J2CSecurityHelper.checkUserPassword | private static boolean checkUserPassword(String userSecurityName, String password, UserRegistry registry, String realmName, Hashtable<String, Object> addedCred,
Invocation isCCInvoked) { // 675924
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
... | java | private static boolean checkUserPassword(String userSecurityName, String password, UserRegistry registry, String realmName, Hashtable<String, Object> addedCred,
Invocation isCCInvoked) { // 675924
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
... | [
"private",
"static",
"boolean",
"checkUserPassword",
"(",
"String",
"userSecurityName",
",",
"String",
"password",
",",
"UserRegistry",
"registry",
",",
"String",
"realmName",
",",
"Hashtable",
"<",
"String",
",",
"Object",
">",
"addedCred",
",",
"Invocation",
"is... | Checks the user name and password against the user registry provided. If the user name and
password are valid it returns true.
@param userSecurityName The user security name.
@param password the password
@param registry The registry against which the user name and password should be validated
@param realmName The real... | [
"Checks",
"the",
"user",
"name",
"and",
"password",
"against",
"the",
"user",
"registry",
"provided",
".",
"If",
"the",
"user",
"name",
"and",
"password",
"are",
"valid",
"it",
"returns",
"true",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.inbound.security/src/com/ibm/ws/jca/security/internal/J2CSecurityHelper.java#L561-L612 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.jca.inbound.security/src/com/ibm/ws/jca/security/internal/J2CSecurityHelper.java | J2CSecurityHelper.getCacheKey | public static String getCacheKey(String uniqueId, String appRealm) {
StringBuilder cacheKey = new StringBuilder();
if (uniqueId == null || appRealm == null) {
cacheKey.append(CACHE_KEY_PREFIX);
} else {
cacheKey.append(CACHE_KEY_PREFIX).append(uniqueId).append(CACHE_KEY_S... | java | public static String getCacheKey(String uniqueId, String appRealm) {
StringBuilder cacheKey = new StringBuilder();
if (uniqueId == null || appRealm == null) {
cacheKey.append(CACHE_KEY_PREFIX);
} else {
cacheKey.append(CACHE_KEY_PREFIX).append(uniqueId).append(CACHE_KEY_S... | [
"public",
"static",
"String",
"getCacheKey",
"(",
"String",
"uniqueId",
",",
"String",
"appRealm",
")",
"{",
"StringBuilder",
"cacheKey",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"if",
"(",
"uniqueId",
"==",
"null",
"||",
"appRealm",
"==",
"null",
")",
... | This method constructs the cache key that is required by security for caching
the Subject.
@param uniqueId The unique Id of the user
@param appRealm The application realm that the user belongs to
@return the cache key | [
"This",
"method",
"constructs",
"the",
"cache",
"key",
"that",
"is",
"required",
"by",
"security",
"for",
"caching",
"the",
"Subject",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.inbound.security/src/com/ibm/ws/jca/security/internal/J2CSecurityHelper.java#L622-L630 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.jca.inbound.security/src/com/ibm/ws/jca/security/internal/J2CSecurityHelper.java | J2CSecurityHelper.validateCallbackInformation | private static boolean validateCallbackInformation(Hashtable<String, Object> credData, String securityName, Invocation isInvoked) {
boolean status = true;
if (isInvoked == Invocation.CALLERPRINCIPALCALLBACK) {
String existingName = (String) credData.get(AttributeNameConstants.WSCREDENTIAL_SE... | java | private static boolean validateCallbackInformation(Hashtable<String, Object> credData, String securityName, Invocation isInvoked) {
boolean status = true;
if (isInvoked == Invocation.CALLERPRINCIPALCALLBACK) {
String existingName = (String) credData.get(AttributeNameConstants.WSCREDENTIAL_SE... | [
"private",
"static",
"boolean",
"validateCallbackInformation",
"(",
"Hashtable",
"<",
"String",
",",
"Object",
">",
"credData",
",",
"String",
"securityName",
",",
"Invocation",
"isInvoked",
")",
"{",
"boolean",
"status",
"=",
"true",
";",
"if",
"(",
"isInvoked"... | This method validates whether the user security name provided by the CallerPrincipalCallback and
the PasswordValidationCallback match. It does this check only in case the CallerPrincipalCallback
was invoked prior to the current invocation of the PasswordValidationCallback.
@param credData The custom hashtable that wil... | [
"This",
"method",
"validates",
"whether",
"the",
"user",
"security",
"name",
"provided",
"by",
"the",
"CallerPrincipalCallback",
"and",
"the",
"PasswordValidationCallback",
"match",
".",
"It",
"does",
"this",
"check",
"only",
"in",
"case",
"the",
"CallerPrincipalCal... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.inbound.security/src/com/ibm/ws/jca/security/internal/J2CSecurityHelper.java#L643-L653 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.jca.inbound.security/src/com/ibm/ws/jca/security/internal/J2CSecurityHelper.java | J2CSecurityHelper.objectId | public static String objectId(Object o)
{
return (o == null) ? "0x0" : o.getClass().getName() + "@" + Integer.toHexString(o.hashCode());
} | java | public static String objectId(Object o)
{
return (o == null) ? "0x0" : o.getClass().getName() + "@" + Integer.toHexString(o.hashCode());
} | [
"public",
"static",
"String",
"objectId",
"(",
"Object",
"o",
")",
"{",
"return",
"(",
"o",
"==",
"null",
")",
"?",
"\"0x0\"",
":",
"o",
".",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
"+",
"\"@\"",
"+",
"Integer",
".",
"toHexString",
"(",
"o"... | A string that identifies an object instance within WAS messages and heap dumps.
@param o The Object instance.
@return the class name of bean concatenated with its hashcode in hexadecimal. | [
"A",
"string",
"that",
"identifies",
"an",
"object",
"instance",
"within",
"WAS",
"messages",
"and",
"heap",
"dumps",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.inbound.security/src/com/ibm/ws/jca/security/internal/J2CSecurityHelper.java#L686-L689 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java | ProbeManagerImpl.activate | synchronized void activate(ComponentContext componentContext) throws Exception {
this.componentContext = componentContext;
this.classAvailableTransformer = new ClassAvailableTransformer(this, instrumentation, includeBootstrap);
this.transformer = new ProbeClassFileTransformer(this, instrumentati... | java | synchronized void activate(ComponentContext componentContext) throws Exception {
this.componentContext = componentContext;
this.classAvailableTransformer = new ClassAvailableTransformer(this, instrumentation, includeBootstrap);
this.transformer = new ProbeClassFileTransformer(this, instrumentati... | [
"synchronized",
"void",
"activate",
"(",
"ComponentContext",
"componentContext",
")",
"throws",
"Exception",
"{",
"this",
".",
"componentContext",
"=",
"componentContext",
";",
"this",
".",
"classAvailableTransformer",
"=",
"new",
"ClassAvailableTransformer",
"(",
"this... | Activation callback from the Declarative Services runtime where the
component is ready for activation.
@param bundleContext the bundleContext | [
"Activation",
"callback",
"from",
"the",
"Declarative",
"Services",
"runtime",
"where",
"the",
"component",
"is",
"ready",
"for",
"activation",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java#L175-L210 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java | ProbeManagerImpl.deactivate | synchronized void deactivate() throws Exception {
this.proxyActivator.deactivate();
this.instrumentation.removeTransformer(this.classAvailableTransformer);
this.instrumentation.removeTransformer(this.transformer);
this.shuttingDown = true;
// Save the classes that have listeners... | java | synchronized void deactivate() throws Exception {
this.proxyActivator.deactivate();
this.instrumentation.removeTransformer(this.classAvailableTransformer);
this.instrumentation.removeTransformer(this.transformer);
this.shuttingDown = true;
// Save the classes that have listeners... | [
"synchronized",
"void",
"deactivate",
"(",
")",
"throws",
"Exception",
"{",
"this",
".",
"proxyActivator",
".",
"deactivate",
"(",
")",
";",
"this",
".",
"instrumentation",
".",
"removeTransformer",
"(",
"this",
".",
"classAvailableTransformer",
")",
";",
"this"... | Deactivation callback from the Declarative Services runtime where the
component is deactivated.
@param bundleContext the bundleContext | [
"Deactivation",
"callback",
"from",
"the",
"Declarative",
"Services",
"runtime",
"where",
"the",
"component",
"is",
"deactivated",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java#L218-L253 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java | ProbeManagerImpl.registerMonitor | @Override
public boolean registerMonitor(Object monitor) {
// Process the annotated object, build a configuration, and create probe
// listeners that represent each call site of the monitor.
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(this, tc, "mo... | java | @Override
public boolean registerMonitor(Object monitor) {
// Process the annotated object, build a configuration, and create probe
// listeners that represent each call site of the monitor.
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(this, tc, "mo... | [
"@",
"Override",
"public",
"boolean",
"registerMonitor",
"(",
"Object",
"monitor",
")",
"{",
"// Process the annotated object, build a configuration, and create probe",
"// listeners that represent each call site of the monitor.",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnable... | Register an annotated object as a monitor. The annotations will be used
to generate the appropriate configuration.
@param monitor an annotated pojo that acts as a probe listener | [
"Register",
"an",
"annotated",
"object",
"as",
"a",
"monitor",
".",
"The",
"annotations",
"will",
"be",
"used",
"to",
"generate",
"the",
"appropriate",
"configuration",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java#L281-L322 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java | ProbeManagerImpl.unregisterMonitor | @Override
public boolean unregisterMonitor(Object annotatedObject) {
// Clear the listener data
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(this, tc, "unregisteringMonitor = " + annotatedObject);
}
Set<ProbeListener> listeners = removeList... | java | @Override
public boolean unregisterMonitor(Object annotatedObject) {
// Clear the listener data
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(this, tc, "unregisteringMonitor = " + annotatedObject);
}
Set<ProbeListener> listeners = removeList... | [
"@",
"Override",
"public",
"boolean",
"unregisterMonitor",
"(",
"Object",
"annotatedObject",
")",
"{",
"// Clear the listener data",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"Tr",
"... | Unregister the specified monitor. Unregistering a monitor may cause one
or more probes to be deactivated and the associated classes retransformed.
@param the monitor to unregister
@return true iff the monitor was successfully unregistered | [
"Unregister",
"the",
"specified",
"monitor",
".",
"Unregistering",
"a",
"monitor",
"may",
"cause",
"one",
"or",
"more",
"probes",
"to",
"be",
"deactivated",
"and",
"the",
"associated",
"classes",
"retransformed",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java#L338-L368 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java | ProbeManagerImpl.removeListenersForMonitor | Set<ProbeListener> removeListenersForMonitor(Object monitor) {
Set<ProbeListener> listeners = null;
listenersLock.writeLock().lock();
try {
listeners = listenersForMonitor.remove(monitor);
if (listeners == null) {
listeners = Collections.emptySet();
... | java | Set<ProbeListener> removeListenersForMonitor(Object monitor) {
Set<ProbeListener> listeners = null;
listenersLock.writeLock().lock();
try {
listeners = listenersForMonitor.remove(monitor);
if (listeners == null) {
listeners = Collections.emptySet();
... | [
"Set",
"<",
"ProbeListener",
">",
"removeListenersForMonitor",
"(",
"Object",
"monitor",
")",
"{",
"Set",
"<",
"ProbeListener",
">",
"listeners",
"=",
"null",
";",
"listenersLock",
".",
"writeLock",
"(",
")",
".",
"lock",
"(",
")",
";",
"try",
"{",
"listen... | Remove the listeners associated with the specified monitor from the set
of registered listeners.
@param monitor the monitor that owns the listeners
@return the set of listeners that were associated with the monitor | [
"Remove",
"the",
"listeners",
"associated",
"with",
"the",
"specified",
"monitor",
"from",
"the",
"set",
"of",
"registered",
"listeners",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java#L450-L466 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java | ProbeManagerImpl.processNewListeners | Collection<Class<?>> processNewListeners(Collection<ProbeListener> listeners) {
Set<Class<?>> classesToTransform = new HashSet<Class<?>>();
Set<ProbeListener> matchingListeners = new HashSet<ProbeListener>();
Set<Class<?>> monitorableTemp;
synchronized (this.monitorable) {
m... | java | Collection<Class<?>> processNewListeners(Collection<ProbeListener> listeners) {
Set<Class<?>> classesToTransform = new HashSet<Class<?>>();
Set<ProbeListener> matchingListeners = new HashSet<ProbeListener>();
Set<Class<?>> monitorableTemp;
synchronized (this.monitorable) {
m... | [
"Collection",
"<",
"Class",
"<",
"?",
">",
">",
"processNewListeners",
"(",
"Collection",
"<",
"ProbeListener",
">",
"listeners",
")",
"{",
"Set",
"<",
"Class",
"<",
"?",
">",
">",
"classesToTransform",
"=",
"new",
"HashSet",
"<",
"Class",
"<",
"?",
">",... | Process recently registered listeners and calculate which classes need
to be transformed with probes that drive the listeners.
@param listeners the collection of recently registered listeners
@return the classes that must be retransformed with probes | [
"Process",
"recently",
"registered",
"listeners",
"and",
"calculate",
"which",
"classes",
"need",
"to",
"be",
"transformed",
"with",
"probes",
"that",
"drive",
"the",
"listeners",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java#L476-L502 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java | ProbeManagerImpl.processRemovedListeners | synchronized Collection<Class<?>> processRemovedListeners(Collection<ProbeListener> listeners) {
Set<Class<?>> classesToTransform = new HashSet<Class<?>>();
for (ProbeListener listener : listeners) {
Collection<ProbeImpl> listenerProbes = removeProbesByListener(listener);
for (P... | java | synchronized Collection<Class<?>> processRemovedListeners(Collection<ProbeListener> listeners) {
Set<Class<?>> classesToTransform = new HashSet<Class<?>>();
for (ProbeListener listener : listeners) {
Collection<ProbeImpl> listenerProbes = removeProbesByListener(listener);
for (P... | [
"synchronized",
"Collection",
"<",
"Class",
"<",
"?",
">",
">",
"processRemovedListeners",
"(",
"Collection",
"<",
"ProbeListener",
">",
"listeners",
")",
"{",
"Set",
"<",
"Class",
"<",
"?",
">",
">",
"classesToTransform",
"=",
"new",
"HashSet",
"<",
"Class"... | Process the recently unregistered listeners and calculate which classes
need to be transformed to remove deactivated probes.
@param listeners the collection of recently removed listeners
@return the classes that must be retransformed to remove probes | [
"Process",
"the",
"recently",
"unregistered",
"listeners",
"and",
"calculate",
"which",
"classes",
"need",
"to",
"be",
"transformed",
"to",
"remove",
"deactivated",
"probes",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java#L512-L527 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java | ProbeManagerImpl.classAvailable | public void classAvailable(Class<?> clazz) {
if (!isMonitorable(clazz)) {
return;
}
listenersLock.readLock().lock();
try {
for (ProbeListener listener : allRegisteredListeners) {
ProbeFilter filter = listener.getProbeFilter();
if (f... | java | public void classAvailable(Class<?> clazz) {
if (!isMonitorable(clazz)) {
return;
}
listenersLock.readLock().lock();
try {
for (ProbeListener listener : allRegisteredListeners) {
ProbeFilter filter = listener.getProbeFilter();
if (f... | [
"public",
"void",
"classAvailable",
"(",
"Class",
"<",
"?",
">",
"clazz",
")",
"{",
"if",
"(",
"!",
"isMonitorable",
"(",
"clazz",
")",
")",
"{",
"return",
";",
"}",
"listenersLock",
".",
"readLock",
"(",
")",
".",
"lock",
"(",
")",
";",
"try",
"{"... | Process a recently defined class to determine if it needs to be
transformed with probes.
@param clazz a recently defined class | [
"Process",
"a",
"recently",
"defined",
"class",
"to",
"determine",
"if",
"it",
"needs",
"to",
"be",
"transformed",
"with",
"probes",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java#L535-L555 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java | ProbeManagerImpl.getProbe | public synchronized ProbeImpl getProbe(Class<?> probedClass, String key) {
Map<String, ProbeImpl> classProbes = probesByKey.get(probedClass);
if (classProbes != null) {
return classProbes.get(key);
}
return null;
} | java | public synchronized ProbeImpl getProbe(Class<?> probedClass, String key) {
Map<String, ProbeImpl> classProbes = probesByKey.get(probedClass);
if (classProbes != null) {
return classProbes.get(key);
}
return null;
} | [
"public",
"synchronized",
"ProbeImpl",
"getProbe",
"(",
"Class",
"<",
"?",
">",
"probedClass",
",",
"String",
"key",
")",
"{",
"Map",
"<",
"String",
",",
"ProbeImpl",
">",
"classProbes",
"=",
"probesByKey",
".",
"get",
"(",
"probedClass",
")",
";",
"if",
... | Get an existing instance of a probe with the specified source class and
key.
@param probedClass the probe source class
@param key the probe key
@return an existing probe or null | [
"Get",
"an",
"existing",
"instance",
"of",
"a",
"probe",
"with",
"the",
"specified",
"source",
"class",
"and",
"key",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java#L617-L623 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java | ProbeManagerImpl.addActiveProbesforListener | public void addActiveProbesforListener(ProbeListener listener, Collection<ProbeImpl> probes) {
// Add the probes for the specified listener. This is purely additive.
// Since a listener's configuration can't be updated after registration,
// we're adding probes for recently initialized / modifi... | java | public void addActiveProbesforListener(ProbeListener listener, Collection<ProbeImpl> probes) {
// Add the probes for the specified listener. This is purely additive.
// Since a listener's configuration can't be updated after registration,
// we're adding probes for recently initialized / modifi... | [
"public",
"void",
"addActiveProbesforListener",
"(",
"ProbeListener",
"listener",
",",
"Collection",
"<",
"ProbeImpl",
">",
"probes",
")",
"{",
"// Add the probes for the specified listener. This is purely additive.",
"// Since a listener's configuration can't be updated after registr... | Update the appropriate collections to reflect recently activated probes
for the specified listener.
@param listener the listener with recently activated probes
@param probes the collection of probes that were activated | [
"Update",
"the",
"appropriate",
"collections",
"to",
"reflect",
"recently",
"activated",
"probes",
"for",
"the",
"specified",
"listener",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java#L673-L682 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java | ProbeManagerImpl.addListenerByProbe | void addListenerByProbe(ProbeImpl probe, ProbeListener listener) {
Set<ProbeListener> listeners = listenersByProbe.get(probe);
if (listeners == null) {
listeners = new CopyOnWriteArraySet<ProbeListener>();
listenersByProbe.putIfAbsent(probe, listeners);
listeners = li... | java | void addListenerByProbe(ProbeImpl probe, ProbeListener listener) {
Set<ProbeListener> listeners = listenersByProbe.get(probe);
if (listeners == null) {
listeners = new CopyOnWriteArraySet<ProbeListener>();
listenersByProbe.putIfAbsent(probe, listeners);
listeners = li... | [
"void",
"addListenerByProbe",
"(",
"ProbeImpl",
"probe",
",",
"ProbeListener",
"listener",
")",
"{",
"Set",
"<",
"ProbeListener",
">",
"listeners",
"=",
"listenersByProbe",
".",
"get",
"(",
"probe",
")",
";",
"if",
"(",
"listeners",
"==",
"null",
")",
"{",
... | Add the specified listener to the collection of listeners associated
with the specified probe.
@param probe the probe that fires for the listener
@param listener the listener that's driven by the probe | [
"Add",
"the",
"specified",
"listener",
"to",
"the",
"collection",
"of",
"listeners",
"associated",
"with",
"the",
"specified",
"probe",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java#L691-L699 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java | ProbeManagerImpl.removeListenerByProbe | boolean removeListenerByProbe(ProbeImpl probe, ProbeListener listener) {
boolean deactivatedProbe = false;
Set<ProbeListener> listeners = listenersByProbe.get(probe);
if (listeners != null) {
listeners.remove(listener);
if (listeners.isEmpty()) {
deactiva... | java | boolean removeListenerByProbe(ProbeImpl probe, ProbeListener listener) {
boolean deactivatedProbe = false;
Set<ProbeListener> listeners = listenersByProbe.get(probe);
if (listeners != null) {
listeners.remove(listener);
if (listeners.isEmpty()) {
deactiva... | [
"boolean",
"removeListenerByProbe",
"(",
"ProbeImpl",
"probe",
",",
"ProbeListener",
"listener",
")",
"{",
"boolean",
"deactivatedProbe",
"=",
"false",
";",
"Set",
"<",
"ProbeListener",
">",
"listeners",
"=",
"listenersByProbe",
".",
"get",
"(",
"probe",
")",
";... | Remove the specified listener from the collection of listeners associated
with the specified probe.
@param probe the probe that fired for the listener
@param listener the listener that was driven by the probe
@return true if removing the listener caused the probe to become disabled | [
"Remove",
"the",
"specified",
"listener",
"from",
"the",
"collection",
"of",
"listeners",
"associated",
"with",
"the",
"specified",
"probe",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java#L710-L723 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java | ProbeManagerImpl.deactivateProbe | synchronized void deactivateProbe(ProbeImpl probe) {
listenersByProbe.remove(probe);
activeProbesById.remove(probe.getIdentifier());
Class<?> clazz = probe.getSourceClass();
Map<String, ProbeImpl> classProbesByKey = probesByKey.get(clazz);
classProbesByKey.remove(probe.getName()... | java | synchronized void deactivateProbe(ProbeImpl probe) {
listenersByProbe.remove(probe);
activeProbesById.remove(probe.getIdentifier());
Class<?> clazz = probe.getSourceClass();
Map<String, ProbeImpl> classProbesByKey = probesByKey.get(clazz);
classProbesByKey.remove(probe.getName()... | [
"synchronized",
"void",
"deactivateProbe",
"(",
"ProbeImpl",
"probe",
")",
"{",
"listenersByProbe",
".",
"remove",
"(",
"probe",
")",
";",
"activeProbesById",
".",
"remove",
"(",
"probe",
".",
"getIdentifier",
"(",
")",
")",
";",
"Class",
"<",
"?",
">",
"c... | Deactivate the specified probe and remove all data associated with the
probe.
@param probe the probe to deactivate | [
"Deactivate",
"the",
"specified",
"probe",
"and",
"remove",
"all",
"data",
"associated",
"with",
"the",
"probe",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java#L731-L741 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java | ProbeManagerImpl.addProbesByListener | synchronized void addProbesByListener(ProbeListener listener, Collection<ProbeImpl> probes) {
Set<ProbeImpl> listenerProbes = probesByListener.get(listener);
if (listenerProbes == null) {
listenerProbes = new HashSet<ProbeImpl>();
probesByListener.put(listener, listenerProbes);
... | java | synchronized void addProbesByListener(ProbeListener listener, Collection<ProbeImpl> probes) {
Set<ProbeImpl> listenerProbes = probesByListener.get(listener);
if (listenerProbes == null) {
listenerProbes = new HashSet<ProbeImpl>();
probesByListener.put(listener, listenerProbes);
... | [
"synchronized",
"void",
"addProbesByListener",
"(",
"ProbeListener",
"listener",
",",
"Collection",
"<",
"ProbeImpl",
">",
"probes",
")",
"{",
"Set",
"<",
"ProbeImpl",
">",
"listenerProbes",
"=",
"probesByListener",
".",
"get",
"(",
"listener",
")",
";",
"if",
... | Associate the specified collection of probes with the specified listener.
@param listener the listener that probes are fired to
@param probes the probes fired to the listener | [
"Associate",
"the",
"specified",
"collection",
"of",
"probes",
"with",
"the",
"specified",
"listener",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java#L749-L756 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java | ProbeManagerImpl.removeProbesByListener | synchronized Collection<ProbeImpl> removeProbesByListener(ProbeListener listener) {
Set<ProbeImpl> listenerProbes = probesByListener.remove(listener);
if (listenerProbes == null) {
listenerProbes = Collections.emptySet();
}
return listenerProbes;
} | java | synchronized Collection<ProbeImpl> removeProbesByListener(ProbeListener listener) {
Set<ProbeImpl> listenerProbes = probesByListener.remove(listener);
if (listenerProbes == null) {
listenerProbes = Collections.emptySet();
}
return listenerProbes;
} | [
"synchronized",
"Collection",
"<",
"ProbeImpl",
">",
"removeProbesByListener",
"(",
"ProbeListener",
"listener",
")",
"{",
"Set",
"<",
"ProbeImpl",
">",
"listenerProbes",
"=",
"probesByListener",
".",
"remove",
"(",
"listener",
")",
";",
"if",
"(",
"listenerProbes... | Remove all probes that were fired at the specified listener.
@param listener the listener that probes were fired to
@return the probes that were assocaited with the listener | [
"Remove",
"all",
"probes",
"that",
"were",
"fired",
"at",
"the",
"specified",
"listener",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java#L765-L771 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java | ProbeManagerImpl.isExcludedClass | public boolean isExcludedClass(String className) {
// We rely heavily on reflection to deliver probes
if (className.startsWith("java/lang/reflect")) {
return true;
}
// Miscellaneous sun.misc classes
if (className.startsWith("sun/misc")) {
return true;
... | java | public boolean isExcludedClass(String className) {
// We rely heavily on reflection to deliver probes
if (className.startsWith("java/lang/reflect")) {
return true;
}
// Miscellaneous sun.misc classes
if (className.startsWith("sun/misc")) {
return true;
... | [
"public",
"boolean",
"isExcludedClass",
"(",
"String",
"className",
")",
"{",
"// We rely heavily on reflection to deliver probes",
"if",
"(",
"className",
".",
"startsWith",
"(",
"\"java/lang/reflect\"",
")",
")",
"{",
"return",
"true",
";",
"}",
"// Miscellaneous sun.... | Determine if the named class is one that should be excluded from
monitoring via probe injection. The patterns below generally
include classes required to implement JVM function on which the
monitoring code depends.
@param className the internal name of the class | [
"Determine",
"if",
"the",
"named",
"class",
"is",
"one",
"that",
"should",
"be",
"excluded",
"from",
"monitoring",
"via",
"probe",
"injection",
".",
"The",
"patterns",
"below",
"generally",
"include",
"classes",
"required",
"to",
"implement",
"JVM",
"function",
... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java#L781-L816 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java | ProbeManagerImpl.isMonitorable | public boolean isMonitorable(Class<?> clazz) {
// Faster(?) path
if (notMonitorable.contains(clazz)) {
return false;
} else if (monitorable.contains(clazz)) {
return true;
}
boolean isMonitorable = true;
if (!instrumentation.isModifiableClass(claz... | java | public boolean isMonitorable(Class<?> clazz) {
// Faster(?) path
if (notMonitorable.contains(clazz)) {
return false;
} else if (monitorable.contains(clazz)) {
return true;
}
boolean isMonitorable = true;
if (!instrumentation.isModifiableClass(claz... | [
"public",
"boolean",
"isMonitorable",
"(",
"Class",
"<",
"?",
">",
"clazz",
")",
"{",
"// Faster(?) path",
"if",
"(",
"notMonitorable",
".",
"contains",
"(",
"clazz",
")",
")",
"{",
"return",
"false",
";",
"}",
"else",
"if",
"(",
"monitorable",
".",
"con... | Determine of the specified class can be monitored via the probes
infrastructure.
@param clazz the monitoring candidate
@return false if the class can't be monitored | [
"Determine",
"of",
"the",
"specified",
"class",
"can",
"be",
"monitored",
"via",
"the",
"probes",
"infrastructure",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java#L826-L860 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/selector/impl/TopicPattern.java | TopicPattern.checkPrefix | boolean checkPrefix(char[] chars, int[] cursor) {
if (chars.length > cursor[0] && chars[cursor[0]] == MatchSpace.NONWILD_MARKER)
return false;
if (prefix == null)
return true;
if (cursor[1] - cursor[0] < prefix.minlen)
// a conservative test, but if we can't pass it, we'll certainly fail l... | java | boolean checkPrefix(char[] chars, int[] cursor) {
if (chars.length > cursor[0] && chars[cursor[0]] == MatchSpace.NONWILD_MARKER)
return false;
if (prefix == null)
return true;
if (cursor[1] - cursor[0] < prefix.minlen)
// a conservative test, but if we can't pass it, we'll certainly fail l... | [
"boolean",
"checkPrefix",
"(",
"char",
"[",
"]",
"chars",
",",
"int",
"[",
"]",
"cursor",
")",
"{",
"if",
"(",
"chars",
".",
"length",
">",
"cursor",
"[",
"0",
"]",
"&&",
"chars",
"[",
"cursor",
"[",
"0",
"]",
"]",
"==",
"MatchSpace",
".",
"NONWI... | Override checkPrefix to implement topic semantics | [
"Override",
"checkPrefix",
"to",
"implement",
"topic",
"semantics"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/selector/impl/TopicPattern.java#L32-L55 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/selector/impl/TopicPattern.java | TopicPattern.topicSkipForward | static boolean topicSkipForward(char[] chars, int[] cursor) {
if (cursor[0] == cursor[1])
return false;
while (cursor[0] < cursor[1] && chars[cursor[0]] != MatchSpace.SUBTOPIC_SEPARATOR_CHAR)
cursor[0]++;
return true;
} | java | static boolean topicSkipForward(char[] chars, int[] cursor) {
if (cursor[0] == cursor[1])
return false;
while (cursor[0] < cursor[1] && chars[cursor[0]] != MatchSpace.SUBTOPIC_SEPARATOR_CHAR)
cursor[0]++;
return true;
} | [
"static",
"boolean",
"topicSkipForward",
"(",
"char",
"[",
"]",
"chars",
",",
"int",
"[",
"]",
"cursor",
")",
"{",
"if",
"(",
"cursor",
"[",
"0",
"]",
"==",
"cursor",
"[",
"1",
"]",
")",
"return",
"false",
";",
"while",
"(",
"cursor",
"[",
"0",
"... | Skip forward to the next separator character
@param chars the characters to be examined
@param cursor the int[2] { start, end } "cursor" describing the area to be examined
@return true if something was skipped, false if nothing could be skipped | [
"Skip",
"forward",
"to",
"the",
"next",
"separator",
"character"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/selector/impl/TopicPattern.java#L62-L68 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/selector/impl/TopicPattern.java | TopicPattern.checkSuffix | boolean checkSuffix(char[] chars, int[] cursor) {
if (suffix == null)
return true;
if (cursor[1] - cursor[0] < suffix.minlen)
// a conservative test, but if we can't pass it, we'll certainly fail later
return false;
int last = suffix.items.length - 1;
for (int i = last; i >= 0; i--) {
... | java | boolean checkSuffix(char[] chars, int[] cursor) {
if (suffix == null)
return true;
if (cursor[1] - cursor[0] < suffix.minlen)
// a conservative test, but if we can't pass it, we'll certainly fail later
return false;
int last = suffix.items.length - 1;
for (int i = last; i >= 0; i--) {
... | [
"boolean",
"checkSuffix",
"(",
"char",
"[",
"]",
"chars",
",",
"int",
"[",
"]",
"cursor",
")",
"{",
"if",
"(",
"suffix",
"==",
"null",
")",
"return",
"true",
";",
"if",
"(",
"cursor",
"[",
"1",
"]",
"-",
"cursor",
"[",
"0",
"]",
"<",
"suffix",
... | Override checkSuffix to implement topic semantics | [
"Override",
"checkSuffix",
"to",
"implement",
"topic",
"semantics"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/selector/impl/TopicPattern.java#L71-L95 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/selector/impl/TopicPattern.java | TopicPattern.topicSkipBackward | static boolean topicSkipBackward(char[] chars, int[] cursor) {
if (cursor[0] == cursor[1])
return false;
while (cursor[0] < cursor[1] &&
chars[cursor[1]-1] != MatchSpace.SUBTOPIC_SEPARATOR_CHAR)
cursor[1]--;
return true;
} | java | static boolean topicSkipBackward(char[] chars, int[] cursor) {
if (cursor[0] == cursor[1])
return false;
while (cursor[0] < cursor[1] &&
chars[cursor[1]-1] != MatchSpace.SUBTOPIC_SEPARATOR_CHAR)
cursor[1]--;
return true;
} | [
"static",
"boolean",
"topicSkipBackward",
"(",
"char",
"[",
"]",
"chars",
",",
"int",
"[",
"]",
"cursor",
")",
"{",
"if",
"(",
"cursor",
"[",
"0",
"]",
"==",
"cursor",
"[",
"1",
"]",
")",
"return",
"false",
";",
"while",
"(",
"cursor",
"[",
"0",
... | Skip backward to the next separator character
@param chars the characters to be examined
@param cursor the int[2] { start, end } "cursor" describing the area to be examined
@return true if something was skipped, false if nothing could be skipped | [
"Skip",
"backward",
"to",
"the",
"next",
"separator",
"character"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/selector/impl/TopicPattern.java#L102-L109 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/selector/impl/TopicPattern.java | TopicPattern.matchBackward | static boolean matchBackward(char[] chars, char[] pattern, int[] cursor) {
int start = cursor[1] - pattern.length;
if (start < cursor[0])
// candidate is too short to possibly match
return false;
if (!matchForward(chars, pattern, new int[] {start, cursor[1]}))
return false;
// The cand... | java | static boolean matchBackward(char[] chars, char[] pattern, int[] cursor) {
int start = cursor[1] - pattern.length;
if (start < cursor[0])
// candidate is too short to possibly match
return false;
if (!matchForward(chars, pattern, new int[] {start, cursor[1]}))
return false;
// The cand... | [
"static",
"boolean",
"matchBackward",
"(",
"char",
"[",
"]",
"chars",
",",
"char",
"[",
"]",
"pattern",
",",
"int",
"[",
"]",
"cursor",
")",
"{",
"int",
"start",
"=",
"cursor",
"[",
"1",
"]",
"-",
"pattern",
".",
"length",
";",
"if",
"(",
"start",
... | Match characters in a backward direction | [
"Match",
"characters",
"in",
"a",
"backward",
"direction"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/selector/impl/TopicPattern.java#L112-L122 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/selector/impl/TopicPattern.java | TopicPattern.parsePattern | public static Object parsePattern(String pattern) {
// Unfortunately, this method shares a fair amount of logic with Topic.parsePattern
// but it is hard to figure out how to factor them.
char[] accum = new char[pattern.length()];
int finger = 0;
List tokens = new ArrayList();
boolean trivial = ... | java | public static Object parsePattern(String pattern) {
// Unfortunately, this method shares a fair amount of logic with Topic.parsePattern
// but it is hard to figure out how to factor them.
char[] accum = new char[pattern.length()];
int finger = 0;
List tokens = new ArrayList();
boolean trivial = ... | [
"public",
"static",
"Object",
"parsePattern",
"(",
"String",
"pattern",
")",
"{",
"// Unfortunately, this method shares a fair amount of logic with Topic.parsePattern",
"// but it is hard to figure out how to factor them.",
"char",
"[",
"]",
"accum",
"=",
"new",
"char",
"[",
"p... | Parse a string topic pattern into a TopicPattern object
@param pattern the string pattern to be parsed
@return an object representing the result, as follows.
<ul>
<li>the pattern as a string if the pattern contains no wildcards
and hence is better treated as an equality test.
<li>the pattern as a TopicPattern object ot... | [
"Parse",
"a",
"string",
"topic",
"pattern",
"into",
"a",
"TopicPattern",
"object"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/selector/impl/TopicPattern.java#L139-L211 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/StringArrayWrapper.java | StringArrayWrapper.create | public static StringArrayWrapper create(String[] data, String bigDestName) throws JMSException
{
int size = 0;
if (data != null) size = data.length;
List fakedFullMsgPath = new ArrayList(size+1);
if (size > 0)
{
for (int i = 0; i < size; i++)
{
... | java | public static StringArrayWrapper create(String[] data, String bigDestName) throws JMSException
{
int size = 0;
if (data != null) size = data.length;
List fakedFullMsgPath = new ArrayList(size+1);
if (size > 0)
{
for (int i = 0; i < size; i++)
{
... | [
"public",
"static",
"StringArrayWrapper",
"create",
"(",
"String",
"[",
"]",
"data",
",",
"String",
"bigDestName",
")",
"throws",
"JMSException",
"{",
"int",
"size",
"=",
"0",
";",
"if",
"(",
"data",
"!=",
"null",
")",
"size",
"=",
"data",
".",
"length",... | This method is used for unit test purposes to simulate the creation of a
StringArrayWrapper whose destinations are all on the local bus.
The individual strings of the first parameter may be of the following form;
destName - just the destination name to be used.
destName:bus - destination name and associated bu... | [
"This",
"method",
"is",
"used",
"for",
"unit",
"test",
"purposes",
"to",
"simulate",
"the",
"creation",
"of",
"a",
"StringArrayWrapper",
"whose",
"destinations",
"are",
"all",
"on",
"the",
"local",
"bus",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/StringArrayWrapper.java#L88-L171 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/StringArrayWrapper.java | StringArrayWrapper.getArray | public String[] getArray()
{
// Create a copy to return to provide isolation.
String[] newArray = null;
// Returning a list of the destination names excluding the
// 'big' destination name.
newArray = new String[fullMsgPath.size()-1];
for (int i = 0; i < newArray.length; i++)
... | java | public String[] getArray()
{
// Create a copy to return to provide isolation.
String[] newArray = null;
// Returning a list of the destination names excluding the
// 'big' destination name.
newArray = new String[fullMsgPath.size()-1];
for (int i = 0; i < newArray.length; i++)
... | [
"public",
"String",
"[",
"]",
"getArray",
"(",
")",
"{",
"// Create a copy to return to provide isolation.",
"String",
"[",
"]",
"newArray",
"=",
"null",
";",
"// Returning a list of the destination names excluding the",
"// 'big' destination name.",
"newArray",
"=",
"new",
... | Returns a list of the destination names not including the 'big'
destination name. | [
"Returns",
"a",
"list",
"of",
"the",
"destination",
"names",
"not",
"including",
"the",
"big",
"destination",
"name",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/StringArrayWrapper.java#L189-L204 | train |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AdministratorImpl.java | AdministratorImpl.createDestinationLocalization | public void createDestinationLocalization(
DestinationDefinition destinationDefinition,
LocalizationDefinition destinationLocalizationDefinition,
Set destinationLocalizingMEs,
boolean isTemporary) throws SIResourceException, SIMPDestinationAlreadyExistsException
{
if (TraceComponent.... | java | public void createDestinationLocalization(
DestinationDefinition destinationDefinition,
LocalizationDefinition destinationLocalizationDefinition,
Set destinationLocalizingMEs,
boolean isTemporary) throws SIResourceException, SIMPDestinationAlreadyExistsException
{
if (TraceComponent.... | [
"public",
"void",
"createDestinationLocalization",
"(",
"DestinationDefinition",
"destinationDefinition",
",",
"LocalizationDefinition",
"destinationLocalizationDefinition",
",",
"Set",
"destinationLocalizingMEs",
",",
"boolean",
"isTemporary",
")",
"throws",
"SIResourceException",... | Method only called by unit tests to create destinations | [
"Method",
"only",
"called",
"by",
"unit",
"tests",
"to",
"create",
"destinations"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AdministratorImpl.java#L429-L448 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.