id int32 0 165k | 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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
109,700 | milaboratory/milib | src/main/java/com/milaboratory/core/Range.java | Range.convertPointToRelativePosition | public int convertPointToRelativePosition(int absolutePosition) {
if (absolutePosition < lower || absolutePosition >= upper)
throw new IllegalArgumentException("Position outside this range (" + absolutePosition + ").");
if (reversed)
return upper - 1 - absolutePosition;
... | java | public int convertPointToRelativePosition(int absolutePosition) {
if (absolutePosition < lower || absolutePosition >= upper)
throw new IllegalArgumentException("Position outside this range (" + absolutePosition + ").");
if (reversed)
return upper - 1 - absolutePosition;
... | [
"public",
"int",
"convertPointToRelativePosition",
"(",
"int",
"absolutePosition",
")",
"{",
"if",
"(",
"absolutePosition",
"<",
"lower",
"||",
"absolutePosition",
">=",
"upper",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Position outside this range (\"",
... | Returns relative point position inside this range.
@param absolutePosition absolute point position (in the same coordinates as this range boundaries)
@return relative point position inside this range | [
"Returns",
"relative",
"point",
"position",
"inside",
"this",
"range",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/Range.java#L284-L292 |
109,701 | milaboratory/milib | src/main/java/com/milaboratory/core/Range.java | Range.convertBoundaryToRelativePosition | public int convertBoundaryToRelativePosition(int absolutePosition) {
if (absolutePosition < lower || absolutePosition > upper)
throw new IllegalArgumentException("Position outside this range (" + absolutePosition + ") this=" + this + ".");
if (reversed)
return upper - absolutePo... | java | public int convertBoundaryToRelativePosition(int absolutePosition) {
if (absolutePosition < lower || absolutePosition > upper)
throw new IllegalArgumentException("Position outside this range (" + absolutePosition + ") this=" + this + ".");
if (reversed)
return upper - absolutePo... | [
"public",
"int",
"convertBoundaryToRelativePosition",
"(",
"int",
"absolutePosition",
")",
"{",
"if",
"(",
"absolutePosition",
"<",
"lower",
"||",
"absolutePosition",
">",
"upper",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Position outside this range (\"",
... | Returns relative boundary position inside this range.
@param absolutePosition absolute boundary position (in the same coordinates as this range boundaries)
@return relative boundary position inside this range | [
"Returns",
"relative",
"boundary",
"position",
"inside",
"this",
"range",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/Range.java#L300-L308 |
109,702 | milaboratory/milib | src/main/java/com/milaboratory/core/Range.java | Range.without | @SuppressWarnings("unchecked")
public List<Range> without(Range range) {
if (!intersectsWith(range))
return Collections.singletonList(this);
if (upper <= range.upper)
return range.lower <= lower ? Collections.EMPTY_LIST : Collections.singletonList(new Range(lower, range.lowe... | java | @SuppressWarnings("unchecked")
public List<Range> without(Range range) {
if (!intersectsWith(range))
return Collections.singletonList(this);
if (upper <= range.upper)
return range.lower <= lower ? Collections.EMPTY_LIST : Collections.singletonList(new Range(lower, range.lowe... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"List",
"<",
"Range",
">",
"without",
"(",
"Range",
"range",
")",
"{",
"if",
"(",
"!",
"intersectsWith",
"(",
"range",
")",
")",
"return",
"Collections",
".",
"singletonList",
"(",
"this",
")",
... | Subtract provided range and return list of ranges contained in current range and not intersecting with other
range.
@param range range to subtract
@return list of ranges contained in current range and not intersecting with other range | [
"Subtract",
"provided",
"range",
"and",
"return",
"list",
"of",
"ranges",
"contained",
"in",
"current",
"range",
"and",
"not",
"intersecting",
"with",
"other",
"range",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/Range.java#L317-L329 |
109,703 | milaboratory/milib | src/main/java/com/milaboratory/core/Range.java | Range.convertPointToAbsolutePosition | public int convertPointToAbsolutePosition(int relativePosition) {
if (relativePosition < 0 || relativePosition >= length())
throw new IllegalArgumentException("Relative position outside this range (" + relativePosition + ").");
if (reversed)
return upper - 1 - relativePosition;
... | java | public int convertPointToAbsolutePosition(int relativePosition) {
if (relativePosition < 0 || relativePosition >= length())
throw new IllegalArgumentException("Relative position outside this range (" + relativePosition + ").");
if (reversed)
return upper - 1 - relativePosition;
... | [
"public",
"int",
"convertPointToAbsolutePosition",
"(",
"int",
"relativePosition",
")",
"{",
"if",
"(",
"relativePosition",
"<",
"0",
"||",
"relativePosition",
">=",
"length",
"(",
")",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Relative position outside... | Converts relative point position to absolute position
@param relativePosition relative point position
@return absolute point position | [
"Converts",
"relative",
"point",
"position",
"to",
"absolute",
"position"
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/Range.java#L363-L371 |
109,704 | milaboratory/milib | src/main/java/com/milaboratory/core/Range.java | Range.convertBoundaryToAbsolutePosition | public int convertBoundaryToAbsolutePosition(int relativePosition) {
if (relativePosition < 0 || relativePosition > length())
throw new IllegalArgumentException("Relative position outside this range (" + relativePosition + ").");
if (reversed)
return upper - relativePosition;
... | java | public int convertBoundaryToAbsolutePosition(int relativePosition) {
if (relativePosition < 0 || relativePosition > length())
throw new IllegalArgumentException("Relative position outside this range (" + relativePosition + ").");
if (reversed)
return upper - relativePosition;
... | [
"public",
"int",
"convertBoundaryToAbsolutePosition",
"(",
"int",
"relativePosition",
")",
"{",
"if",
"(",
"relativePosition",
"<",
"0",
"||",
"relativePosition",
">",
"length",
"(",
")",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Relative position outsi... | Converts relative boundary position to absolute position
@param relativePosition relative boundary position
@return absolute point position | [
"Converts",
"relative",
"boundary",
"position",
"to",
"absolute",
"position"
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/Range.java#L379-L387 |
109,705 | aeshell/aesh-readline | terminal-telnet/src/main/java/org/aesh/terminal/telnet/TelnetConnection.java | TelnetConnection.write | public final void write(byte[] data) {
if (sendBinary) {
int prev = 0;
for (int i = 0;i < data.length;i++) {
if (data[i] == -1) {
rawWrite(data, prev, i - prev);
send(new byte[]{-1, -1});
prev = i + 1;
}
}
rawWrite(data, prev, data.length - prev)... | java | public final void write(byte[] data) {
if (sendBinary) {
int prev = 0;
for (int i = 0;i < data.length;i++) {
if (data[i] == -1) {
rawWrite(data, prev, i - prev);
send(new byte[]{-1, -1});
prev = i + 1;
}
}
rawWrite(data, prev, data.length - prev)... | [
"public",
"final",
"void",
"write",
"(",
"byte",
"[",
"]",
"data",
")",
"{",
"if",
"(",
"sendBinary",
")",
"{",
"int",
"prev",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"data",
".",
"length",
";",
"i",
"++",
")",
"{",
... | Write data to the client, escaping data if necessary or truncating it. The original buffer can
be mutated if incorrect data is provided.
@param data the data to write | [
"Write",
"data",
"to",
"the",
"client",
"escaping",
"data",
"if",
"necessary",
"or",
"truncating",
"it",
".",
"The",
"original",
"buffer",
"can",
"be",
"mutated",
"if",
"incorrect",
"data",
"is",
"provided",
"."
] | 3d7258f6490a422658ec85c8457514390c03232d | https://github.com/aeshell/aesh-readline/blob/3d7258f6490a422658ec85c8457514390c03232d/terminal-telnet/src/main/java/org/aesh/terminal/telnet/TelnetConnection.java#L122-L139 |
109,706 | aeshell/aesh-readline | readline/src/main/java/org/aesh/readline/history/FileHistory.java | FileHistory.readFile | private void readFile() {
if(historyFile.exists()) {
try (BufferedReader reader = new BufferedReader(new FileReader(historyFile))) {
String line;
while((line = reader.readLine()) != null)
push(Parser.toCodePoints(line));
} catch(FileNot... | java | private void readFile() {
if(historyFile.exists()) {
try (BufferedReader reader = new BufferedReader(new FileReader(historyFile))) {
String line;
while((line = reader.readLine()) != null)
push(Parser.toCodePoints(line));
} catch(FileNot... | [
"private",
"void",
"readFile",
"(",
")",
"{",
"if",
"(",
"historyFile",
".",
"exists",
"(",
")",
")",
"{",
"try",
"(",
"BufferedReader",
"reader",
"=",
"new",
"BufferedReader",
"(",
"new",
"FileReader",
"(",
"historyFile",
")",
")",
")",
"{",
"String",
... | Read specified history file to history buffer | [
"Read",
"specified",
"history",
"file",
"to",
"history",
"buffer"
] | 3d7258f6490a422658ec85c8457514390c03232d | https://github.com/aeshell/aesh-readline/blob/3d7258f6490a422658ec85c8457514390c03232d/readline/src/main/java/org/aesh/readline/history/FileHistory.java#L68-L81 |
109,707 | aeshell/aesh-readline | readline/src/main/java/org/aesh/readline/history/FileHistory.java | FileHistory.writeFile | private void writeFile() throws IOException {
historyFile.delete();
try (FileWriter fw = new FileWriter(historyFile)) {
for(int i=0; i < size();i++)
fw.write(Parser.fromCodePoints(get(i)) + (Config.getLineSeparator()));
}
if (historyFilePermission != null) {
... | java | private void writeFile() throws IOException {
historyFile.delete();
try (FileWriter fw = new FileWriter(historyFile)) {
for(int i=0; i < size();i++)
fw.write(Parser.fromCodePoints(get(i)) + (Config.getLineSeparator()));
}
if (historyFilePermission != null) {
... | [
"private",
"void",
"writeFile",
"(",
")",
"throws",
"IOException",
"{",
"historyFile",
".",
"delete",
"(",
")",
";",
"try",
"(",
"FileWriter",
"fw",
"=",
"new",
"FileWriter",
"(",
"historyFile",
")",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"... | Write the content of the history buffer to file
@throws IOException io | [
"Write",
"the",
"content",
"of",
"the",
"history",
"buffer",
"to",
"file"
] | 3d7258f6490a422658ec85c8457514390c03232d | https://github.com/aeshell/aesh-readline/blob/3d7258f6490a422658ec85c8457514390c03232d/readline/src/main/java/org/aesh/readline/history/FileHistory.java#L88-L103 |
109,708 | aeshell/aesh-readline | readline/src/main/java/org/aesh/readline/terminal/impl/WinSysTerminal.java | WinSysTerminal.setVTMode | private static boolean setVTMode() {
long console = GetStdHandle(STD_OUTPUT_HANDLE);
int[] mode = new int[1];
if (Kernel32.GetConsoleMode(console, mode) == 0) {
// No need to go further, not supported.
return false;
}
if (Kernel32.SetConsoleMode(console, m... | java | private static boolean setVTMode() {
long console = GetStdHandle(STD_OUTPUT_HANDLE);
int[] mode = new int[1];
if (Kernel32.GetConsoleMode(console, mode) == 0) {
// No need to go further, not supported.
return false;
}
if (Kernel32.SetConsoleMode(console, m... | [
"private",
"static",
"boolean",
"setVTMode",
"(",
")",
"{",
"long",
"console",
"=",
"GetStdHandle",
"(",
"STD_OUTPUT_HANDLE",
")",
";",
"int",
"[",
"]",
"mode",
"=",
"new",
"int",
"[",
"1",
"]",
";",
"if",
"(",
"Kernel32",
".",
"GetConsoleMode",
"(",
"... | This allows to take benefit from Windows 10+ new features. | [
"This",
"allows",
"to",
"take",
"benefit",
"from",
"Windows",
"10",
"+",
"new",
"features",
"."
] | 3d7258f6490a422658ec85c8457514390c03232d | https://github.com/aeshell/aesh-readline/blob/3d7258f6490a422658ec85c8457514390c03232d/readline/src/main/java/org/aesh/readline/terminal/impl/WinSysTerminal.java#L130-L143 |
109,709 | aeshell/aesh-readline | readline/src/main/java/org/aesh/readline/util/Parser.java | Parser.formatDisplayCompactListTerminalString | public static String formatDisplayCompactListTerminalString(List<TerminalString> displayList, int termWidth) {
if (displayList == null || displayList.size() < 1)
return "";
// make sure that termWidth is > 0
if (termWidth < 1)
termWidth = 80; // setting it to default
... | java | public static String formatDisplayCompactListTerminalString(List<TerminalString> displayList, int termWidth) {
if (displayList == null || displayList.size() < 1)
return "";
// make sure that termWidth is > 0
if (termWidth < 1)
termWidth = 80; // setting it to default
... | [
"public",
"static",
"String",
"formatDisplayCompactListTerminalString",
"(",
"List",
"<",
"TerminalString",
">",
"displayList",
",",
"int",
"termWidth",
")",
"{",
"if",
"(",
"displayList",
"==",
"null",
"||",
"displayList",
".",
"size",
"(",
")",
"<",
"1",
")"... | Format output to columns with flexible sizes and no redundant space between them
@param displayList to format
@param termWidth max width
@return formatted string to be outputted | [
"Format",
"output",
"to",
"columns",
"with",
"flexible",
"sizes",
"and",
"no",
"redundant",
"space",
"between",
"them"
] | 3d7258f6490a422658ec85c8457514390c03232d | https://github.com/aeshell/aesh-readline/blob/3d7258f6490a422658ec85c8457514390c03232d/readline/src/main/java/org/aesh/readline/util/Parser.java#L196-L242 |
109,710 | aeshell/aesh-readline | readline/src/main/java/org/aesh/readline/util/Parser.java | Parser.canDisplayColumns | private static boolean canDisplayColumns(List<TerminalString> displayList, int numRows, int terminalWidth) {
int numColumns = displayList.size() / numRows;
if (displayList.size() % numRows > 0) {
numColumns++;
}
int[] columnSizes = calculateColumnSizes(displayList, numColum... | java | private static boolean canDisplayColumns(List<TerminalString> displayList, int numRows, int terminalWidth) {
int numColumns = displayList.size() / numRows;
if (displayList.size() % numRows > 0) {
numColumns++;
}
int[] columnSizes = calculateColumnSizes(displayList, numColum... | [
"private",
"static",
"boolean",
"canDisplayColumns",
"(",
"List",
"<",
"TerminalString",
">",
"displayList",
",",
"int",
"numRows",
",",
"int",
"terminalWidth",
")",
"{",
"int",
"numColumns",
"=",
"displayList",
".",
"size",
"(",
")",
"/",
"numRows",
";",
"i... | Decides if it's possible to format provided Strings into calculated number of columns while the output will not exceed
terminal width
@param displayList
@param numRows
@param terminalWidth
@return true if it's possible to format strings to columns and false otherwise. | [
"Decides",
"if",
"it",
"s",
"possible",
"to",
"format",
"provided",
"Strings",
"into",
"calculated",
"number",
"of",
"columns",
"while",
"the",
"output",
"will",
"not",
"exceed",
"terminal",
"width"
] | 3d7258f6490a422658ec85c8457514390c03232d | https://github.com/aeshell/aesh-readline/blob/3d7258f6490a422658ec85c8457514390c03232d/readline/src/main/java/org/aesh/readline/util/Parser.java#L253-L267 |
109,711 | aeshell/aesh-readline | readline/src/main/java/org/aesh/readline/util/Parser.java | Parser.trimOptionName | public static String trimOptionName(String word) {
if (word.startsWith("--"))
return word.substring(2);
else if (word.startsWith("-"))
return word.substring(1);
else
return word;
} | java | public static String trimOptionName(String word) {
if (word.startsWith("--"))
return word.substring(2);
else if (word.startsWith("-"))
return word.substring(1);
else
return word;
} | [
"public",
"static",
"String",
"trimOptionName",
"(",
"String",
"word",
")",
"{",
"if",
"(",
"word",
".",
"startsWith",
"(",
"\"--\"",
")",
")",
"return",
"word",
".",
"substring",
"(",
"2",
")",
";",
"else",
"if",
"(",
"word",
".",
"startsWith",
"(",
... | remove leading dashes from word | [
"remove",
"leading",
"dashes",
"from",
"word"
] | 3d7258f6490a422658ec85c8457514390c03232d | https://github.com/aeshell/aesh-readline/blob/3d7258f6490a422658ec85c8457514390c03232d/readline/src/main/java/org/aesh/readline/util/Parser.java#L319-L326 |
109,712 | aeshell/aesh-readline | readline/src/main/java/org/aesh/readline/util/Parser.java | Parser.findStartsWithOperation | public static String findStartsWithOperation(List<? extends CompleteOperation> coList) {
List<String> tmpList = new ArrayList<>();
for (CompleteOperation co : coList) {
String s = findStartsWith(co.getFormattedCompletionCandidates());
if (s.length() > 0)
tmpList.a... | java | public static String findStartsWithOperation(List<? extends CompleteOperation> coList) {
List<String> tmpList = new ArrayList<>();
for (CompleteOperation co : coList) {
String s = findStartsWith(co.getFormattedCompletionCandidates());
if (s.length() > 0)
tmpList.a... | [
"public",
"static",
"String",
"findStartsWithOperation",
"(",
"List",
"<",
"?",
"extends",
"CompleteOperation",
">",
"coList",
")",
"{",
"List",
"<",
"String",
">",
"tmpList",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"CompleteOperation",
"co... | If there is any common start string in the completion list, return it
@param coList completion list
@return common start string | [
"If",
"there",
"is",
"any",
"common",
"start",
"string",
"in",
"the",
"completion",
"list",
"return",
"it"
] | 3d7258f6490a422658ec85c8457514390c03232d | https://github.com/aeshell/aesh-readline/blob/3d7258f6490a422658ec85c8457514390c03232d/readline/src/main/java/org/aesh/readline/util/Parser.java#L338-L348 |
109,713 | aeshell/aesh-readline | readline/src/main/java/org/aesh/readline/util/Parser.java | Parser.findCurrentWordFromCursor | public static String findCurrentWordFromCursor(String text, int cursor) {
if (text.length() <= cursor + 1) {
// return last word
if (text.contains(SPACE)) {
if (doWordContainEscapedSpace(text)) {
if (doWordContainOnlyEscapedSpace(text))
... | java | public static String findCurrentWordFromCursor(String text, int cursor) {
if (text.length() <= cursor + 1) {
// return last word
if (text.contains(SPACE)) {
if (doWordContainEscapedSpace(text)) {
if (doWordContainOnlyEscapedSpace(text))
... | [
"public",
"static",
"String",
"findCurrentWordFromCursor",
"(",
"String",
"text",
",",
"int",
"cursor",
")",
"{",
"if",
"(",
"text",
".",
"length",
"(",
")",
"<=",
"cursor",
"+",
"1",
")",
"{",
"// return last word",
"if",
"(",
"text",
".",
"contains",
"... | Return the word "connected" to cursor, the word ends at cursor position. Note that cursor position starts at 0
@param text to parse
@param cursor position
@return word connected to cursor | [
"Return",
"the",
"word",
"connected",
"to",
"cursor",
"the",
"word",
"ends",
"at",
"cursor",
"position",
".",
"Note",
"that",
"cursor",
"position",
"starts",
"at",
"0"
] | 3d7258f6490a422658ec85c8457514390c03232d | https://github.com/aeshell/aesh-readline/blob/3d7258f6490a422658ec85c8457514390c03232d/readline/src/main/java/org/aesh/readline/util/Parser.java#L470-L516 |
109,714 | aeshell/aesh-readline | readline/src/main/java/org/aesh/readline/util/Parser.java | Parser.findEscapedSpaceWordCloseToEnd | public static String findEscapedSpaceWordCloseToEnd(String text) {
int index;
String originalText = text;
while ((index = text.lastIndexOf(SPACE)) > -1) {
if (index > 0 && text.charAt(index - 1) == BACK_SLASH) {
text = text.substring(0, index - 1);
}
... | java | public static String findEscapedSpaceWordCloseToEnd(String text) {
int index;
String originalText = text;
while ((index = text.lastIndexOf(SPACE)) > -1) {
if (index > 0 && text.charAt(index - 1) == BACK_SLASH) {
text = text.substring(0, index - 1);
}
... | [
"public",
"static",
"String",
"findEscapedSpaceWordCloseToEnd",
"(",
"String",
"text",
")",
"{",
"int",
"index",
";",
"String",
"originalText",
"=",
"text",
";",
"while",
"(",
"(",
"index",
"=",
"text",
".",
"lastIndexOf",
"(",
"SPACE",
")",
")",
">",
"-",... | Search backwards for a non-escaped space and only return work containing non-escaped space
@param text text
@return text with only non-escaped space | [
"Search",
"backwards",
"for",
"a",
"non",
"-",
"escaped",
"space",
"and",
"only",
"return",
"work",
"containing",
"non",
"-",
"escaped",
"space"
] | 3d7258f6490a422658ec85c8457514390c03232d | https://github.com/aeshell/aesh-readline/blob/3d7258f6490a422658ec85c8457514390c03232d/readline/src/main/java/org/aesh/readline/util/Parser.java#L524-L535 |
109,715 | aeshell/aesh-readline | readline/src/main/java/org/aesh/readline/util/Parser.java | Parser.doesStringContainOpenQuote | public static boolean doesStringContainOpenQuote(String text) {
boolean doubleQuote = false;
boolean singleQuote = false;
boolean escapedByBackSlash = false;
// do not parse comment
if (commentPattern.matcher(text).find())
return false;
for (int i = 0; i < te... | java | public static boolean doesStringContainOpenQuote(String text) {
boolean doubleQuote = false;
boolean singleQuote = false;
boolean escapedByBackSlash = false;
// do not parse comment
if (commentPattern.matcher(text).find())
return false;
for (int i = 0; i < te... | [
"public",
"static",
"boolean",
"doesStringContainOpenQuote",
"(",
"String",
"text",
")",
"{",
"boolean",
"doubleQuote",
"=",
"false",
";",
"boolean",
"singleQuote",
"=",
"false",
";",
"boolean",
"escapedByBackSlash",
"=",
"false",
";",
"// do not parse comment",
"if... | Check if a string contain openBlocking quotes. Escaped quotes does not count.
@param text text
@return true if it contains openBlocking quotes, else false | [
"Check",
"if",
"a",
"string",
"contain",
"openBlocking",
"quotes",
".",
"Escaped",
"quotes",
"does",
"not",
"count",
"."
] | 3d7258f6490a422658ec85c8457514390c03232d | https://github.com/aeshell/aesh-readline/blob/3d7258f6490a422658ec85c8457514390c03232d/readline/src/main/java/org/aesh/readline/util/Parser.java#L543-L566 |
109,716 | aeshell/aesh-readline | readline/src/main/java/org/aesh/readline/util/Parser.java | Parser.findNumberOfSpacesInWord | public static int findNumberOfSpacesInWord(String word) {
int count = 0;
for (int i = 0; i < word.length(); i++)
if (word.charAt(i) == SPACE_CHAR && (i == 0 || word.charAt(i - 1) != BACK_SLASH))
count++;
return count;
} | java | public static int findNumberOfSpacesInWord(String word) {
int count = 0;
for (int i = 0; i < word.length(); i++)
if (word.charAt(i) == SPACE_CHAR && (i == 0 || word.charAt(i - 1) != BACK_SLASH))
count++;
return count;
} | [
"public",
"static",
"int",
"findNumberOfSpacesInWord",
"(",
"String",
"word",
")",
"{",
"int",
"count",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"word",
".",
"length",
"(",
")",
";",
"i",
"++",
")",
"if",
"(",
"word",
".",
... | find number of spaces in the given word. escaped spaces are not counted
@param word to check
@return number of spaces | [
"find",
"number",
"of",
"spaces",
"in",
"the",
"given",
"word",
".",
"escaped",
"spaces",
"are",
"not",
"counted"
] | 3d7258f6490a422658ec85c8457514390c03232d | https://github.com/aeshell/aesh-readline/blob/3d7258f6490a422658ec85c8457514390c03232d/readline/src/main/java/org/aesh/readline/util/Parser.java#L582-L589 |
109,717 | aeshell/aesh-readline | readline/src/main/java/org/aesh/readline/util/Parser.java | Parser.trimInFront | public static String trimInFront(String buffer) {
// remove spaces in front
int count = 0;
for (int i = 0; i < buffer.length(); i++) {
if (buffer.charAt(i) == SPACE_CHAR)
count++;
else
break;
}
if (count > 0)
ret... | java | public static String trimInFront(String buffer) {
// remove spaces in front
int count = 0;
for (int i = 0; i < buffer.length(); i++) {
if (buffer.charAt(i) == SPACE_CHAR)
count++;
else
break;
}
if (count > 0)
ret... | [
"public",
"static",
"String",
"trimInFront",
"(",
"String",
"buffer",
")",
"{",
"// remove spaces in front",
"int",
"count",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"buffer",
".",
"length",
"(",
")",
";",
"i",
"++",
")",
"{",
... | Only trim space in front of the word
@param buffer input
@return trimmed buffer | [
"Only",
"trim",
"space",
"in",
"front",
"of",
"the",
"word"
] | 3d7258f6490a422658ec85c8457514390c03232d | https://github.com/aeshell/aesh-readline/blob/3d7258f6490a422658ec85c8457514390c03232d/readline/src/main/java/org/aesh/readline/util/Parser.java#L658-L671 |
109,718 | aeshell/aesh-readline | readline/src/main/java/org/aesh/readline/editing/InputrcParser.java | InputrcParser.mapQuoteKeys | public static int[] mapQuoteKeys(String keys) {
if(keys != null && keys.length() > 1)
return mapKeys(keys.substring(1));
else
return null;
} | java | public static int[] mapQuoteKeys(String keys) {
if(keys != null && keys.length() > 1)
return mapKeys(keys.substring(1));
else
return null;
} | [
"public",
"static",
"int",
"[",
"]",
"mapQuoteKeys",
"(",
"String",
"keys",
")",
"{",
"if",
"(",
"keys",
"!=",
"null",
"&&",
"keys",
".",
"length",
"(",
")",
">",
"1",
")",
"return",
"mapKeys",
"(",
"keys",
".",
"substring",
"(",
"1",
")",
")",
"... | Parse key mapping lines that start with "
@param keys that need mapping
@return int[] value of keys | [
"Parse",
"key",
"mapping",
"lines",
"that",
"start",
"with"
] | 3d7258f6490a422658ec85c8457514390c03232d | https://github.com/aeshell/aesh-readline/blob/3d7258f6490a422658ec85c8457514390c03232d/readline/src/main/java/org/aesh/readline/editing/InputrcParser.java#L199-L204 |
109,719 | aeshell/aesh-readline | terminal-api/src/main/java/org/aesh/utils/ANSI.java | ANSI.printAnsi | public static int[] printAnsi(char... out) {
int[] ansi = new int[out.length+2];
ansi[0] = 27;
ansi[1] = '[';
int counter = 0;
for (char anOut : out) {
if (anOut == '\t') {
Arrays.fill(ansi, counter + 2, counter + 2 + TAB, ' ');
counter... | java | public static int[] printAnsi(char... out) {
int[] ansi = new int[out.length+2];
ansi[0] = 27;
ansi[1] = '[';
int counter = 0;
for (char anOut : out) {
if (anOut == '\t') {
Arrays.fill(ansi, counter + 2, counter + 2 + TAB, ' ');
counter... | [
"public",
"static",
"int",
"[",
"]",
"printAnsi",
"(",
"char",
"...",
"out",
")",
"{",
"int",
"[",
"]",
"ansi",
"=",
"new",
"int",
"[",
"out",
".",
"length",
"+",
"2",
"]",
";",
"ansi",
"[",
"0",
"]",
"=",
"27",
";",
"ansi",
"[",
"1",
"]",
... | Return a ansified string based on param
@param out what will be ansified
@return ansified string | [
"Return",
"a",
"ansified",
"string",
"based",
"on",
"param"
] | 3d7258f6490a422658ec85c8457514390c03232d | https://github.com/aeshell/aesh-readline/blob/3d7258f6490a422658ec85c8457514390c03232d/terminal-api/src/main/java/org/aesh/utils/ANSI.java#L111-L127 |
109,720 | osglworks/java-di | src/main/java/org/osgl/inject/util/AnnotationUtil.java | AnnotationUtil.createAnnotation | @SuppressWarnings("unchecked")
public static <T extends Annotation> T createAnnotation(final Class<T> clazz) {
return (T) Proxy.newProxyInstance(clazz.getClassLoader(), new Class[]{clazz, Annotation.class}, new SimpleAnnoInvocationHandler(clazz));
} | java | @SuppressWarnings("unchecked")
public static <T extends Annotation> T createAnnotation(final Class<T> clazz) {
return (T) Proxy.newProxyInstance(clazz.getClassLoader(), new Class[]{clazz, Annotation.class}, new SimpleAnnoInvocationHandler(clazz));
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"T",
"extends",
"Annotation",
">",
"T",
"createAnnotation",
"(",
"final",
"Class",
"<",
"T",
">",
"clazz",
")",
"{",
"return",
"(",
"T",
")",
"Proxy",
".",
"newProxyInstance",
"("... | Create an annotation instance from annotation class.
@param clazz
the annotation class
@param <T>
the generic type of the annoation
@return
the annotation instance | [
"Create",
"an",
"annotation",
"instance",
"from",
"annotation",
"class",
"."
] | d89871c62ff508733bfa645425596f6c917fd7ee | https://github.com/osglworks/java-di/blob/d89871c62ff508733bfa645425596f6c917fd7ee/src/main/java/org/osgl/inject/util/AnnotationUtil.java#L95-L98 |
109,721 | osglworks/java-di | src/main/java/org/osgl/inject/util/AnnotationUtil.java | AnnotationUtil.hashMember | static int hashMember(String name, Object value) {
int part1 = name.hashCode() * 127;
if (value.getClass().isArray()) {
return part1 ^ arrayMemberHash(value.getClass().getComponentType(), value);
}
if (value instanceof Annotation) {
return part1 ^ hashCode((Annota... | java | static int hashMember(String name, Object value) {
int part1 = name.hashCode() * 127;
if (value.getClass().isArray()) {
return part1 ^ arrayMemberHash(value.getClass().getComponentType(), value);
}
if (value instanceof Annotation) {
return part1 ^ hashCode((Annota... | [
"static",
"int",
"hashMember",
"(",
"String",
"name",
",",
"Object",
"value",
")",
"{",
"int",
"part1",
"=",
"name",
".",
"hashCode",
"(",
")",
"*",
"127",
";",
"if",
"(",
"value",
".",
"getClass",
"(",
")",
".",
"isArray",
"(",
")",
")",
"{",
"r... | Helper method for generating a hash code for a member of an annotation.
@param name
the name of the member
@param value
the value of the member
@return
a hash code for this member | [
"Helper",
"method",
"for",
"generating",
"a",
"hash",
"code",
"for",
"a",
"member",
"of",
"an",
"annotation",
"."
] | d89871c62ff508733bfa645425596f6c917fd7ee | https://github.com/osglworks/java-di/blob/d89871c62ff508733bfa645425596f6c917fd7ee/src/main/java/org/osgl/inject/util/AnnotationUtil.java#L144-L153 |
109,722 | osglworks/java-di | src/main/java/org/osgl/inject/BeanSpec.java | BeanSpec.beanSpecOf | private BeanSpec beanSpecOf(Field field, Type genericType) {
return of(field, genericType, injector);
// int len = typeArgs.size();
// for (int i = 0; i < len; ++i) {
// if (genericType.equals(typeArgs.get(i))) {
// return of(field, typeImpls.get(i), injector());
// ... | java | private BeanSpec beanSpecOf(Field field, Type genericType) {
return of(field, genericType, injector);
// int len = typeArgs.size();
// for (int i = 0; i < len; ++i) {
// if (genericType.equals(typeArgs.get(i))) {
// return of(field, typeImpls.get(i), injector());
// ... | [
"private",
"BeanSpec",
"beanSpecOf",
"(",
"Field",
"field",
",",
"Type",
"genericType",
")",
"{",
"return",
"of",
"(",
"field",
",",
"genericType",
",",
"injector",
")",
";",
"// int len = typeArgs.size();",
"// for (int i = 0; i < len; ++i) {",
"// ... | find the beanspec of a field with generic type | [
"find",
"the",
"beanspec",
"of",
"a",
"field",
"with",
"generic",
"type"
] | d89871c62ff508733bfa645425596f6c917fd7ee | https://github.com/osglworks/java-di/blob/d89871c62ff508733bfa645425596f6c917fd7ee/src/main/java/org/osgl/inject/BeanSpec.java#L707-L716 |
109,723 | osglworks/java-di | src/main/java/org/osgl/inject/BeanSpec.java | BeanSpec.storeTagAnnotation | private void storeTagAnnotation(Annotation anno) {
Class<? extends Annotation> annoType = anno.annotationType();
Annotation[] tags = annoType.getAnnotations();
for (Annotation tag : tags) {
Class<? extends Annotation> tagType = tag.annotationType();
if (WAIVE_TAG_TYPES.co... | java | private void storeTagAnnotation(Annotation anno) {
Class<? extends Annotation> annoType = anno.annotationType();
Annotation[] tags = annoType.getAnnotations();
for (Annotation tag : tags) {
Class<? extends Annotation> tagType = tag.annotationType();
if (WAIVE_TAG_TYPES.co... | [
"private",
"void",
"storeTagAnnotation",
"(",
"Annotation",
"anno",
")",
"{",
"Class",
"<",
"?",
"extends",
"Annotation",
">",
"annoType",
"=",
"anno",
".",
"annotationType",
"(",
")",
";",
"Annotation",
"[",
"]",
"tags",
"=",
"annoType",
".",
"getAnnotation... | Walk through anno's tag annotations
@param anno
the annotation | [
"Walk",
"through",
"anno",
"s",
"tag",
"annotations"
] | d89871c62ff508733bfa645425596f6c917fd7ee | https://github.com/osglworks/java-di/blob/d89871c62ff508733bfa645425596f6c917fd7ee/src/main/java/org/osgl/inject/BeanSpec.java#L923-L938 |
109,724 | att/openstacksdk | openstack-java-sdk/openstack-client/src/main/java/com/woorea/openstack/base/client/OpenStackRequest.java | OpenStackRequest.queryString | public OpenStackRequest<R> queryString(String queryString) {
if (queryString != null) {
String[] params = queryString.split("&");
for (String param : params) {
String[] s = param.split("=");
if (s[0] != null && s[1] != null) {
queryPara... | java | public OpenStackRequest<R> queryString(String queryString) {
if (queryString != null) {
String[] params = queryString.split("&");
for (String param : params) {
String[] s = param.split("=");
if (s[0] != null && s[1] != null) {
queryPara... | [
"public",
"OpenStackRequest",
"<",
"R",
">",
"queryString",
"(",
"String",
"queryString",
")",
"{",
"if",
"(",
"queryString",
"!=",
"null",
")",
"{",
"String",
"[",
"]",
"params",
"=",
"queryString",
".",
"split",
"(",
"\"&\"",
")",
";",
"for",
"(",
"S... | This method will parse the query string which is a collection of name value pairs and put then in queryParam hash
map
@param queryString
The query string to be parsed
@return The request object | [
"This",
"method",
"will",
"parse",
"the",
"query",
"string",
"which",
"is",
"a",
"collection",
"of",
"name",
"value",
"pairs",
"and",
"put",
"then",
"in",
"queryParam",
"hash",
"map"
] | 16a81c460a7186ebe1ea63b7682486ba147208b9 | https://github.com/att/openstacksdk/blob/16a81c460a7186ebe1ea63b7682486ba147208b9/openstack-java-sdk/openstack-client/src/main/java/com/woorea/openstack/base/client/OpenStackRequest.java#L192-L203 |
109,725 | att/openstacksdk | openstack-java-sdk/nova-client/src/main/java/com/woorea/openstack/nova/api/ServersResource.java | ServersResource.evacuate | public EvacuateAction evacuate(String serverId, String host) {
return evacuate(serverId, host, null, null);
} | java | public EvacuateAction evacuate(String serverId, String host) {
return evacuate(serverId, host, null, null);
} | [
"public",
"EvacuateAction",
"evacuate",
"(",
"String",
"serverId",
",",
"String",
"host",
")",
"{",
"return",
"evacuate",
"(",
"serverId",
",",
"host",
",",
"null",
",",
"null",
")",
";",
"}"
] | Evacuates the server to a new host. The caller can supply the host name or id.
@param serverId
The server to be evacuated
@param host
The host name or ID of the target host (where the server is to be moved to).
@return The action to be performed
@see #evacuate(String, String, String, Boolean) | [
"Evacuates",
"the",
"server",
"to",
"a",
"new",
"host",
".",
"The",
"caller",
"can",
"supply",
"the",
"host",
"name",
"or",
"id",
"."
] | 16a81c460a7186ebe1ea63b7682486ba147208b9 | https://github.com/att/openstacksdk/blob/16a81c460a7186ebe1ea63b7682486ba147208b9/openstack-java-sdk/nova-client/src/main/java/com/woorea/openstack/nova/api/ServersResource.java#L635-L637 |
109,726 | att/openstacksdk | openstack-java-sdk/openstack-client-connectors/jersey-connector/src/main/java/com/woorea/openstack/connector/JerseyConnector.java | JerseyConnector.getSSLContext | private SSLContext getSSLContext() throws NoSuchAlgorithmException, KeyManagementException {
SSLContext sslContext = SSLContext.getInstance("SSL");
sslContext.init(null, new TrustManager[] {
new X509TrustManager() {
@Override
public void checkClientTrusted(X50... | java | private SSLContext getSSLContext() throws NoSuchAlgorithmException, KeyManagementException {
SSLContext sslContext = SSLContext.getInstance("SSL");
sslContext.init(null, new TrustManager[] {
new X509TrustManager() {
@Override
public void checkClientTrusted(X50... | [
"private",
"SSLContext",
"getSSLContext",
"(",
")",
"throws",
"NoSuchAlgorithmException",
",",
"KeyManagementException",
"{",
"SSLContext",
"sslContext",
"=",
"SSLContext",
".",
"getInstance",
"(",
"\"SSL\"",
")",
";",
"sslContext",
".",
"init",
"(",
"null",
",",
... | This SSLContext is used only when the protocol is HTTPS AND a trusted hosts list has been provided. In that case,
this SSLContext accepts all certificates, whether they are expired or not, and regardless of the CA that issued
them.
@return An SSL context that does not validate certificates
@throws NoSuchAlgorithmExcep... | [
"This",
"SSLContext",
"is",
"used",
"only",
"when",
"the",
"protocol",
"is",
"HTTPS",
"AND",
"a",
"trusted",
"hosts",
"list",
"has",
"been",
"provided",
".",
"In",
"that",
"case",
"this",
"SSLContext",
"accepts",
"all",
"certificates",
"whether",
"they",
"ar... | 16a81c460a7186ebe1ea63b7682486ba147208b9 | https://github.com/att/openstacksdk/blob/16a81c460a7186ebe1ea63b7682486ba147208b9/openstack-java-sdk/openstack-client-connectors/jersey-connector/src/main/java/com/woorea/openstack/connector/JerseyConnector.java#L335-L356 |
109,727 | KostyaSha/yet-another-docker-plugin | yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/DockerSlaveTemplate.java | DockerSlaveTemplate.getRetentionStrategyCopy | public RetentionStrategy getRetentionStrategyCopy() {
if (retentionStrategy instanceof DockerOnceRetentionStrategy) {
DockerOnceRetentionStrategy onceRetention = (DockerOnceRetentionStrategy) retentionStrategy;
return new DockerOnceRetentionStrategy(onceRetention.getIdleMinutes());
... | java | public RetentionStrategy getRetentionStrategyCopy() {
if (retentionStrategy instanceof DockerOnceRetentionStrategy) {
DockerOnceRetentionStrategy onceRetention = (DockerOnceRetentionStrategy) retentionStrategy;
return new DockerOnceRetentionStrategy(onceRetention.getIdleMinutes());
... | [
"public",
"RetentionStrategy",
"getRetentionStrategyCopy",
"(",
")",
"{",
"if",
"(",
"retentionStrategy",
"instanceof",
"DockerOnceRetentionStrategy",
")",
"{",
"DockerOnceRetentionStrategy",
"onceRetention",
"=",
"(",
"DockerOnceRetentionStrategy",
")",
"retentionStrategy",
... | tmp fix for terminating boolean caching | [
"tmp",
"fix",
"for",
"terminating",
"boolean",
"caching"
] | 40b12e39ff94c3834cff7e028c3dd01c88e87d77 | https://github.com/KostyaSha/yet-another-docker-plugin/blob/40b12e39ff94c3834cff7e028c3dd01c88e87d77/yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/DockerSlaveTemplate.java#L96-L102 |
109,728 | KostyaSha/yet-another-docker-plugin | yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/DockerSlaveTemplate.java | DockerSlaveTemplate.readResolve | @SuppressWarnings("unused")
public Object readResolve() {
if (configVersion < 1) {
if (isNull(nodeProperties)) nodeProperties = new ArrayList<>();
nodeProperties.add(new DockerNodeProperty("DOCKER_CONTAINER_ID", "JENKINS_CLOUD_ID", "DOCKER_HOST"));
configVersion = 1;
... | java | @SuppressWarnings("unused")
public Object readResolve() {
if (configVersion < 1) {
if (isNull(nodeProperties)) nodeProperties = new ArrayList<>();
nodeProperties.add(new DockerNodeProperty("DOCKER_CONTAINER_ID", "JENKINS_CLOUD_ID", "DOCKER_HOST"));
configVersion = 1;
... | [
"@",
"SuppressWarnings",
"(",
"\"unused\"",
")",
"public",
"Object",
"readResolve",
"(",
")",
"{",
"if",
"(",
"configVersion",
"<",
"1",
")",
"{",
"if",
"(",
"isNull",
"(",
"nodeProperties",
")",
")",
"nodeProperties",
"=",
"new",
"ArrayList",
"<>",
"(",
... | Initializes data structure that we don't persist. | [
"Initializes",
"data",
"structure",
"that",
"we",
"don",
"t",
"persist",
"."
] | 40b12e39ff94c3834cff7e028c3dd01c88e87d77 | https://github.com/KostyaSha/yet-another-docker-plugin/blob/40b12e39ff94c3834cff7e028c3dd01c88e87d77/yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/DockerSlaveTemplate.java#L126-L150 |
109,729 | KostyaSha/yet-another-docker-plugin | yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/launcher/DockerComputerJNLPLauncher.java | DockerComputerJNLPLauncher.getPreparedLauncher | @Override
public DockerComputerLauncher getPreparedLauncher(String cloudId, DockerSlaveTemplate template,
InspectContainerResponse containerInspectResponse) {
final DockerComputerJNLPLauncher cloneJNLPlauncher = new DockerComputerJNLPLauncher();
clone... | java | @Override
public DockerComputerLauncher getPreparedLauncher(String cloudId, DockerSlaveTemplate template,
InspectContainerResponse containerInspectResponse) {
final DockerComputerJNLPLauncher cloneJNLPlauncher = new DockerComputerJNLPLauncher();
clone... | [
"@",
"Override",
"public",
"DockerComputerLauncher",
"getPreparedLauncher",
"(",
"String",
"cloudId",
",",
"DockerSlaveTemplate",
"template",
",",
"InspectContainerResponse",
"containerInspectResponse",
")",
"{",
"final",
"DockerComputerJNLPLauncher",
"cloneJNLPlauncher",
"=",
... | Clone object. | [
"Clone",
"object",
"."
] | 40b12e39ff94c3834cff7e028c3dd01c88e87d77 | https://github.com/KostyaSha/yet-another-docker-plugin/blob/40b12e39ff94c3834cff7e028c3dd01c88e87d77/yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/launcher/DockerComputerJNLPLauncher.java#L320-L334 |
109,730 | KostyaSha/yet-another-docker-plugin | yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/DockerCloud.java | DockerCloud.runContainer | public String runContainer(DockerSlaveTemplate slaveTemplate) throws DockerException, IOException {
final DockerCreateContainer dockerCreateContainer = slaveTemplate.getDockerContainerLifecycle().getCreateContainer();
final String image = slaveTemplate.getDockerContainerLifecycle().getImage();
... | java | public String runContainer(DockerSlaveTemplate slaveTemplate) throws DockerException, IOException {
final DockerCreateContainer dockerCreateContainer = slaveTemplate.getDockerContainerLifecycle().getCreateContainer();
final String image = slaveTemplate.getDockerContainerLifecycle().getImage();
... | [
"public",
"String",
"runContainer",
"(",
"DockerSlaveTemplate",
"slaveTemplate",
")",
"throws",
"DockerException",
",",
"IOException",
"{",
"final",
"DockerCreateContainer",
"dockerCreateContainer",
"=",
"slaveTemplate",
".",
"getDockerContainerLifecycle",
"(",
")",
".",
... | Run docker container for given template
@return container id | [
"Run",
"docker",
"container",
"for",
"given",
"template"
] | 40b12e39ff94c3834cff7e028c3dd01c88e87d77 | https://github.com/KostyaSha/yet-another-docker-plugin/blob/40b12e39ff94c3834cff7e028c3dd01c88e87d77/yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/DockerCloud.java#L161-L203 |
109,731 | KostyaSha/yet-another-docker-plugin | yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/DockerCloud.java | DockerCloud.appendContainerConfig | private void appendContainerConfig(DockerSlaveTemplate slaveTemplate, CreateContainerCmd containerConfig) {
Map<String, String> labels = containerConfig.getLabels();
if (labels == null) labels = new HashMap<>();
labels.put(DOCKER_CLOUD_LABEL, getDisplayName());
labels.put(DOCKER_TEMPLAT... | java | private void appendContainerConfig(DockerSlaveTemplate slaveTemplate, CreateContainerCmd containerConfig) {
Map<String, String> labels = containerConfig.getLabels();
if (labels == null) labels = new HashMap<>();
labels.put(DOCKER_CLOUD_LABEL, getDisplayName());
labels.put(DOCKER_TEMPLAT... | [
"private",
"void",
"appendContainerConfig",
"(",
"DockerSlaveTemplate",
"slaveTemplate",
",",
"CreateContainerCmd",
"containerConfig",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"labels",
"=",
"containerConfig",
".",
"getLabels",
"(",
")",
";",
"if",
"(",... | Cloud specific container config options | [
"Cloud",
"specific",
"container",
"config",
"options"
] | 40b12e39ff94c3834cff7e028c3dd01c88e87d77 | https://github.com/KostyaSha/yet-another-docker-plugin/blob/40b12e39ff94c3834cff7e028c3dd01c88e87d77/yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/DockerCloud.java#L209-L217 |
109,732 | KostyaSha/yet-another-docker-plugin | yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/DockerCloud.java | DockerCloud.determineOsType | private OsType determineOsType(String imageId) {
InspectImageResponse ir = getClient().inspectImageCmd(imageId).exec();
if ("linux".equalsIgnoreCase(ir.getOs())) {
LOG.trace("Detected LINUX operating system for image: {}", imageId);
return OsType.LINUX;
} else if ("window... | java | private OsType determineOsType(String imageId) {
InspectImageResponse ir = getClient().inspectImageCmd(imageId).exec();
if ("linux".equalsIgnoreCase(ir.getOs())) {
LOG.trace("Detected LINUX operating system for image: {}", imageId);
return OsType.LINUX;
} else if ("window... | [
"private",
"OsType",
"determineOsType",
"(",
"String",
"imageId",
")",
"{",
"InspectImageResponse",
"ir",
"=",
"getClient",
"(",
")",
".",
"inspectImageCmd",
"(",
"imageId",
")",
".",
"exec",
"(",
")",
";",
"if",
"(",
"\"linux\"",
".",
"equalsIgnoreCase",
"(... | Determine the operating system associated with an image. | [
"Determine",
"the",
"operating",
"system",
"associated",
"with",
"an",
"image",
"."
] | 40b12e39ff94c3834cff7e028c3dd01c88e87d77 | https://github.com/KostyaSha/yet-another-docker-plugin/blob/40b12e39ff94c3834cff7e028c3dd01c88e87d77/yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/DockerCloud.java#L272-L284 |
109,733 | KostyaSha/yet-another-docker-plugin | yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/DockerCloud.java | DockerCloud.countCurrentDockerSlaves | public int countCurrentDockerSlaves(final DockerSlaveTemplate template) throws Exception {
int count = 0;
List<Container> containers = getClient().listContainersCmd().exec();
for (Container container : containers) {
final Map<String, String> labels = container.getLabels();
... | java | public int countCurrentDockerSlaves(final DockerSlaveTemplate template) throws Exception {
int count = 0;
List<Container> containers = getClient().listContainersCmd().exec();
for (Container container : containers) {
final Map<String, String> labels = container.getLabels();
... | [
"public",
"int",
"countCurrentDockerSlaves",
"(",
"final",
"DockerSlaveTemplate",
"template",
")",
"throws",
"Exception",
"{",
"int",
"count",
"=",
"0",
";",
"List",
"<",
"Container",
">",
"containers",
"=",
"getClient",
"(",
")",
".",
"listContainersCmd",
"(",
... | Counts the number of instances in Docker currently running that are using the specified template.
@param template If null, then all instances are counted. | [
"Counts",
"the",
"number",
"of",
"instances",
"in",
"Docker",
"currently",
"running",
"that",
"are",
"using",
"the",
"specified",
"template",
"."
] | 40b12e39ff94c3834cff7e028c3dd01c88e87d77 | https://github.com/KostyaSha/yet-another-docker-plugin/blob/40b12e39ff94c3834cff7e028c3dd01c88e87d77/yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/DockerCloud.java#L291-L310 |
109,734 | KostyaSha/yet-another-docker-plugin | yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/DockerCloud.java | DockerCloud.addProvisionedSlave | private synchronized boolean addProvisionedSlave(DockerSlaveTemplate template) throws Exception {
final DockerContainerLifecycle dockerCreateContainer = template.getDockerContainerLifecycle();
String dockerImageName = dockerCreateContainer.getImage();
int templateCapacity = template.getMaxCapaci... | java | private synchronized boolean addProvisionedSlave(DockerSlaveTemplate template) throws Exception {
final DockerContainerLifecycle dockerCreateContainer = template.getDockerContainerLifecycle();
String dockerImageName = dockerCreateContainer.getImage();
int templateCapacity = template.getMaxCapaci... | [
"private",
"synchronized",
"boolean",
"addProvisionedSlave",
"(",
"DockerSlaveTemplate",
"template",
")",
"throws",
"Exception",
"{",
"final",
"DockerContainerLifecycle",
"dockerCreateContainer",
"=",
"template",
".",
"getDockerContainerLifecycle",
"(",
")",
";",
"String",
... | Check not too many already running. | [
"Check",
"not",
"too",
"many",
"already",
"running",
"."
] | 40b12e39ff94c3834cff7e028c3dd01c88e87d77 | https://github.com/KostyaSha/yet-another-docker-plugin/blob/40b12e39ff94c3834cff7e028c3dd01c88e87d77/yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/DockerCloud.java#L315-L353 |
109,735 | KostyaSha/yet-another-docker-plugin | yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/utils/DockerFunctions.java | DockerFunctions.getDockerComputerLauncherDescriptors | public static List<Descriptor<ComputerLauncher>> getDockerComputerLauncherDescriptors() {
List<Descriptor<ComputerLauncher>> launchers = new ArrayList<>();
launchers.add(getInstance().getDescriptor(DockerComputerSSHLauncher.class));
launchers.add(getInstance().getDescriptor(DockerComputerJNLPLa... | java | public static List<Descriptor<ComputerLauncher>> getDockerComputerLauncherDescriptors() {
List<Descriptor<ComputerLauncher>> launchers = new ArrayList<>();
launchers.add(getInstance().getDescriptor(DockerComputerSSHLauncher.class));
launchers.add(getInstance().getDescriptor(DockerComputerJNLPLa... | [
"public",
"static",
"List",
"<",
"Descriptor",
"<",
"ComputerLauncher",
">",
">",
"getDockerComputerLauncherDescriptors",
"(",
")",
"{",
"List",
"<",
"Descriptor",
"<",
"ComputerLauncher",
">>",
"launchers",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"launche... | Only this plugin specific launchers. | [
"Only",
"this",
"plugin",
"specific",
"launchers",
"."
] | 40b12e39ff94c3834cff7e028c3dd01c88e87d77 | https://github.com/KostyaSha/yet-another-docker-plugin/blob/40b12e39ff94c3834cff7e028c3dd01c88e87d77/yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/utils/DockerFunctions.java#L58-L66 |
109,736 | KostyaSha/yet-another-docker-plugin | yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/utils/DockerFunctions.java | DockerFunctions.getDockerRetentionStrategyDescriptors | public static List<Descriptor<RetentionStrategy<?>>> getDockerRetentionStrategyDescriptors() {
List<Descriptor<RetentionStrategy<?>>> strategies = new ArrayList<>();
strategies.add(getInstance().getDescriptor(DockerOnceRetentionStrategy.class));
strategies.add(getInstance().getDescriptor(Docker... | java | public static List<Descriptor<RetentionStrategy<?>>> getDockerRetentionStrategyDescriptors() {
List<Descriptor<RetentionStrategy<?>>> strategies = new ArrayList<>();
strategies.add(getInstance().getDescriptor(DockerOnceRetentionStrategy.class));
strategies.add(getInstance().getDescriptor(Docker... | [
"public",
"static",
"List",
"<",
"Descriptor",
"<",
"RetentionStrategy",
"<",
"?",
">",
">",
">",
"getDockerRetentionStrategyDescriptors",
"(",
")",
"{",
"List",
"<",
"Descriptor",
"<",
"RetentionStrategy",
"<",
"?",
">",
">",
">",
"strategies",
"=",
"new",
... | Only this plugin specific strategies. | [
"Only",
"this",
"plugin",
"specific",
"strategies",
"."
] | 40b12e39ff94c3834cff7e028c3dd01c88e87d77 | https://github.com/KostyaSha/yet-another-docker-plugin/blob/40b12e39ff94c3834cff7e028c3dd01c88e87d77/yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/utils/DockerFunctions.java#L71-L79 |
109,737 | KostyaSha/yet-another-docker-plugin | yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/utils/DockerFunctions.java | DockerFunctions.getAllDockerClouds | @Nonnull
public static List<DockerCloud> getAllDockerClouds() {
return getInstance().clouds.stream()
.filter(Objects::nonNull)
.filter(DockerCloud.class::isInstance)
.map(cloud -> (DockerCloud) cloud)
.collect(Collectors.toList());
} | java | @Nonnull
public static List<DockerCloud> getAllDockerClouds() {
return getInstance().clouds.stream()
.filter(Objects::nonNull)
.filter(DockerCloud.class::isInstance)
.map(cloud -> (DockerCloud) cloud)
.collect(Collectors.toList());
} | [
"@",
"Nonnull",
"public",
"static",
"List",
"<",
"DockerCloud",
">",
"getAllDockerClouds",
"(",
")",
"{",
"return",
"getInstance",
"(",
")",
".",
"clouds",
".",
"stream",
"(",
")",
".",
"filter",
"(",
"Objects",
"::",
"nonNull",
")",
".",
"filter",
"(",
... | Get the list of Docker servers.
@return the list as a LinkedList of DockerCloud | [
"Get",
"the",
"list",
"of",
"Docker",
"servers",
"."
] | 40b12e39ff94c3834cff7e028c3dd01c88e87d77 | https://github.com/KostyaSha/yet-another-docker-plugin/blob/40b12e39ff94c3834cff7e028c3dd01c88e87d77/yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/utils/DockerFunctions.java#L87-L94 |
109,738 | KostyaSha/yet-another-docker-plugin | yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/commons/DockerContainerRestartPolicy.java | DockerContainerRestartPolicy.getRestartPolicy | @CheckForNull
public RestartPolicy getRestartPolicy() {
if (isNull(policyName)) return null;
return RestartPolicy.parse(String.format("%s:%d",
policyName.toString().toLowerCase(Locale.ENGLISH).replace("_", "-"), getMaximumRetryCount()));
} | java | @CheckForNull
public RestartPolicy getRestartPolicy() {
if (isNull(policyName)) return null;
return RestartPolicy.parse(String.format("%s:%d",
policyName.toString().toLowerCase(Locale.ENGLISH).replace("_", "-"), getMaximumRetryCount()));
} | [
"@",
"CheckForNull",
"public",
"RestartPolicy",
"getRestartPolicy",
"(",
")",
"{",
"if",
"(",
"isNull",
"(",
"policyName",
")",
")",
"return",
"null",
";",
"return",
"RestartPolicy",
".",
"parse",
"(",
"String",
".",
"format",
"(",
"\"%s:%d\"",
",",
"policyN... | runtime ABI dependency on docker-java | [
"runtime",
"ABI",
"dependency",
"on",
"docker",
"-",
"java"
] | 40b12e39ff94c3834cff7e028c3dd01c88e87d77 | https://github.com/KostyaSha/yet-another-docker-plugin/blob/40b12e39ff94c3834cff7e028c3dd01c88e87d77/yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/commons/DockerContainerRestartPolicy.java#L60-L66 |
109,739 | KostyaSha/yet-another-docker-plugin | yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/utils/VariableUtils.java | VariableUtils.resolveVar | public static String resolveVar(String var, Run run, TaskListener taskListener) {
String resolvedVar = var;
try {
final EnvVars envVars = run.getEnvironment(taskListener);
resolvedVar = envVars.expand(var);
} catch (IOException | InterruptedException e) {
LOG.... | java | public static String resolveVar(String var, Run run, TaskListener taskListener) {
String resolvedVar = var;
try {
final EnvVars envVars = run.getEnvironment(taskListener);
resolvedVar = envVars.expand(var);
} catch (IOException | InterruptedException e) {
LOG.... | [
"public",
"static",
"String",
"resolveVar",
"(",
"String",
"var",
",",
"Run",
"run",
",",
"TaskListener",
"taskListener",
")",
"{",
"String",
"resolvedVar",
"=",
"var",
";",
"try",
"{",
"final",
"EnvVars",
"envVars",
"=",
"run",
".",
"getEnvironment",
"(",
... | Resolve on remoting side during execution.
Because node may have some specific node vars. | [
"Resolve",
"on",
"remoting",
"side",
"during",
"execution",
".",
"Because",
"node",
"may",
"have",
"some",
"specific",
"node",
"vars",
"."
] | 40b12e39ff94c3834cff7e028c3dd01c88e87d77 | https://github.com/KostyaSha/yet-another-docker-plugin/blob/40b12e39ff94c3834cff7e028c3dd01c88e87d77/yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/utils/VariableUtils.java#L24-L33 |
109,740 | KostyaSha/yet-another-docker-plugin | yet-another-docker-its/src/main/java/hudson/cli/DockerCLI.java | DockerCLI.getCliTcpPort | protected CliPort getCliTcpPort(String jenkinsAddr) throws IOException {
URL jenkinsUrl = new URL(jenkinsAddr);
if (jenkinsUrl.getHost() == null || jenkinsUrl.getHost().length() == 0) {
throw new IOException("Invalid URL: " + jenkinsAddr);
}
URLConnection head = jenkinsUrl.op... | java | protected CliPort getCliTcpPort(String jenkinsAddr) throws IOException {
URL jenkinsUrl = new URL(jenkinsAddr);
if (jenkinsUrl.getHost() == null || jenkinsUrl.getHost().length() == 0) {
throw new IOException("Invalid URL: " + jenkinsAddr);
}
URLConnection head = jenkinsUrl.op... | [
"protected",
"CliPort",
"getCliTcpPort",
"(",
"String",
"jenkinsAddr",
")",
"throws",
"IOException",
"{",
"URL",
"jenkinsUrl",
"=",
"new",
"URL",
"(",
"jenkinsAddr",
")",
";",
"if",
"(",
"jenkinsUrl",
".",
"getHost",
"(",
")",
"==",
"null",
"||",
"jenkinsUrl... | If the server advertises CLI endpoint, returns its location. | [
"If",
"the",
"server",
"advertises",
"CLI",
"endpoint",
"returns",
"its",
"location",
"."
] | 40b12e39ff94c3834cff7e028c3dd01c88e87d77 | https://github.com/KostyaSha/yet-another-docker-plugin/blob/40b12e39ff94c3834cff7e028c3dd01c88e87d77/yet-another-docker-its/src/main/java/hudson/cli/DockerCLI.java#L178-L198 |
109,741 | KostyaSha/yet-another-docker-plugin | yet-another-docker-its/src/main/java/hudson/cli/DockerCLI.java | DockerCLI.close | public void close() throws IOException, InterruptedException {
channel.close();
channel.join();
if (ownsPool)
pool.shutdown();
for (Closeable c : closables)
c.close();
} | java | public void close() throws IOException, InterruptedException {
channel.close();
channel.join();
if (ownsPool)
pool.shutdown();
for (Closeable c : closables)
c.close();
} | [
"public",
"void",
"close",
"(",
")",
"throws",
"IOException",
",",
"InterruptedException",
"{",
"channel",
".",
"close",
"(",
")",
";",
"channel",
".",
"join",
"(",
")",
";",
"if",
"(",
"ownsPool",
")",
"pool",
".",
"shutdown",
"(",
")",
";",
"for",
... | Shuts down the channel and closes the underlying connection. | [
"Shuts",
"down",
"the",
"channel",
"and",
"closes",
"the",
"underlying",
"connection",
"."
] | 40b12e39ff94c3834cff7e028c3dd01c88e87d77 | https://github.com/KostyaSha/yet-another-docker-plugin/blob/40b12e39ff94c3834cff7e028c3dd01c88e87d77/yet-another-docker-its/src/main/java/hudson/cli/DockerCLI.java#L232-L239 |
109,742 | KostyaSha/yet-another-docker-plugin | yet-another-docker-its/src/main/java/hudson/cli/DockerCLI.java | DockerCLI.upgrade | public void upgrade() {
ByteArrayOutputStream out = new ByteArrayOutputStream();
if (execute(Arrays.asList("groovy", "="),
new ByteArrayInputStream(
"hudson.remoting.Channel.current().setRestricted(false)"
.getBytes(defaultCharset()... | java | public void upgrade() {
ByteArrayOutputStream out = new ByteArrayOutputStream();
if (execute(Arrays.asList("groovy", "="),
new ByteArrayInputStream(
"hudson.remoting.Channel.current().setRestricted(false)"
.getBytes(defaultCharset()... | [
"public",
"void",
"upgrade",
"(",
")",
"{",
"ByteArrayOutputStream",
"out",
"=",
"new",
"ByteArrayOutputStream",
"(",
")",
";",
"if",
"(",
"execute",
"(",
"Arrays",
".",
"asList",
"(",
"\"groovy\"",
",",
"\"=\"",
")",
",",
"new",
"ByteArrayInputStream",
"(",... | Attempts to lift the security restriction on the underlying channel.
This requires the administer privilege on the server.
@throws SecurityException If we fail to upgrade the connection. | [
"Attempts",
"to",
"lift",
"the",
"security",
"restriction",
"on",
"the",
"underlying",
"channel",
".",
"This",
"requires",
"the",
"administer",
"privilege",
"on",
"the",
"server",
"."
] | 40b12e39ff94c3834cff7e028c3dd01c88e87d77 | https://github.com/KostyaSha/yet-another-docker-plugin/blob/40b12e39ff94c3834cff7e028c3dd01c88e87d77/yet-another-docker-its/src/main/java/hudson/cli/DockerCLI.java#L258-L267 |
109,743 | KostyaSha/yet-another-docker-plugin | yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/steps/DockerShellStep.java | DockerShellStep.getEnvVars | protected static EnvVars getEnvVars(Run run, TaskListener listener) throws IOException, InterruptedException {
final EnvVars envVars = run.getCharacteristicEnvVars();
// from run.getEnvironment(listener) but without computer vars
for (EnvironmentContributor ec : EnvironmentContributor.all().rev... | java | protected static EnvVars getEnvVars(Run run, TaskListener listener) throws IOException, InterruptedException {
final EnvVars envVars = run.getCharacteristicEnvVars();
// from run.getEnvironment(listener) but without computer vars
for (EnvironmentContributor ec : EnvironmentContributor.all().rev... | [
"protected",
"static",
"EnvVars",
"getEnvVars",
"(",
"Run",
"run",
",",
"TaskListener",
"listener",
")",
"throws",
"IOException",
",",
"InterruptedException",
"{",
"final",
"EnvVars",
"envVars",
"=",
"run",
".",
"getCharacteristicEnvVars",
"(",
")",
";",
"// from ... | Return all job related vars without executor vars.
I.e. slave is running in osx, but docker image for shell is linux. | [
"Return",
"all",
"job",
"related",
"vars",
"without",
"executor",
"vars",
".",
"I",
".",
"e",
".",
"slave",
"is",
"running",
"in",
"osx",
"but",
"docker",
"image",
"for",
"shell",
"is",
"linux",
"."
] | 40b12e39ff94c3834cff7e028c3dd01c88e87d77 | https://github.com/KostyaSha/yet-another-docker-plugin/blob/40b12e39ff94c3834cff7e028c3dd01c88e87d77/yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/steps/DockerShellStep.java#L306-L334 |
109,744 | KostyaSha/yet-another-docker-plugin | yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/steps/DockerShellStep.java | DockerShellStep.insertLabels | protected static void insertLabels(CreateContainerCmd containerConfig, Run run) {
// add tags
Map<String, String> labels = containerConfig.getLabels();
if (labels == null) labels = new HashMap<>();
labels.put("YAD_PLUGIN", DockerShellStep.class.getName());
labels.put("JENKINS_JO... | java | protected static void insertLabels(CreateContainerCmd containerConfig, Run run) {
// add tags
Map<String, String> labels = containerConfig.getLabels();
if (labels == null) labels = new HashMap<>();
labels.put("YAD_PLUGIN", DockerShellStep.class.getName());
labels.put("JENKINS_JO... | [
"protected",
"static",
"void",
"insertLabels",
"(",
"CreateContainerCmd",
"containerConfig",
",",
"Run",
"run",
")",
"{",
"// add tags",
"Map",
"<",
"String",
",",
"String",
">",
"labels",
"=",
"containerConfig",
".",
"getLabels",
"(",
")",
";",
"if",
"(",
"... | Append some tags to identify who created this container. | [
"Append",
"some",
"tags",
"to",
"identify",
"who",
"created",
"this",
"container",
"."
] | 40b12e39ff94c3834cff7e028c3dd01c88e87d77 | https://github.com/KostyaSha/yet-another-docker-plugin/blob/40b12e39ff94c3834cff7e028c3dd01c88e87d77/yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/steps/DockerShellStep.java#L339-L350 |
109,745 | KostyaSha/yet-another-docker-plugin | yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/DockerProvisioningStrategy.java | DockerProvisioningStrategy.setEnabled | public void setEnabled(boolean enabled) {
final ExtensionList<NodeProvisioner.Strategy> strategies = lookup(NodeProvisioner.Strategy.class);
DockerProvisioningStrategy strategy = strategies.get(DockerProvisioningStrategy.class);
if (isNull(strategy)) {
LOG.debug("YAD strategy was nu... | java | public void setEnabled(boolean enabled) {
final ExtensionList<NodeProvisioner.Strategy> strategies = lookup(NodeProvisioner.Strategy.class);
DockerProvisioningStrategy strategy = strategies.get(DockerProvisioningStrategy.class);
if (isNull(strategy)) {
LOG.debug("YAD strategy was nu... | [
"public",
"void",
"setEnabled",
"(",
"boolean",
"enabled",
")",
"{",
"final",
"ExtensionList",
"<",
"NodeProvisioner",
".",
"Strategy",
">",
"strategies",
"=",
"lookup",
"(",
"NodeProvisioner",
".",
"Strategy",
".",
"class",
")",
";",
"DockerProvisioningStrategy",... | For groovy. | [
"For",
"groovy",
"."
] | 40b12e39ff94c3834cff7e028c3dd01c88e87d77 | https://github.com/KostyaSha/yet-another-docker-plugin/blob/40b12e39ff94c3834cff7e028c3dd01c88e87d77/yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/DockerProvisioningStrategy.java#L38-L52 |
109,746 | OpenLiberty/open-liberty | dev/com.ibm.ws.jca.management.j2ee/src/com/ibm/ws/jca/management/j2ee/internal/JCAResourceMBeanImpl.java | JCAResourceMBeanImpl.setConnectionFactoryChild | protected JCAConnectionFactoryMBeanImpl setConnectionFactoryChild(String key, JCAConnectionFactoryMBeanImpl cf) {
return cfMBeanChildrenList.put(key, cf);
} | java | protected JCAConnectionFactoryMBeanImpl setConnectionFactoryChild(String key, JCAConnectionFactoryMBeanImpl cf) {
return cfMBeanChildrenList.put(key, cf);
} | [
"protected",
"JCAConnectionFactoryMBeanImpl",
"setConnectionFactoryChild",
"(",
"String",
"key",
",",
"JCAConnectionFactoryMBeanImpl",
"cf",
")",
"{",
"return",
"cfMBeanChildrenList",
".",
"put",
"(",
"key",
",",
"cf",
")",
";",
"}"
] | setConnectionFactoryChild add a child of type JCAConnectionFactoryMBeanImpl to this MBean.
@param key the String value which will be used as the key for the JCAConnectionFactoryMBeanImpl item
@param cf the JCAConnectionFactoryMBeanImpl value to be associated with the specified key
@return The previous value associated... | [
"setConnectionFactoryChild",
"add",
"a",
"child",
"of",
"type",
"JCAConnectionFactoryMBeanImpl",
"to",
"this",
"MBean",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.management.j2ee/src/com/ibm/ws/jca/management/j2ee/internal/JCAResourceMBeanImpl.java#L243-L245 |
109,747 | OpenLiberty/open-liberty | dev/com.ibm.ws.security.jaas.common/src/com/ibm/ws/security/jaas/config/internal/ConfigFile.java | ConfigFile.getAppConfigurationEntry | AppConfigurationEntry[] getAppConfigurationEntry(String config)
{
Vector entry = null;
if ((_fileMap != null) && (_fileMap.size() != 0)) {
entry = (Vector) _fileMap.get(config);
}
if (entry == null || entry.size() == 0)
{
return null;
}
... | java | AppConfigurationEntry[] getAppConfigurationEntry(String config)
{
Vector entry = null;
if ((_fileMap != null) && (_fileMap.size() != 0)) {
entry = (Vector) _fileMap.get(config);
}
if (entry == null || entry.size() == 0)
{
return null;
}
... | [
"AppConfigurationEntry",
"[",
"]",
"getAppConfigurationEntry",
"(",
"String",
"config",
")",
"{",
"Vector",
"entry",
"=",
"null",
";",
"if",
"(",
"(",
"_fileMap",
"!=",
"null",
")",
"&&",
"(",
"_fileMap",
".",
"size",
"(",
")",
"!=",
"0",
")",
")",
"{"... | This method returns an AppConfigurationEntry from internal storage based on the input key or alias.
@param config String that is used as the key or alias to fetch AppConfigurationEntry information for.
@return The AppConfigurationEntry for the supplied alias.
@see com.ibm.ws.security.auth.login.Configuration
@see java... | [
"This",
"method",
"returns",
"an",
"AppConfigurationEntry",
"from",
"internal",
"storage",
"based",
"on",
"the",
"input",
"key",
"or",
"alias",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.jaas.common/src/com/ibm/ws/security/jaas/config/internal/ConfigFile.java#L89-L110 |
109,748 | OpenLiberty/open-liberty | dev/com.ibm.ws.collector/src/com/ibm/ws/collector/Collector.java | Collector.validateTags | private static void validateTags(String[] tagList, ArrayList<String> validList, ArrayList<String> invalidList) {
for (String tag : tagList) {
tag = tag.trim();
if (tag.contains("\\") || tag.contains(" ") || tag.contains("\n") || tag.contains("-") || tag.equals("")) {
inva... | java | private static void validateTags(String[] tagList, ArrayList<String> validList, ArrayList<String> invalidList) {
for (String tag : tagList) {
tag = tag.trim();
if (tag.contains("\\") || tag.contains(" ") || tag.contains("\n") || tag.contains("-") || tag.equals("")) {
inva... | [
"private",
"static",
"void",
"validateTags",
"(",
"String",
"[",
"]",
"tagList",
",",
"ArrayList",
"<",
"String",
">",
"validList",
",",
"ArrayList",
"<",
"String",
">",
"invalidList",
")",
"{",
"for",
"(",
"String",
"tag",
":",
"tagList",
")",
"{",
"tag... | Filter out tags with escaping characters and invalid characters, restrict to only alphabetical and numeric characters
@param tagList
@return | [
"Filter",
"out",
"tags",
"with",
"escaping",
"characters",
"and",
"invalid",
"characters",
"restrict",
"to",
"only",
"alphabetical",
"and",
"numeric",
"characters"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.collector/src/com/ibm/ws/collector/Collector.java#L279-L288 |
109,749 | OpenLiberty/open-liberty | dev/com.ibm.ws.collector/src/com/ibm/ws/collector/Collector.java | Collector.init | @Override
public void init(CollectorManager collectorManager) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
Tr.event(tc, "Subscribing to sources " + this, taskMap.keySet());
}
try {
this.collectorMgr = collectorManager;
//Get the sou... | java | @Override
public void init(CollectorManager collectorManager) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
Tr.event(tc, "Subscribing to sources " + this, taskMap.keySet());
}
try {
this.collectorMgr = collectorManager;
//Get the sou... | [
"@",
"Override",
"public",
"void",
"init",
"(",
"CollectorManager",
"collectorManager",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEventEnabled",
"(",
")",
")",
"{",
"Tr",
".",
"event",
"(",
"tc",
",",
... | Methods from the collector manager handler interface | [
"Methods",
"from",
"the",
"collector",
"manager",
"handler",
"interface"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.collector/src/com/ibm/ws/collector/Collector.java#L311-L325 |
109,750 | OpenLiberty/open-liberty | dev/com.ibm.ws.jsp/src/com/ibm/ws/jsp/webcontainerext/AbstractJSPExtensionServletWrapper.java | AbstractJSPExtensionServletWrapper.isAvailable | public boolean isAvailable() {
boolean available = false;
String relativeURL = inputSource.getRelativeURL();
Container container = tcontext.getServletContext().getModuleContainer();
if (container!=null) {
if (options.isDisableJspRuntimeCompilation() == false) {
... | java | public boolean isAvailable() {
boolean available = false;
String relativeURL = inputSource.getRelativeURL();
Container container = tcontext.getServletContext().getModuleContainer();
if (container!=null) {
if (options.isDisableJspRuntimeCompilation() == false) {
... | [
"public",
"boolean",
"isAvailable",
"(",
")",
"{",
"boolean",
"available",
"=",
"false",
";",
"String",
"relativeURL",
"=",
"inputSource",
".",
"getRelativeURL",
"(",
")",
";",
"Container",
"container",
"=",
"tcontext",
".",
"getServletContext",
"(",
")",
".",... | Defect 268176.1 | [
"Defect",
"268176",
".",
"1"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsp/src/com/ibm/ws/jsp/webcontainerext/AbstractJSPExtensionServletWrapper.java#L747-L781 |
109,751 | OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpFactoryConfig.java | HttpFactoryConfig.parseMsgSize | private void parseMsgSize(Map<Object, Object> props) {
String value = (String) props.get(HttpConfigConstants.PROPNAME_MSG_SIZE_LIMIT);
if (null != value) {
try {
this.msgSizeLimit = Long.parseLong(value);
if (HttpConfigConstants.UNLIMITED > getMessageSize()) {... | java | private void parseMsgSize(Map<Object, Object> props) {
String value = (String) props.get(HttpConfigConstants.PROPNAME_MSG_SIZE_LIMIT);
if (null != value) {
try {
this.msgSizeLimit = Long.parseLong(value);
if (HttpConfigConstants.UNLIMITED > getMessageSize()) {... | [
"private",
"void",
"parseMsgSize",
"(",
"Map",
"<",
"Object",
",",
"Object",
">",
"props",
")",
"{",
"String",
"value",
"=",
"(",
"String",
")",
"props",
".",
"get",
"(",
"HttpConfigConstants",
".",
"PROPNAME_MSG_SIZE_LIMIT",
")",
";",
"if",
"(",
"null",
... | Parse the standard limit on an incoming message size.
@param props | [
"Parse",
"the",
"standard",
"limit",
"on",
"an",
"incoming",
"message",
"size",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpFactoryConfig.java#L52-L70 |
109,752 | OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpFactoryConfig.java | HttpFactoryConfig.parseMsgLargeBuffer | private void parseMsgLargeBuffer(Map<Object, Object> props) {
if (!areMessagesLimited()) {
// if there isn't a standard size limit, ignore this extension to
// that config option
return;
}
String value = (String) props.get(HttpConfigConstants.PROPNAME_MSG_SIZE... | java | private void parseMsgLargeBuffer(Map<Object, Object> props) {
if (!areMessagesLimited()) {
// if there isn't a standard size limit, ignore this extension to
// that config option
return;
}
String value = (String) props.get(HttpConfigConstants.PROPNAME_MSG_SIZE... | [
"private",
"void",
"parseMsgLargeBuffer",
"(",
"Map",
"<",
"Object",
",",
"Object",
">",
"props",
")",
"{",
"if",
"(",
"!",
"areMessagesLimited",
"(",
")",
")",
"{",
"// if there isn't a standard size limit, ignore this extension to",
"// that config option",
"return",
... | Parse the single larger buffer size that is allowed to reach beyond the
standard buffer size
@param props | [
"Parse",
"the",
"single",
"larger",
"buffer",
"size",
"that",
"is",
"allowed",
"to",
"reach",
"beyond",
"the",
"standard",
"buffer",
"size"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpFactoryConfig.java#L96-L120 |
109,753 | OpenLiberty/open-liberty | dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/passivator/EJBObjectInfo.java | EJBObjectInfo.addFieldInfo | void addFieldInfo(String className, List<FieldInfo> fieldInfoList) {
if (ivFieldInfoMap == null) {
ivFieldInfoMap = new HashMap<String, List<FieldInfo>>();
}
ivFieldInfoMap.put(className, fieldInfoList);
} | java | void addFieldInfo(String className, List<FieldInfo> fieldInfoList) {
if (ivFieldInfoMap == null) {
ivFieldInfoMap = new HashMap<String, List<FieldInfo>>();
}
ivFieldInfoMap.put(className, fieldInfoList);
} | [
"void",
"addFieldInfo",
"(",
"String",
"className",
",",
"List",
"<",
"FieldInfo",
">",
"fieldInfoList",
")",
"{",
"if",
"(",
"ivFieldInfoMap",
"==",
"null",
")",
"{",
"ivFieldInfoMap",
"=",
"new",
"HashMap",
"<",
"String",
",",
"List",
"<",
"FieldInfo",
"... | Adds the className and fieldInfoList to the ivFieldInfoMap.
@param className
@param fieldInfoList | [
"Adds",
"the",
"className",
"and",
"fieldInfoList",
"to",
"the",
"ivFieldInfoMap",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/passivator/EJBObjectInfo.java#L76-L81 |
109,754 | OpenLiberty/open-liberty | dev/com.ibm.ws.tx.embeddable/src/com/ibm/tx/jta/embeddable/impl/EmbeddableFailureScopeController.java | EmbeddableFailureScopeController.createRecoveryManager | @Override
public void createRecoveryManager(RecoveryAgent agent, RecoveryLog tranLog, RecoveryLog xaLog, RecoveryLog recoverXaLog, byte[] defaultApplId, int defaultEpoch) {
if (tc.isEntryEnabled())
Tr.entry(tc, "createRecoveryManager", new Object[] { this, agent, tranLog, xaLog, recoverXaLog, de... | java | @Override
public void createRecoveryManager(RecoveryAgent agent, RecoveryLog tranLog, RecoveryLog xaLog, RecoveryLog recoverXaLog, byte[] defaultApplId, int defaultEpoch) {
if (tc.isEntryEnabled())
Tr.entry(tc, "createRecoveryManager", new Object[] { this, agent, tranLog, xaLog, recoverXaLog, de... | [
"@",
"Override",
"public",
"void",
"createRecoveryManager",
"(",
"RecoveryAgent",
"agent",
",",
"RecoveryLog",
"tranLog",
",",
"RecoveryLog",
"xaLog",
",",
"RecoveryLog",
"recoverXaLog",
",",
"byte",
"[",
"]",
"defaultApplId",
",",
"int",
"defaultEpoch",
")",
"{",... | Creates a RecoveryManager object instance and associates it with this FailureScopeController
The recovery manager handles recovery processing on behalf of the managed failure scope.
@return String The new RecoveryManager instance. | [
"Creates",
"a",
"RecoveryManager",
"object",
"instance",
"and",
"associates",
"it",
"with",
"this",
"FailureScopeController",
"The",
"recovery",
"manager",
"handles",
"recovery",
"processing",
"on",
"behalf",
"of",
"the",
"managed",
"failure",
"scope",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.tx.embeddable/src/com/ibm/tx/jta/embeddable/impl/EmbeddableFailureScopeController.java#L40-L52 |
109,755 | OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/destination/AbstractProtoRealization.java | AbstractProtoRealization.setToBeDeleted | public void setToBeDeleted()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "setToBeDeleted");
// Tell the remote code the destination is to be deleted
if (_remoteSupport != null)
_remoteSupport.setToBeDeleted();
if (TraceComponent.isAnyTracin... | java | public void setToBeDeleted()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "setToBeDeleted");
// Tell the remote code the destination is to be deleted
if (_remoteSupport != null)
_remoteSupport.setToBeDeleted();
if (TraceComponent.isAnyTracin... | [
"public",
"void",
"setToBeDeleted",
"(",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"tc",
",",
"\"setToBeDeleted\"",
")",
";",
"// Tell the remote... | Method to indicate the destination is to be deleted. | [
"Method",
"to",
"indicate",
"the",
"destination",
"is",
"to",
"be",
"deleted",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/destination/AbstractProtoRealization.java#L414-L426 |
109,756 | OpenLiberty/open-liberty | dev/com.ibm.ws.security.jaspic/src/com/ibm/ws/security/jaspi/AuthConfigFactoryWrapper.java | AuthConfigFactoryWrapper.setFactoryImplementation | synchronized static void setFactoryImplementation() {
if (initialized)
return;
initialized = true;
String authConfigProvider = Security.getProperty(AuthConfigFactory.DEFAULT_FACTORY_SECURITY_PROPERTY);
if (authConfigProvider == null || authConfigProvider.isEmpty()) {
... | java | synchronized static void setFactoryImplementation() {
if (initialized)
return;
initialized = true;
String authConfigProvider = Security.getProperty(AuthConfigFactory.DEFAULT_FACTORY_SECURITY_PROPERTY);
if (authConfigProvider == null || authConfigProvider.isEmpty()) {
... | [
"synchronized",
"static",
"void",
"setFactoryImplementation",
"(",
")",
"{",
"if",
"(",
"initialized",
")",
"return",
";",
"initialized",
"=",
"true",
";",
"String",
"authConfigProvider",
"=",
"Security",
".",
"getProperty",
"(",
"AuthConfigFactory",
".",
"DEFAULT... | Make sure we don't dump multiple messages to the logs by only
initializing once. | [
"Make",
"sure",
"we",
"don",
"t",
"dump",
"multiple",
"messages",
"to",
"the",
"logs",
"by",
"only",
"initializing",
"once",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.jaspic/src/com/ibm/ws/security/jaspi/AuthConfigFactoryWrapper.java#L52-L63 |
109,757 | OpenLiberty/open-liberty | dev/com.ibm.ws.javaee.ddmodel/src/com/ibm/ws/javaee/ddmodel/DDParser.java | DDParser.getValidEnumConstants | private <T extends Enum<T>> Object[] getValidEnumConstants(Class<T> valueClass) {
T[] constants = valueClass.getEnumConstants();
if (!VersionedEnum.class.isAssignableFrom(valueClass)) {
return constants;
}
List<T> valid = new ArrayList<T>(constants.length);
for (T va... | java | private <T extends Enum<T>> Object[] getValidEnumConstants(Class<T> valueClass) {
T[] constants = valueClass.getEnumConstants();
if (!VersionedEnum.class.isAssignableFrom(valueClass)) {
return constants;
}
List<T> valid = new ArrayList<T>(constants.length);
for (T va... | [
"private",
"<",
"T",
"extends",
"Enum",
"<",
"T",
">",
">",
"Object",
"[",
"]",
"getValidEnumConstants",
"(",
"Class",
"<",
"T",
">",
"valueClass",
")",
"{",
"T",
"[",
"]",
"constants",
"=",
"valueClass",
".",
"getEnumConstants",
"(",
")",
";",
"if",
... | Return an array of the constants for the enum that are valid based on the
version of this parser. | [
"Return",
"an",
"array",
"of",
"the",
"constants",
"for",
"the",
"enum",
"that",
"are",
"valid",
"based",
"on",
"the",
"version",
"of",
"this",
"parser",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.javaee.ddmodel/src/com/ibm/ws/javaee/ddmodel/DDParser.java#L755-L770 |
109,758 | OpenLiberty/open-liberty | dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/WebProviderAuthenticatorProxy.java | WebProviderAuthenticatorProxy.getSSOAuthenticator | public WebAuthenticator getSSOAuthenticator(WebRequest webRequest, String ssoCookieName) {
SecurityMetadata securityMetadata = webRequest.getSecurityMetadata();
SecurityService securityService = securityServiceRef.getService();
SSOCookieHelper cookieHelper;
if (ssoCookieName != null) {
... | java | public WebAuthenticator getSSOAuthenticator(WebRequest webRequest, String ssoCookieName) {
SecurityMetadata securityMetadata = webRequest.getSecurityMetadata();
SecurityService securityService = securityServiceRef.getService();
SSOCookieHelper cookieHelper;
if (ssoCookieName != null) {
... | [
"public",
"WebAuthenticator",
"getSSOAuthenticator",
"(",
"WebRequest",
"webRequest",
",",
"String",
"ssoCookieName",
")",
"{",
"SecurityMetadata",
"securityMetadata",
"=",
"webRequest",
".",
"getSecurityMetadata",
"(",
")",
";",
"SecurityService",
"securityService",
"=",... | Create an instance of SSOAuthenticator.
@param webRequest
@return The SSOAuthenticator, or {@code null} if it could not be created. | [
"Create",
"an",
"instance",
"of",
"SSOAuthenticator",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/WebProviderAuthenticatorProxy.java#L387-L397 |
109,759 | OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.utils/src/com/ibm/ws/sib/utils/ras/AbstractForAWhileSuppressor.java | AbstractForAWhileSuppressor.initProperties | private void initProperties(int interval)
{
// Limit to 1 .. MAXIMUM_INTERVAL
if (interval > MAXIMUM_INTERVAL) interval = MAXIMUM_INTERVAL;
if (interval < 1) interval = 1;
_interval = interval;
} | java | private void initProperties(int interval)
{
// Limit to 1 .. MAXIMUM_INTERVAL
if (interval > MAXIMUM_INTERVAL) interval = MAXIMUM_INTERVAL;
if (interval < 1) interval = 1;
_interval = interval;
} | [
"private",
"void",
"initProperties",
"(",
"int",
"interval",
")",
"{",
"// Limit to 1 .. MAXIMUM_INTERVAL",
"if",
"(",
"interval",
">",
"MAXIMUM_INTERVAL",
")",
"interval",
"=",
"MAXIMUM_INTERVAL",
";",
"if",
"(",
"interval",
"<",
"1",
")",
"interval",
"=",
"1",... | Initialize this instance of an AbstractForAWhileSuppressor.
@param interval How long "a while" is (measured in minutes) | [
"Initialize",
"this",
"instance",
"of",
"an",
"AbstractForAWhileSuppressor",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.utils/src/com/ibm/ws/sib/utils/ras/AbstractForAWhileSuppressor.java#L75-L81 |
109,760 | OpenLiberty/open-liberty | dev/com.ibm.ws.container.service.compat/src/com/ibm/ws/util/FileSystem.java | FileSystem.uriCaseCheck | public static boolean uriCaseCheck(File file, String matchString) throws java.io.IOException {
if (isCaseInsensitive || isWindows) { // security measure to ensure that this check is only performed on case
// sensitive servers
// begin 154268
matchString = WSUtil.resolveURI(... | java | public static boolean uriCaseCheck(File file, String matchString) throws java.io.IOException {
if (isCaseInsensitive || isWindows) { // security measure to ensure that this check is only performed on case
// sensitive servers
// begin 154268
matchString = WSUtil.resolveURI(... | [
"public",
"static",
"boolean",
"uriCaseCheck",
"(",
"File",
"file",
",",
"String",
"matchString",
")",
"throws",
"java",
".",
"io",
".",
"IOException",
"{",
"if",
"(",
"isCaseInsensitive",
"||",
"isWindows",
")",
"{",
"// security measure to ensure that this check i... | Not a problem on UNIX type systems since the OS handles is case sensitive. | [
"Not",
"a",
"problem",
"on",
"UNIX",
"type",
"systems",
"since",
"the",
"OS",
"handles",
"is",
"case",
"sensitive",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.container.service.compat/src/com/ibm/ws/util/FileSystem.java#L35-L66 |
109,761 | OpenLiberty/open-liberty | dev/com.ibm.ws.jsf.2.2/src/com/ibm/ws/jsf/spi/WASInjectionProvider.java | WASInjectionProvider.inject | public Object inject(Class Klass, boolean doPostConstruct) throws InjectionProviderException {
return inject(Klass,doPostConstruct,(ExternalContext)null);
} | java | public Object inject(Class Klass, boolean doPostConstruct) throws InjectionProviderException {
return inject(Klass,doPostConstruct,(ExternalContext)null);
} | [
"public",
"Object",
"inject",
"(",
"Class",
"Klass",
",",
"boolean",
"doPostConstruct",
")",
"throws",
"InjectionProviderException",
"{",
"return",
"inject",
"(",
"Klass",
",",
"doPostConstruct",
",",
"(",
"ExternalContext",
")",
"null",
")",
";",
"}"
] | CDI 1.2 injection based on a Class. CDI will create the object instance which allows
for constructor Injection.
@param Klass - class of object to be created
@param doPostConstruct - boolean indicates whether or not to perform post construct
@return instance of ManagedObject which contains the instance of Klass.
@throws... | [
"CDI",
"1",
".",
"2",
"injection",
"based",
"on",
"a",
"Class",
".",
"CDI",
"will",
"create",
"the",
"object",
"instance",
"which",
"allows",
"for",
"constructor",
"Injection",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/com/ibm/ws/jsf/spi/WASInjectionProvider.java#L48-L50 |
109,762 | OpenLiberty/open-liberty | dev/com.ibm.ws.channelfw/src/com/ibm/io/async/CompletionKey.java | CompletionKey.destroy | protected void destroy() {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "CompletionKey::destroy entered for:" + this);
}
// Free existing ByteBuffer objects.
if (this.rawData != null) {
if (this.wsByteBuf != null) {
... | java | protected void destroy() {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "CompletionKey::destroy entered for:" + this);
}
// Free existing ByteBuffer objects.
if (this.rawData != null) {
if (this.wsByteBuf != null) {
... | [
"protected",
"void",
"destroy",
"(",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"Tr",
".",
"debug",
"(",
"tc",
",",
"\"CompletionKey::destroy entered for:\"",
"+",
"this... | Cleanup resources held by CompletionKey | [
"Cleanup",
"resources",
"held",
"by",
"CompletionKey"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/io/async/CompletionKey.java#L147-L162 |
109,763 | OpenLiberty/open-liberty | dev/com.ibm.ws.channelfw/src/com/ibm/io/async/CompletionKey.java | CompletionKey.setBuffer | public void setBuffer(long address, long length, int index) {
if ((index < 0) || (index >= this.bufferCount)) {
throw new IllegalArgumentException();
}
this.stagingByteBuffer.putLong((FIRST_BUFFER_INDEX + (2 * index)) * 8, address);
this.stagingByteBuffer.putLong((FIRST_BUFF... | java | public void setBuffer(long address, long length, int index) {
if ((index < 0) || (index >= this.bufferCount)) {
throw new IllegalArgumentException();
}
this.stagingByteBuffer.putLong((FIRST_BUFFER_INDEX + (2 * index)) * 8, address);
this.stagingByteBuffer.putLong((FIRST_BUFF... | [
"public",
"void",
"setBuffer",
"(",
"long",
"address",
",",
"long",
"length",
",",
"int",
"index",
")",
"{",
"if",
"(",
"(",
"index",
"<",
"0",
")",
"||",
"(",
"index",
">=",
"this",
".",
"bufferCount",
")",
")",
"{",
"throw",
"new",
"IllegalArgument... | Sets the address and length of a buffer with a specified index.
@param address of the buffer
@param length of the buffer in bytes
@param index of the buffer to set, where 0 is the first buffer
@throws IllegalArgumentException if the index value is <0 or >= bufferCount | [
"Sets",
"the",
"address",
"and",
"length",
"of",
"a",
"buffer",
"with",
"a",
"specified",
"index",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/io/async/CompletionKey.java#L182-L189 |
109,764 | OpenLiberty/open-liberty | dev/com.ibm.ws.channelfw/src/com/ibm/io/async/CompletionKey.java | CompletionKey.getReturnCode | public int getReturnCode() {
long returnCode = this.stagingByteBuffer.getLong(RETURN_CODE_INDEX * 8);
if (returnCode > Integer.MAX_VALUE) {
AsyncException ae = new AsyncException("Return code value invalid");
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
... | java | public int getReturnCode() {
long returnCode = this.stagingByteBuffer.getLong(RETURN_CODE_INDEX * 8);
if (returnCode > Integer.MAX_VALUE) {
AsyncException ae = new AsyncException("Return code value invalid");
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
... | [
"public",
"int",
"getReturnCode",
"(",
")",
"{",
"long",
"returnCode",
"=",
"this",
".",
"stagingByteBuffer",
".",
"getLong",
"(",
"RETURN_CODE_INDEX",
"*",
"8",
")",
";",
"if",
"(",
"returnCode",
">",
"Integer",
".",
"MAX_VALUE",
")",
"{",
"AsyncException",... | Returns the result code for the operation where the operation has
completed.
@return the platform-specific return code. | [
"Returns",
"the",
"result",
"code",
"for",
"the",
"operation",
"where",
"the",
"operation",
"has",
"completed",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/io/async/CompletionKey.java#L273-L284 |
109,765 | OpenLiberty/open-liberty | dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/filter/WebAppFilterManager.java | WebAppFilterManager.init | public void init() {
// load the filter mappings (copy of the list in case add is called while we iterate)
List fMappings = new ArrayList(webAppConfig.getFilterMappings());
// if the list isn't empty, show that this web app has filters
if (!fMappings.isEmpty()) {
if (com.ibm... | java | public void init() {
// load the filter mappings (copy of the list in case add is called while we iterate)
List fMappings = new ArrayList(webAppConfig.getFilterMappings());
// if the list isn't empty, show that this web app has filters
if (!fMappings.isEmpty()) {
if (com.ibm... | [
"public",
"void",
"init",
"(",
")",
"{",
"// load the filter mappings (copy of the list in case add is called while we iterate)",
"List",
"fMappings",
"=",
"new",
"ArrayList",
"(",
"webAppConfig",
".",
"getFilterMappings",
"(",
")",
")",
";",
"// if the list isn't empty, show... | Initialize the manager and see if any filters should be preloaded | [
"Initialize",
"the",
"manager",
"and",
"see",
"if",
"any",
"filters",
"should",
"be",
"preloaded"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/filter/WebAppFilterManager.java#L195-L236 |
109,766 | OpenLiberty/open-liberty | dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/filter/WebAppFilterManager.java | WebAppFilterManager.getFilterInstanceWrapper | public FilterInstanceWrapper getFilterInstanceWrapper(String filterName) throws ServletException {
if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE))
logger.entering(CLASS_NAME,"getFilterInstanceWrapper", "entry for " + filterName);
try {
... | java | public FilterInstanceWrapper getFilterInstanceWrapper(String filterName) throws ServletException {
if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE))
logger.entering(CLASS_NAME,"getFilterInstanceWrapper", "entry for " + filterName);
try {
... | [
"public",
"FilterInstanceWrapper",
"getFilterInstanceWrapper",
"(",
"String",
"filterName",
")",
"throws",
"ServletException",
"{",
"if",
"(",
"com",
".",
"ibm",
".",
"ejs",
".",
"ras",
".",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"logger",
... | Returns a FilterInstanceWrapper object corresponding to the passed in
filter name. If the filter inst has previously been created, return that
instance...if not, then create a new filter instance
@param filterName
- String containing the name of the filter inst to find/create
@return a FilterInstance object correspon... | [
"Returns",
"a",
"FilterInstanceWrapper",
"object",
"corresponding",
"to",
"the",
"passed",
"in",
"filter",
"name",
".",
"If",
"the",
"filter",
"inst",
"has",
"previously",
"been",
"created",
"return",
"that",
"instance",
"...",
"if",
"not",
"then",
"create",
"... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/filter/WebAppFilterManager.java#L278-L318 |
109,767 | OpenLiberty/open-liberty | dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/filter/WebAppFilterManager.java | WebAppFilterManager.shutdown | public void shutdown() {
// call destroy on each filter instance wrapper
Enumeration filterWrappers = _filterWrappers.elements();
ClassLoader origClassLoader = ThreadContextHelper.getContextClassLoader();
try {
final ClassLoader warClassLoader = webApp.getClassLoader();
... | java | public void shutdown() {
// call destroy on each filter instance wrapper
Enumeration filterWrappers = _filterWrappers.elements();
ClassLoader origClassLoader = ThreadContextHelper.getContextClassLoader();
try {
final ClassLoader warClassLoader = webApp.getClassLoader();
... | [
"public",
"void",
"shutdown",
"(",
")",
"{",
"// call destroy on each filter instance wrapper",
"Enumeration",
"filterWrappers",
"=",
"_filterWrappers",
".",
"elements",
"(",
")",
";",
"ClassLoader",
"origClassLoader",
"=",
"ThreadContextHelper",
".",
"getContextClassLoader... | Shuts down the filter manager instance and sets the filter config to null
for each loaded filter object | [
"Shuts",
"down",
"the",
"filter",
"manager",
"instance",
"and",
"sets",
"the",
"filter",
"config",
"to",
"null",
"for",
"each",
"loaded",
"filter",
"object"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/filter/WebAppFilterManager.java#L424-L468 |
109,768 | OpenLiberty/open-liberty | dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/filter/WebAppFilterManager.java | WebAppFilterManager.loadFilter | private FilterInstanceWrapper loadFilter(String filterName) throws ServletException {
ClassLoader origClassLoader = ThreadContextHelper.getContextClassLoader();
try {
final ClassLoader warClassLoader = webApp.getClassLoader();
if (warClassLoader != origClassLoader) {
... | java | private FilterInstanceWrapper loadFilter(String filterName) throws ServletException {
ClassLoader origClassLoader = ThreadContextHelper.getContextClassLoader();
try {
final ClassLoader warClassLoader = webApp.getClassLoader();
if (warClassLoader != origClassLoader) {
... | [
"private",
"FilterInstanceWrapper",
"loadFilter",
"(",
"String",
"filterName",
")",
"throws",
"ServletException",
"{",
"ClassLoader",
"origClassLoader",
"=",
"ThreadContextHelper",
".",
"getContextClassLoader",
"(",
")",
";",
"try",
"{",
"final",
"ClassLoader",
"warClas... | Creates a new FilterInstanceWrapper object corresponding to the passed in
filter name. This new object is added to the _filterWrappers hash table
@param filterName
- String containing the name of the filter inst to create
@return a FilterInstanceWrapper object corresponding to the passed in
filter name
@throws Servl... | [
"Creates",
"a",
"new",
"FilterInstanceWrapper",
"object",
"corresponding",
"to",
"the",
"passed",
"in",
"filter",
"name",
".",
"This",
"new",
"object",
"is",
"added",
"to",
"the",
"_filterWrappers",
"hash",
"table"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/filter/WebAppFilterManager.java#L485-L497 |
109,769 | OpenLiberty/open-liberty | dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/filter/WebAppFilterManager.java | WebAppFilterManager.createFilterInstanceWrapper | protected FilterInstanceWrapper createFilterInstanceWrapper (String filterName, Filter filter, ManagedObject mo) throws InjectionException{ //596191 updated signature
return new FilterInstanceWrapper(filterName, filter, _evtSource, mo);
} | java | protected FilterInstanceWrapper createFilterInstanceWrapper (String filterName, Filter filter, ManagedObject mo) throws InjectionException{ //596191 updated signature
return new FilterInstanceWrapper(filterName, filter, _evtSource, mo);
} | [
"protected",
"FilterInstanceWrapper",
"createFilterInstanceWrapper",
"(",
"String",
"filterName",
",",
"Filter",
"filter",
",",
"ManagedObject",
"mo",
")",
"throws",
"InjectionException",
"{",
"//596191 updated signature",
"return",
"new",
"FilterInstanceWrapper",
"(",
"fil... | begin LIDB-3598 added support for FilterInvocationListeners | [
"begin",
"LIDB",
"-",
"3598",
"added",
"support",
"for",
"FilterInvocationListeners"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/filter/WebAppFilterManager.java#L663-L665 |
109,770 | OpenLiberty/open-liberty | dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/filter/WebAppFilterManager.java | WebAppFilterManager.uriMatch | private boolean uriMatch(String requestURI, IFilterMapping fmInfo, DispatcherType dispatcherType) {
boolean theyMatch = false;
// determine what type of filter uri we have
switch (fmInfo.getMappingType()) {
case FMI_MAPPING_SINGLE_SLASH:
// default servlet mapping...... | java | private boolean uriMatch(String requestURI, IFilterMapping fmInfo, DispatcherType dispatcherType) {
boolean theyMatch = false;
// determine what type of filter uri we have
switch (fmInfo.getMappingType()) {
case FMI_MAPPING_SINGLE_SLASH:
// default servlet mapping...... | [
"private",
"boolean",
"uriMatch",
"(",
"String",
"requestURI",
",",
"IFilterMapping",
"fmInfo",
",",
"DispatcherType",
"dispatcherType",
")",
"{",
"boolean",
"theyMatch",
"=",
"false",
";",
"// determine what type of filter uri we have",
"switch",
"(",
"fmInfo",
".",
... | Compares the request uri to the passed in filter uri to see if the filter
associated with the filter uri should filter the request uri
@param requestURI
the request uri
@param filterURI
the uri associated with the filter
@return boolean indicating whether the uri's match | [
"Compares",
"the",
"request",
"uri",
"to",
"the",
"passed",
"in",
"filter",
"uri",
"to",
"see",
"if",
"the",
"filter",
"associated",
"with",
"the",
"filter",
"uri",
"should",
"filter",
"the",
"request",
"uri"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/filter/WebAppFilterManager.java#L894-L945 |
109,771 | OpenLiberty/open-liberty | dev/com.ibm.ws.microprofile.openapi/src/com/ibm/ws/microprofile/openapi/impl/parser/util/InlineModelResolver.java | InlineModelResolver.makeRefProperty | public Schema makeRefProperty(String ref, Schema property) {
Schema newProperty = new SchemaImpl().ref(ref);
this.copyVendorExtensions(property, newProperty);
return newProperty;
} | java | public Schema makeRefProperty(String ref, Schema property) {
Schema newProperty = new SchemaImpl().ref(ref);
this.copyVendorExtensions(property, newProperty);
return newProperty;
} | [
"public",
"Schema",
"makeRefProperty",
"(",
"String",
"ref",
",",
"Schema",
"property",
")",
"{",
"Schema",
"newProperty",
"=",
"new",
"SchemaImpl",
"(",
")",
".",
"ref",
"(",
"ref",
")",
";",
"this",
".",
"copyVendorExtensions",
"(",
"property",
",",
"new... | Make a RefProperty
@param ref new property name
@param property Property
@return | [
"Make",
"a",
"RefProperty"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.openapi/src/com/ibm/ws/microprofile/openapi/impl/parser/util/InlineModelResolver.java#L486-L491 |
109,772 | OpenLiberty/open-liberty | dev/com.ibm.ws.microprofile.openapi/src/com/ibm/ws/microprofile/openapi/impl/parser/util/InlineModelResolver.java | InlineModelResolver.copyVendorExtensions | public void copyVendorExtensions(Schema source, Schema target) {
if (source.getExtensions() != null) {
Map<String, Object> vendorExtensions = source.getExtensions();
for (String extName : vendorExtensions.keySet()) {
((SchemaImpl) target).addExtension_compat(extName, vend... | java | public void copyVendorExtensions(Schema source, Schema target) {
if (source.getExtensions() != null) {
Map<String, Object> vendorExtensions = source.getExtensions();
for (String extName : vendorExtensions.keySet()) {
((SchemaImpl) target).addExtension_compat(extName, vend... | [
"public",
"void",
"copyVendorExtensions",
"(",
"Schema",
"source",
",",
"Schema",
"target",
")",
"{",
"if",
"(",
"source",
".",
"getExtensions",
"(",
")",
"!=",
"null",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"vendorExtensions",
"=",
"source",
... | Copy vendor extensions from Property to another Property
@param source source property
@param target target property | [
"Copy",
"vendor",
"extensions",
"from",
"Property",
"to",
"another",
"Property"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.openapi/src/com/ibm/ws/microprofile/openapi/impl/parser/util/InlineModelResolver.java#L499-L506 |
109,773 | OpenLiberty/open-liberty | dev/com.ibm.ws.security.openidconnect.clients.common/src/com/ibm/ws/security/openidconnect/token/IDToken.java | IDToken.verify | @FFDCIgnore({ IDTokenValidationFailedException.class })
@Override
public boolean verify(long clockSkew, Object key)
throws IDTokenValidationFailedException {
boolean verified = false;
try {
if (super.verify(clockSkew, key)) {
payload.putAll(super.getPayloa... | java | @FFDCIgnore({ IDTokenValidationFailedException.class })
@Override
public boolean verify(long clockSkew, Object key)
throws IDTokenValidationFailedException {
boolean verified = false;
try {
if (super.verify(clockSkew, key)) {
payload.putAll(super.getPayloa... | [
"@",
"FFDCIgnore",
"(",
"{",
"IDTokenValidationFailedException",
".",
"class",
"}",
")",
"@",
"Override",
"public",
"boolean",
"verify",
"(",
"long",
"clockSkew",
",",
"Object",
"key",
")",
"throws",
"IDTokenValidationFailedException",
"{",
"boolean",
"verified",
... | Verify idtoken.
@throws Exception | [
"Verify",
"idtoken",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.openidconnect.clients.common/src/com/ibm/ws/security/openidconnect/token/IDToken.java#L253-L285 |
109,774 | OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/MsgDestEncodingUtilsImpl.java | MsgDestEncodingUtilsImpl.getPropertyType | final static Class getPropertyType(String longPropertyName) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getPropertyType", longPropertyName);
Class propType = null;
PropertyEntry prop = propertyMap.get(longPropertyName);
if (prop != null) {
propType = prop.... | java | final static Class getPropertyType(String longPropertyName) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getPropertyType", longPropertyName);
Class propType = null;
PropertyEntry prop = propertyMap.get(longPropertyName);
if (prop != null) {
propType = prop.... | [
"final",
"static",
"Class",
"getPropertyType",
"(",
"String",
"longPropertyName",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"tc",
",",
"\"getProp... | getPropertyType
Utility method which returns the type of value required for the given property.
URIDestinationCreator uses this method to test if a property is known or not,
and assumes 'silent' failure if the property is not known.
@param longPropertyName The long name of the property of interest.
@return Class ... | [
"getPropertyType",
"Utility",
"method",
"which",
"returns",
"the",
"type",
"of",
"value",
"required",
"for",
"the",
"given",
"property",
".",
"URIDestinationCreator",
"uses",
"this",
"method",
"to",
"test",
"if",
"a",
"property",
"is",
"known",
"or",
"not",
"a... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/MsgDestEncodingUtilsImpl.java#L308-L320 |
109,775 | OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/MsgDestEncodingUtilsImpl.java | MsgDestEncodingUtilsImpl.convertPropertyToType | final static Object convertPropertyToType(String longPropertyName, String stringValue) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "convertPropertyToType", new Object[]{longPropertyName, stringValue});
// If the value is null or already a String we won't have anything to ... | java | final static Object convertPropertyToType(String longPropertyName, String stringValue) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "convertPropertyToType", new Object[]{longPropertyName, stringValue});
// If the value is null or already a String we won't have anything to ... | [
"final",
"static",
"Object",
"convertPropertyToType",
"(",
"String",
"longPropertyName",
",",
"String",
"stringValue",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
... | convertPropertyToType
Convert a property from its stringified form into an Object of the appropriate
type. Called by URIDestinationCreator.
@param longPropertyName The long name of the property
@param stringValue The stringified property value
@return Object Description of returned value | [
"convertPropertyToType",
"Convert",
"a",
"property",
"from",
"its",
"stringified",
"form",
"into",
"an",
"Object",
"of",
"the",
"appropriate",
"type",
".",
"Called",
"by",
"URIDestinationCreator",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/MsgDestEncodingUtilsImpl.java#L332-L349 |
109,776 | OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/MsgDestEncodingUtilsImpl.java | MsgDestEncodingUtilsImpl.initializePropertyMaps | private static void initializePropertyMaps() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "initializePropertyMap");
// Add all the supported properties to the PropertyMaps:
// PR, DM, and TL use the PhantomPropertyCoder as they are encoded/decoded
// separately rat... | java | private static void initializePropertyMaps() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "initializePropertyMap");
// Add all the supported properties to the PropertyMaps:
// PR, DM, and TL use the PhantomPropertyCoder as they are encoded/decoded
// separately rat... | [
"private",
"static",
"void",
"initializePropertyMaps",
"(",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"tc",
",",
"\"initializePropertyMap\"",
")",
... | initializePropertyMaps
Initialize the Property Maps which must each contain an entry for every supported
Destination Property which is to be encoded or set via this class. | [
"initializePropertyMaps",
"Initialize",
"the",
"Property",
"Maps",
"which",
"must",
"each",
"contain",
"an",
"entry",
"for",
"every",
"supported",
"Destination",
"Property",
"which",
"is",
"to",
"be",
"encoded",
"or",
"set",
"via",
"this",
"class",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/MsgDestEncodingUtilsImpl.java#L427-L460 |
109,777 | OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/MsgDestEncodingUtilsImpl.java | MsgDestEncodingUtilsImpl.decodeBasicProperties | private static int decodeBasicProperties(JmsDestination newDest, byte[] msgForm) throws JMSException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "decodeBasicProperties", new Object[]{newDest, msgForm});
int offset = 0;
// The 2nd half of the first byte carries the De... | java | private static int decodeBasicProperties(JmsDestination newDest, byte[] msgForm) throws JMSException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "decodeBasicProperties", new Object[]{newDest, msgForm});
int offset = 0;
// The 2nd half of the first byte carries the De... | [
"private",
"static",
"int",
"decodeBasicProperties",
"(",
"JmsDestination",
"newDest",
",",
"byte",
"[",
"]",
"msgForm",
")",
"throws",
"JMSException",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"("... | decodeBasicProperties
Decode the basic information to set the folloing attributes, if present, on to the new JmsDestination
DeliveryMode
Priority
TimeToLive
@param newDest The new JmsDestination
@param msgForm A byte array containing the message form of the information
@return ... | [
"decodeBasicProperties",
"Decode",
"the",
"basic",
"information",
"to",
"set",
"the",
"folloing",
"attributes",
"if",
"present",
"on",
"to",
"the",
"new",
"JmsDestination",
"DeliveryMode",
"Priority",
"TimeToLive"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/MsgDestEncodingUtilsImpl.java#L708-L744 |
109,778 | OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/MsgDestEncodingUtilsImpl.java | MsgDestEncodingUtilsImpl.setProperty | private static void setProperty(JmsDestination dest, String longName, int propIntValue, Object value) throws JMSException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "setProperty", new Object[]{dest, longName, propIntValue, value});
switch (propIntValue) {
case PR_I... | java | private static void setProperty(JmsDestination dest, String longName, int propIntValue, Object value) throws JMSException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "setProperty", new Object[]{dest, longName, propIntValue, value});
switch (propIntValue) {
case PR_I... | [
"private",
"static",
"void",
"setProperty",
"(",
"JmsDestination",
"dest",
",",
"String",
"longName",
",",
"int",
"propIntValue",
",",
"Object",
"value",
")",
"throws",
"JMSException",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",... | setProperty
Set the given property to the given value on the given JmsDestination.
@param dest The JmsDestination whose property is to be set
@param longName The name of the property to be set
@param propIntValue The name of the property to be set
@param value The val... | [
"setProperty",
"Set",
"the",
"given",
"property",
"to",
"the",
"given",
"value",
"on",
"the",
"given",
"JmsDestination",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/MsgDestEncodingUtilsImpl.java#L801-L861 |
109,779 | OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/MessageListenerSetter.java | MessageListenerSetter.setMessageListener | public void setMessageListener(MessageConsumer consumer, MessageListener listener) throws JMSException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setMessageListener", new Object[]{consumer, listener});
if (!(consumer instanceof JmsMsgConsumerImpl)) {
// This... | java | public void setMessageListener(MessageConsumer consumer, MessageListener listener) throws JMSException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setMessageListener", new Object[]{consumer, listener});
if (!(consumer instanceof JmsMsgConsumerImpl)) {
// This... | [
"public",
"void",
"setMessageListener",
"(",
"MessageConsumer",
"consumer",
",",
"MessageListener",
"listener",
")",
"throws",
"JMSException",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",... | Assign a messageListener to the message consumer.
@see com.ibm.wsspi.jms.JmsMessageListenerSupport.MessageListenerSetter#setMessageListener(javax.jms.MessageConsumer, javax.jms.MessageListener) | [
"Assign",
"a",
"messageListener",
"to",
"the",
"message",
"consumer",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/MessageListenerSetter.java#L36-L57 |
109,780 | OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/RemoteQPConsumerKey.java | RemoteQPConsumerKey.updateLastNotReadyTime | protected final void updateLastNotReadyTime()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "updateLastNotReadyTime");
if (readAhead)
{ // only relevant when prefetching
synchronized (this)
{
// it is possible that both the CP and the R... | java | protected final void updateLastNotReadyTime()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "updateLastNotReadyTime");
if (readAhead)
{ // only relevant when prefetching
synchronized (this)
{
// it is possible that both the CP and the R... | [
"protected",
"final",
"void",
"updateLastNotReadyTime",
"(",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"this",
",",
"tc",
",",
"\"updateLastNotRe... | Update the time when the consumer became not ready | [
"Update",
"the",
"time",
"when",
"the",
"consumer",
"became",
"not",
"ready"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/RemoteQPConsumerKey.java#L377-L396 |
109,781 | OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/RemoteQPConsumerKey.java | RemoteQPConsumerKey.messageReceived | protected final void messageReceived(AIStreamKey key)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "messageReceived", key);
long timeout = refillTime;
boolean reissueGet = false;
synchronized (this)
{
countOfUnlockedMessages++;
... | java | protected final void messageReceived(AIStreamKey key)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "messageReceived", key);
long timeout = refillTime;
boolean reissueGet = false;
synchronized (this)
{
countOfUnlockedMessages++;
... | [
"protected",
"final",
"void",
"messageReceived",
"(",
"AIStreamKey",
"key",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"this",
",",
"tc",
",",
... | message received from the DME corresponding to a get request issued by this consumer.
Note that this method will never be called on messages received due to gets issued by the
RemoteQPConsumerKeyGroup
@param key | [
"message",
"received",
"from",
"the",
"DME",
"corresponding",
"to",
"a",
"get",
"request",
"issued",
"by",
"this",
"consumer",
".",
"Note",
"that",
"this",
"method",
"will",
"never",
"be",
"called",
"on",
"messages",
"received",
"due",
"to",
"gets",
"issued"... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/RemoteQPConsumerKey.java#L450-L505 |
109,782 | OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/RemoteQPConsumerKey.java | RemoteQPConsumerKey.completedReceived | protected final void completedReceived(AIStreamKey key, boolean reissueGet)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "completedReceived", new Object[] {key, Boolean.valueOf(reissueGet)});
completedReceivedNoPrefetch(key, reissueGet);
try
{
i... | java | protected final void completedReceived(AIStreamKey key, boolean reissueGet)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "completedReceived", new Object[] {key, Boolean.valueOf(reissueGet)});
completedReceivedNoPrefetch(key, reissueGet);
try
{
i... | [
"protected",
"final",
"void",
"completedReceived",
"(",
"AIStreamKey",
"key",
",",
"boolean",
"reissueGet",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
... | completed tick received from the RME corresponding to a get request issued by this consumer.
Note that this method is called only when the RemoteConsumerDispatcher does not hide the completed
by reissuing the get.
This method will never be called for messages received due to gets issued by the
RemoteQPConsumerKeyGroup
... | [
"completed",
"tick",
"received",
"from",
"the",
"RME",
"corresponding",
"to",
"a",
"get",
"request",
"issued",
"by",
"this",
"consumer",
".",
"Note",
"that",
"this",
"method",
"is",
"called",
"only",
"when",
"the",
"RemoteConsumerDispatcher",
"does",
"not",
"h... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/RemoteQPConsumerKey.java#L515-L537 |
109,783 | OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/RemoteQPConsumerKey.java | RemoteQPConsumerKey.completedReceivedNoPrefetch | protected final void completedReceivedNoPrefetch(AIStreamKey key, boolean reissueGet)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "completedReceivedNoPrefetch", new Object[] {key, Boolean.valueOf(reissueGet)});
boolean initiateRefill = false;
long timeo... | java | protected final void completedReceivedNoPrefetch(AIStreamKey key, boolean reissueGet)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "completedReceivedNoPrefetch", new Object[] {key, Boolean.valueOf(reissueGet)});
boolean initiateRefill = false;
long timeo... | [
"protected",
"final",
"void",
"completedReceivedNoPrefetch",
"(",
"AIStreamKey",
"key",
",",
"boolean",
"reissueGet",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"... | This method will never be called for messages received due to gets issued by the
RemoteQPConsumerKeyGroup.
@param key | [
"This",
"method",
"will",
"never",
"be",
"called",
"for",
"messages",
"received",
"due",
"to",
"gets",
"issued",
"by",
"the",
"RemoteQPConsumerKeyGroup",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/RemoteQPConsumerKey.java#L544-L595 |
109,784 | OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/RemoteQPConsumerKey.java | RemoteQPConsumerKey.messageLocked | public final void messageLocked(AIStreamKey key)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "messageLocked", key);
synchronized (this)
{
countOfUnlockedMessages--;
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())... | java | public final void messageLocked(AIStreamKey key)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "messageLocked", key);
synchronized (this)
{
countOfUnlockedMessages--;
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())... | [
"public",
"final",
"void",
"messageLocked",
"(",
"AIStreamKey",
"key",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"this",
",",
"tc",
",",
"\"m... | Message that was requested by this consumer has been locked.
Note that it could have been locked by some other consumer.
This method will never be called for messages received due to gets issued by the
RemoteQPConsumerKeyGroup
@param key | [
"Message",
"that",
"was",
"requested",
"by",
"this",
"consumer",
"has",
"been",
"locked",
".",
"Note",
"that",
"it",
"could",
"have",
"been",
"locked",
"by",
"some",
"other",
"consumer",
".",
"This",
"method",
"will",
"never",
"be",
"called",
"for",
"messa... | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/RemoteQPConsumerKey.java#L604-L633 |
109,785 | OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/RemoteQPConsumerKey.java | RemoteQPConsumerKey.messageUnlocked | public final void messageUnlocked(AIStreamKey key)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "messageUnlocked", key);
synchronized (this)
{
countOfUnlockedMessages++;
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
... | java | public final void messageUnlocked(AIStreamKey key)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "messageUnlocked", key);
synchronized (this)
{
countOfUnlockedMessages++;
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
... | [
"public",
"final",
"void",
"messageUnlocked",
"(",
"AIStreamKey",
"key",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"this",
",",
"tc",
",",
"\... | Message that was requested by this consumer has been unlocked.
This method will never be called for messages received due to gets issued by the
RemoteQPConsumerKeyGroup
@param key | [
"Message",
"that",
"was",
"requested",
"by",
"this",
"consumer",
"has",
"been",
"unlocked",
".",
"This",
"method",
"will",
"never",
"be",
"called",
"for",
"messages",
"received",
"due",
"to",
"gets",
"issued",
"by",
"the",
"RemoteQPConsumerKeyGroup"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/RemoteQPConsumerKey.java#L641-L654 |
109,786 | OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/RemoteQPConsumerKey.java | RemoteQPConsumerKey.tryPrefetching | private final void tryPrefetching() throws SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "tryPrefetching");
int toPrefetchCount = 0; // count of gets to issue
synchronized (this)
{
if (!detached)
{
int count = co... | java | private final void tryPrefetching() throws SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "tryPrefetching");
int toPrefetchCount = 0; // count of gets to issue
synchronized (this)
{
if (!detached)
{
int count = co... | [
"private",
"final",
"void",
"tryPrefetching",
"(",
")",
"throws",
"SIResourceException",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"this",
",",
"tc",
... | Internal method. See if we need to prefetch more messages, and if yes, do the prefetch | [
"Internal",
"method",
".",
"See",
"if",
"we",
"need",
"to",
"prefetch",
"more",
"messages",
"and",
"if",
"yes",
"do",
"the",
"prefetch"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/RemoteQPConsumerKey.java#L659-L727 |
109,787 | OpenLiberty/open-liberty | dev/com.ibm.tx.core/src/com/ibm/tx/ltc/impl/LocalTranCurrentImpl.java | LocalTranCurrentImpl.suspend | public LocalTransactionCoordinator suspend()
{
if (tc.isEntryEnabled()) Tr.entry(tc, "suspend", this);
final LocalTranCoordImpl ltc = _coord;
if (ltc != null)
{
_coord = null;
ltc.suspend(); // suspend any native context
inv... | java | public LocalTransactionCoordinator suspend()
{
if (tc.isEntryEnabled()) Tr.entry(tc, "suspend", this);
final LocalTranCoordImpl ltc = _coord;
if (ltc != null)
{
_coord = null;
ltc.suspend(); // suspend any native context
inv... | [
"public",
"LocalTransactionCoordinator",
"suspend",
"(",
")",
"{",
"if",
"(",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"Tr",
".",
"entry",
"(",
"tc",
",",
"\"suspend\"",
",",
"this",
")",
";",
"final",
"LocalTranCoordImpl",
"ltc",
"=",
"_coord",
";",
... | Disassociates the LTC scope from the thread.
@return the LocalTransactionCoordinator instance representing the LTC scope
disassociated from the thread. If there was no LTC scope, returns null. | [
"Disassociates",
"the",
"LTC",
"scope",
"from",
"the",
"thread",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.tx.core/src/com/ibm/tx/ltc/impl/LocalTranCurrentImpl.java#L178-L193 |
109,788 | OpenLiberty/open-liberty | dev/com.ibm.tx.core/src/com/ibm/tx/ltc/impl/LocalTranCurrentImpl.java | LocalTranCurrentImpl.resume | public void resume(LocalTransactionCoordinator ltc) // throws IllegalStateException
{
if (tc.isEntryEnabled()) Tr.entry(tc, "resume", new Object[]{ltc, this});
// If there's already an LTC on this thread and the LTC that we're
// resuming is non-null then fail the resume attempt. Th... | java | public void resume(LocalTransactionCoordinator ltc) // throws IllegalStateException
{
if (tc.isEntryEnabled()) Tr.entry(tc, "resume", new Object[]{ltc, this});
// If there's already an LTC on this thread and the LTC that we're
// resuming is non-null then fail the resume attempt. Th... | [
"public",
"void",
"resume",
"(",
"LocalTransactionCoordinator",
"ltc",
")",
"// throws IllegalStateException",
"{",
"if",
"(",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"Tr",
".",
"entry",
"(",
"tc",
",",
"\"resume\"",
",",
"new",
"Object",
"[",
"]",
"{",
... | Associates an LTC scope with the thread. Any existing LTC is suspended first.
@param ltc The LocalTransactionCoordinator instance that represents the
LTC scope to be resumed. If a null is specified, then no LTC is associated
with the thread.
@exception IllegalStateException
Thrown if the LocalTransactionCoordinator... | [
"Associates",
"an",
"LTC",
"scope",
"with",
"the",
"thread",
".",
"Any",
"existing",
"LTC",
"is",
"suspended",
"first",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.tx.core/src/com/ibm/tx/ltc/impl/LocalTranCurrentImpl.java#L206-L234 |
109,789 | OpenLiberty/open-liberty | dev/com.ibm.tx.core/src/com/ibm/tx/ltc/impl/LocalTranCurrentImpl.java | LocalTranCurrentImpl.hasOutstandingWork | public boolean hasOutstandingWork()
{
if (tc.isEntryEnabled()) Tr.entry(tc, "hasOutstandingWork", this);
final boolean retval = (_coord != null) ? _coord.hasWork() : false;
if (tc.isEntryEnabled()) Tr.exit(tc, "hasOutstandingWork", retval);
return retval;
} | java | public boolean hasOutstandingWork()
{
if (tc.isEntryEnabled()) Tr.entry(tc, "hasOutstandingWork", this);
final boolean retval = (_coord != null) ? _coord.hasWork() : false;
if (tc.isEntryEnabled()) Tr.exit(tc, "hasOutstandingWork", retval);
return retval;
} | [
"public",
"boolean",
"hasOutstandingWork",
"(",
")",
"{",
"if",
"(",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"Tr",
".",
"entry",
"(",
"tc",
",",
"\"hasOutstandingWork\"",
",",
"this",
")",
";",
"final",
"boolean",
"retval",
"=",
"(",
"_coord",
"!=",
... | Returns a boolean to indicate whether there are incomplete RMLTs in the
current LTC.
@return true if there is an LTC associated with the thread that has resources
enlisted either for cleanup or for coordination. Under these circumstances,
it would be illegal for the bean with which the LTC was associated
to start a gl... | [
"Returns",
"a",
"boolean",
"to",
"indicate",
"whether",
"there",
"are",
"incomplete",
"RMLTs",
"in",
"the",
"current",
"LTC",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.tx.core/src/com/ibm/tx/ltc/impl/LocalTranCurrentImpl.java#L246-L254 |
109,790 | OpenLiberty/open-liberty | dev/com.ibm.tx.core/src/com/ibm/tx/ltc/impl/LocalTranCurrentImpl.java | LocalTranCurrentImpl.setCoordinator | void setCoordinator(LocalTranCoordImpl ltc)
{
_coord = ltc;
if (tc.isDebugEnabled()) Tr.debug(tc, "setCoordinator: LTC="+ltc);
} | java | void setCoordinator(LocalTranCoordImpl ltc)
{
_coord = ltc;
if (tc.isDebugEnabled()) Tr.debug(tc, "setCoordinator: LTC="+ltc);
} | [
"void",
"setCoordinator",
"(",
"LocalTranCoordImpl",
"ltc",
")",
"{",
"_coord",
"=",
"ltc",
";",
"if",
"(",
"tc",
".",
"isDebugEnabled",
"(",
")",
")",
"Tr",
".",
"debug",
"(",
"tc",
",",
"\"setCoordinator: LTC=\"",
"+",
"ltc",
")",
";",
"}"
] | Setter for the _coord member var. | [
"Setter",
"for",
"the",
"_coord",
"member",
"var",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.tx.core/src/com/ibm/tx/ltc/impl/LocalTranCurrentImpl.java#L436-L440 |
109,791 | OpenLiberty/open-liberty | dev/com.ibm.ws.jca.cm/src/com/ibm/ws/jca/cm/AbstractConnectionFactoryService.java | AbstractConnectionFactoryService.createResource | @Override
public Object createResource(final ResourceInfo resInfo) throws Exception {
final boolean trace = TraceComponent.isAnyTracingEnabled();
if (trace && tc.isEntryEnabled())
Tr.entry(this, tc, "createResource", resInfo);
Object connectionFactory;
lock.readLock().l... | java | @Override
public Object createResource(final ResourceInfo resInfo) throws Exception {
final boolean trace = TraceComponent.isAnyTracingEnabled();
if (trace && tc.isEntryEnabled())
Tr.entry(this, tc, "createResource", resInfo);
Object connectionFactory;
lock.readLock().l... | [
"@",
"Override",
"public",
"Object",
"createResource",
"(",
"final",
"ResourceInfo",
"resInfo",
")",
"throws",
"Exception",
"{",
"final",
"boolean",
"trace",
"=",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
";",
"if",
"(",
"trace",
"&&",
"tc",
".",... | Create a connection factory.
@param resInfo resource reference. Null if no resource reference.
@return the connection factory.
@throws Exception if an error occurs. | [
"Create",
"a",
"connection",
"factory",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.cm/src/com/ibm/ws/jca/cm/AbstractConnectionFactoryService.java#L128-L181 |
109,792 | OpenLiberty/open-liberty | dev/com.ibm.ws.jca.cm/src/com/ibm/ws/jca/cm/AbstractConnectionFactoryService.java | AbstractConnectionFactoryService.destroyXAResource | @Override
public void destroyXAResource(XAResource xa) throws DestroyXAResourceException {
final boolean trace = TraceComponent.isAnyTracingEnabled();
if (trace && tc.isEntryEnabled())
Tr.entry(this, tc, "destroyXAResource", xa);
ManagedConnection mc = ((WSXAResource) xa).getMa... | java | @Override
public void destroyXAResource(XAResource xa) throws DestroyXAResourceException {
final boolean trace = TraceComponent.isAnyTracingEnabled();
if (trace && tc.isEntryEnabled())
Tr.entry(this, tc, "destroyXAResource", xa);
ManagedConnection mc = ((WSXAResource) xa).getMa... | [
"@",
"Override",
"public",
"void",
"destroyXAResource",
"(",
"XAResource",
"xa",
")",
"throws",
"DestroyXAResourceException",
"{",
"final",
"boolean",
"trace",
"=",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
";",
"if",
"(",
"trace",
"&&",
"tc",
".",... | Destroy the XAResource object. Internally, the XAResource provider
should cleanup resources used by XAResource object. For example, JTA
should close XAConnection.
@param xa resource to destroy.
@throws DestroyXAResourceException if an error occurs. | [
"Destroy",
"the",
"XAResource",
"object",
".",
"Internally",
"the",
"XAResource",
"provider",
"should",
"cleanup",
"resources",
"used",
"by",
"XAResource",
"object",
".",
"For",
"example",
"JTA",
"should",
"close",
"XAConnection",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.cm/src/com/ibm/ws/jca/cm/AbstractConnectionFactoryService.java#L191-L209 |
109,793 | OpenLiberty/open-liberty | dev/com.ibm.ws.jca.cm/src/com/ibm/ws/jca/cm/AbstractConnectionFactoryService.java | AbstractConnectionFactoryService.getXAResource | @Override
public XAResource getXAResource(Serializable xaresinfo) throws XAResourceNotAvailableException {
final boolean trace = TraceComponent.isAnyTracingEnabled();
if (trace && tc.isEntryEnabled())
Tr.entry(this, tc, "getXAResource", getID(), xaresinfo);
XAResource xa;
... | java | @Override
public XAResource getXAResource(Serializable xaresinfo) throws XAResourceNotAvailableException {
final boolean trace = TraceComponent.isAnyTracingEnabled();
if (trace && tc.isEntryEnabled())
Tr.entry(this, tc, "getXAResource", getID(), xaresinfo);
XAResource xa;
... | [
"@",
"Override",
"public",
"XAResource",
"getXAResource",
"(",
"Serializable",
"xaresinfo",
")",
"throws",
"XAResourceNotAvailableException",
"{",
"final",
"boolean",
"trace",
"=",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
";",
"if",
"(",
"trace",
"&&"... | Given XAResourceInfo, the XAResourceFactory produces a XAResource object.
getXAResource may also be invoked during normal server running if a RM returns XAER_RMFAIL
on a completion method. The TM will attempt to retry the completion method after obtaining
a new XAResource. This retry processing will continue until eit... | [
"Given",
"XAResourceInfo",
"the",
"XAResourceFactory",
"produces",
"a",
"XAResource",
"object",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.cm/src/com/ibm/ws/jca/cm/AbstractConnectionFactoryService.java#L394-L452 |
109,794 | OpenLiberty/open-liberty | dev/com.ibm.ws.jca.cm/src/com/ibm/ws/jca/cm/AbstractConnectionFactoryService.java | AbstractConnectionFactoryService.setContainerAuthData | protected void setContainerAuthData(ServiceReference<?> ref) { // com.ibm.websphere.security.auth.data.AuthData
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(this, tc, "setContainerAuthData", ref);
lock.writeLock().lock();
try {
containerAuthDa... | java | protected void setContainerAuthData(ServiceReference<?> ref) { // com.ibm.websphere.security.auth.data.AuthData
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(this, tc, "setContainerAuthData", ref);
lock.writeLock().lock();
try {
containerAuthDa... | [
"protected",
"void",
"setContainerAuthData",
"(",
"ServiceReference",
"<",
"?",
">",
"ref",
")",
"{",
"// com.ibm.websphere.security.auth.data.AuthData",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isDebugEnabled",
"(",
")",
... | Declarative Services method for setting the service reference for the default container auth data
@param ref reference to the service | [
"Declarative",
"Services",
"method",
"for",
"setting",
"the",
"service",
"reference",
"for",
"the",
"default",
"container",
"auth",
"data"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.cm/src/com/ibm/ws/jca/cm/AbstractConnectionFactoryService.java#L500-L509 |
109,795 | OpenLiberty/open-liberty | dev/com.ibm.ws.jca.cm/src/com/ibm/ws/jca/cm/AbstractConnectionFactoryService.java | AbstractConnectionFactoryService.setRecoveryAuthData | protected void setRecoveryAuthData(ServiceReference<?> ref) { // com.ibm.websphere.security.auth.data.AuthData
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(this, tc, "setRecoveryAuthData", ref);
lock.writeLock().lock();
try {
recoveryAuthDataR... | java | protected void setRecoveryAuthData(ServiceReference<?> ref) { // com.ibm.websphere.security.auth.data.AuthData
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(this, tc, "setRecoveryAuthData", ref);
lock.writeLock().lock();
try {
recoveryAuthDataR... | [
"protected",
"void",
"setRecoveryAuthData",
"(",
"ServiceReference",
"<",
"?",
">",
"ref",
")",
"{",
"// com.ibm.websphere.security.auth.data.AuthData",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isDebugEnabled",
"(",
")",
"... | Declarative Services method for setting the recovery auth data service reference
@param ref reference to the service | [
"Declarative",
"Services",
"method",
"for",
"setting",
"the",
"recovery",
"auth",
"data",
"service",
"reference"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.cm/src/com/ibm/ws/jca/cm/AbstractConnectionFactoryService.java#L516-L525 |
109,796 | OpenLiberty/open-liberty | dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/JPAScopeInfo.java | JPAScopeInfo.getAllPuCount | int getAllPuCount() {
final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
if (isTraceOn && tc.isEntryEnabled())
Tr.entry(tc, "getAllPuCount", this);
int rtnCount = 0;
synchronized (pxmlsInfo) {
for (JPAPxmlInfo pxmlInfo : pxmlsInfo.values()) {
... | java | int getAllPuCount() {
final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
if (isTraceOn && tc.isEntryEnabled())
Tr.entry(tc, "getAllPuCount", this);
int rtnCount = 0;
synchronized (pxmlsInfo) {
for (JPAPxmlInfo pxmlInfo : pxmlsInfo.values()) {
... | [
"int",
"getAllPuCount",
"(",
")",
"{",
"final",
"boolean",
"isTraceOn",
"=",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
";",
"if",
"(",
"isTraceOn",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"Tr",
".",
"entry",
"(",
"tc",
",",
"\"get... | Returns the number of persistence units in persistence.xml defined in this scope.
@return Persistence unit count | [
"Returns",
"the",
"number",
"of",
"persistence",
"units",
"in",
"persistence",
".",
"xml",
"defined",
"in",
"this",
"scope",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/JPAScopeInfo.java#L169-L184 |
109,797 | OpenLiberty/open-liberty | dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/JPAScopeInfo.java | JPAScopeInfo.getUniquePuInfo | JPAPUnitInfo getUniquePuInfo() {
final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
if (isTraceOn && tc.isEntryEnabled())
Tr.entry(tc, "getUniquePuInfo");
JPAPUnitInfo rtnVal = null;
synchronized (pxmlsInfo) {
for (JPAPxmlInfo pxmlInfo : pxmlsInfo.v... | java | JPAPUnitInfo getUniquePuInfo() {
final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
if (isTraceOn && tc.isEntryEnabled())
Tr.entry(tc, "getUniquePuInfo");
JPAPUnitInfo rtnVal = null;
synchronized (pxmlsInfo) {
for (JPAPxmlInfo pxmlInfo : pxmlsInfo.v... | [
"JPAPUnitInfo",
"getUniquePuInfo",
"(",
")",
"{",
"final",
"boolean",
"isTraceOn",
"=",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
";",
"if",
"(",
"isTraceOn",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"Tr",
".",
"entry",
"(",
"tc",
",... | Returns an unique PersistenceUnitInfo object if there is only persistence unit defines
in this scope, otherwise null is returned. | [
"Returns",
"an",
"unique",
"PersistenceUnitInfo",
"object",
"if",
"there",
"is",
"only",
"persistence",
"unit",
"defines",
"in",
"this",
"scope",
"otherwise",
"null",
"is",
"returned",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/JPAScopeInfo.java#L190-L217 |
109,798 | OpenLiberty/open-liberty | dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/JPAScopeInfo.java | JPAScopeInfo.close | void close() {
synchronized (pxmlsInfo) {
for (JPAPxmlInfo pxmlInfo : pxmlsInfo.values()) {
pxmlInfo.close();
}
pxmlsInfo.clear();
}
} | java | void close() {
synchronized (pxmlsInfo) {
for (JPAPxmlInfo pxmlInfo : pxmlsInfo.values()) {
pxmlInfo.close();
}
pxmlsInfo.clear();
}
} | [
"void",
"close",
"(",
")",
"{",
"synchronized",
"(",
"pxmlsInfo",
")",
"{",
"for",
"(",
"JPAPxmlInfo",
"pxmlInfo",
":",
"pxmlsInfo",
".",
"values",
"(",
")",
")",
"{",
"pxmlInfo",
".",
"close",
"(",
")",
";",
"}",
"pxmlsInfo",
".",
"clear",
"(",
")",... | Cloase all the active EntityManagers defined in this scope. | [
"Cloase",
"all",
"the",
"active",
"EntityManagers",
"defined",
"in",
"this",
"scope",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/JPAScopeInfo.java#L222-L229 |
109,799 | OpenLiberty/open-liberty | dev/com.ibm.ws.threading/src/com/ibm/ws/threading/internal/BoundedBuffer.java | BoundedBuffer.put | public T put(T t, long timeoutInMillis, int maximumCapacity) throws InterruptedException {
if ((t == null) || (maximumCapacity > buffer.length)) {
throw new IllegalArgumentException();
}
long start = (timeoutInMillis <= 0) ? 0 : -1;
long waitTime = timeoutInMillis;
... | java | public T put(T t, long timeoutInMillis, int maximumCapacity) throws InterruptedException {
if ((t == null) || (maximumCapacity > buffer.length)) {
throw new IllegalArgumentException();
}
long start = (timeoutInMillis <= 0) ? 0 : -1;
long waitTime = timeoutInMillis;
... | [
"public",
"T",
"put",
"(",
"T",
"t",
",",
"long",
"timeoutInMillis",
",",
"int",
"maximumCapacity",
")",
"throws",
"InterruptedException",
"{",
"if",
"(",
"(",
"t",
"==",
"null",
")",
"||",
"(",
"maximumCapacity",
">",
"buffer",
".",
"length",
")",
")",
... | Puts an object into the buffer. If the buffer is at or above the
specified maximum capacity, the call will block for up to the
specified timeout period.
@param x the object being placed in the buffer.
@param timeoutInMillis the timeout period in milliseconds.
@param maximumCapacity the desired maximum capacity of the ... | [
"Puts",
"an",
"object",
"into",
"the",
"buffer",
".",
"If",
"the",
"buffer",
"is",
"at",
"or",
"above",
"the",
"specified",
"maximum",
"capacity",
"the",
"call",
"will",
"block",
"for",
"up",
"to",
"the",
"specified",
"timeout",
"period",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.threading/src/com/ibm/ws/threading/internal/BoundedBuffer.java#L466-L514 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.