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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
104,000 | sebastiangraf/jSCSI | bundles/commons/src/main/java/org/jscsi/parser/ProtocolDataUnit.java | ProtocolDataUnit.serialize | public final ByteBuffer serialize () throws InternetSCSIException , IOException {
basicHeaderSegment.getParser().checkIntegrity();
final ByteBuffer pdu = ByteBuffer.allocate(calcSize());
int offset = 0;
offset += basicHeaderSegment.serialize(pdu, offset);
if (LOGGER.isTraceEn... | java | public final ByteBuffer serialize () throws InternetSCSIException , IOException {
basicHeaderSegment.getParser().checkIntegrity();
final ByteBuffer pdu = ByteBuffer.allocate(calcSize());
int offset = 0;
offset += basicHeaderSegment.serialize(pdu, offset);
if (LOGGER.isTraceEn... | [
"public",
"final",
"ByteBuffer",
"serialize",
"(",
")",
"throws",
"InternetSCSIException",
",",
"IOException",
"{",
"basicHeaderSegment",
".",
"getParser",
"(",
")",
".",
"checkIntegrity",
"(",
")",
";",
"final",
"ByteBuffer",
"pdu",
"=",
"ByteBuffer",
".",
"all... | Serialize all informations of this PDU object to its byte representation.
@return The byte representation of this PDU.
@throws InternetSCSIException If any violation of the iSCSI-Standard emerge.
@throws IOException if an I/O error occurs. | [
"Serialize",
"all",
"informations",
"of",
"this",
"PDU",
"object",
"to",
"its",
"byte",
"representation",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/commons/src/main/java/org/jscsi/parser/ProtocolDataUnit.java#L123-L154 |
104,001 | sebastiangraf/jSCSI | bundles/commons/src/main/java/org/jscsi/parser/ProtocolDataUnit.java | ProtocolDataUnit.serializeAdditionalHeaderSegments | private final int serializeAdditionalHeaderSegments (final ByteBuffer dst, final int offset) throws InternetSCSIException {
int off = offset;
for (AdditionalHeaderSegment ahs : additionalHeaderSegments) {
off += ahs.serialize(dst, off);
}
return off - offset;
} | java | private final int serializeAdditionalHeaderSegments (final ByteBuffer dst, final int offset) throws InternetSCSIException {
int off = offset;
for (AdditionalHeaderSegment ahs : additionalHeaderSegments) {
off += ahs.serialize(dst, off);
}
return off - offset;
} | [
"private",
"final",
"int",
"serializeAdditionalHeaderSegments",
"(",
"final",
"ByteBuffer",
"dst",
",",
"final",
"int",
"offset",
")",
"throws",
"InternetSCSIException",
"{",
"int",
"off",
"=",
"offset",
";",
"for",
"(",
"AdditionalHeaderSegment",
"ahs",
":",
"add... | Serialize all the contained additional header segments to the destination array starting from the given offset.
@param dst The destination array to write in.
@param offset The offset to start to write in <code>dst</code>.
@return The written length.
@throws InternetSCSIException If any violation of the iSCSI-Standard ... | [
"Serialize",
"all",
"the",
"contained",
"additional",
"header",
"segments",
"to",
"the",
"destination",
"array",
"starting",
"from",
"the",
"given",
"offset",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/commons/src/main/java/org/jscsi/parser/ProtocolDataUnit.java#L250-L258 |
104,002 | sebastiangraf/jSCSI | bundles/commons/src/main/java/org/jscsi/parser/ProtocolDataUnit.java | ProtocolDataUnit.clear | public final void clear () {
basicHeaderSegment.clear();
headerDigest.reset();
additionalHeaderSegments.clear();
dataSegment.clear();
dataSegment.flip();
dataDigest.reset();
} | java | public final void clear () {
basicHeaderSegment.clear();
headerDigest.reset();
additionalHeaderSegments.clear();
dataSegment.clear();
dataSegment.flip();
dataDigest.reset();
} | [
"public",
"final",
"void",
"clear",
"(",
")",
"{",
"basicHeaderSegment",
".",
"clear",
"(",
")",
";",
"headerDigest",
".",
"reset",
"(",
")",
";",
"additionalHeaderSegments",
".",
"clear",
"(",
")",
";",
"dataSegment",
".",
"clear",
"(",
")",
";",
"dataS... | Clears all stored content of this ProtocolDataUnit object. | [
"Clears",
"all",
"stored",
"content",
"of",
"this",
"ProtocolDataUnit",
"object",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/commons/src/main/java/org/jscsi/parser/ProtocolDataUnit.java#L404-L416 |
104,003 | sebastiangraf/jSCSI | bundles/commons/src/main/java/org/jscsi/parser/ProtocolDataUnit.java | ProtocolDataUnit.setDataSegment | public final void setDataSegment (final IDataSegmentChunk chunk) {
if (chunk == null) { throw new NullPointerException(); }
dataSegment = ByteBuffer.allocate(chunk.getTotalLength());
dataSegment.put(chunk.getData());
basicHeaderSegment.setDataSegmentLength(chunk.getLength());
} | java | public final void setDataSegment (final IDataSegmentChunk chunk) {
if (chunk == null) { throw new NullPointerException(); }
dataSegment = ByteBuffer.allocate(chunk.getTotalLength());
dataSegment.put(chunk.getData());
basicHeaderSegment.setDataSegmentLength(chunk.getLength());
} | [
"public",
"final",
"void",
"setDataSegment",
"(",
"final",
"IDataSegmentChunk",
"chunk",
")",
"{",
"if",
"(",
"chunk",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
")",
";",
"}",
"dataSegment",
"=",
"ByteBuffer",
".",
"allocate",
"(",... | Sets a new data segment in this PDU.
@param chunk The new data segment of this <code>ProtocolDataUnit</code> object. | [
"Sets",
"a",
"new",
"data",
"segment",
"in",
"this",
"PDU",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/commons/src/main/java/org/jscsi/parser/ProtocolDataUnit.java#L464-L471 |
104,004 | sebastiangraf/jSCSI | bundles/target/src/main/java/org/jscsi/target/scsi/inquiry/DeviceIdentificationVpdPage.java | DeviceIdentificationVpdPage.getPageLength | private short getPageLength () {
short pageLength = 0;
for (int i = 0; i < identificationDescriptors.length; ++i) {
pageLength += identificationDescriptors[i].size();
}
return pageLength;
} | java | private short getPageLength () {
short pageLength = 0;
for (int i = 0; i < identificationDescriptors.length; ++i) {
pageLength += identificationDescriptors[i].size();
}
return pageLength;
} | [
"private",
"short",
"getPageLength",
"(",
")",
"{",
"short",
"pageLength",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"identificationDescriptors",
".",
"length",
";",
"++",
"i",
")",
"{",
"pageLength",
"+=",
"identificationDescriptors"... | Returns the combined length of all contained IDENTIFICATION DESCRIPTORs.
@return the combined length of all contained IDENTIFICATION DESCRIPTORs | [
"Returns",
"the",
"combined",
"length",
"of",
"all",
"contained",
"IDENTIFICATION",
"DESCRIPTORs",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/target/src/main/java/org/jscsi/target/scsi/inquiry/DeviceIdentificationVpdPage.java#L96-L102 |
104,005 | sebastiangraf/jSCSI | bundles/commons/src/main/java/org/jscsi/parser/scsi/SCSICommandParser.java | SCSICommandParser.setCommandDescriptorBlock | public final void setCommandDescriptorBlock (final ByteBuffer newCDB) {
if (newCDB.limit() - newCDB.position() > CDB_SIZE) { throw new IllegalArgumentException("Buffer cannot be longer than 16 bytes, because AHS-support is not implemented."); }
commandDescriptorBlock = newCDB;
} | java | public final void setCommandDescriptorBlock (final ByteBuffer newCDB) {
if (newCDB.limit() - newCDB.position() > CDB_SIZE) { throw new IllegalArgumentException("Buffer cannot be longer than 16 bytes, because AHS-support is not implemented."); }
commandDescriptorBlock = newCDB;
} | [
"public",
"final",
"void",
"setCommandDescriptorBlock",
"(",
"final",
"ByteBuffer",
"newCDB",
")",
"{",
"if",
"(",
"newCDB",
".",
"limit",
"(",
")",
"-",
"newCDB",
".",
"position",
"(",
")",
">",
"CDB_SIZE",
")",
"{",
"throw",
"new",
"IllegalArgumentExceptio... | Sets the new Command Descriptor Block.
@param newCDB The new Command Descriptor Block. | [
"Sets",
"the",
"new",
"Command",
"Descriptor",
"Block",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/commons/src/main/java/org/jscsi/parser/scsi/SCSICommandParser.java#L355-L359 |
104,006 | sebastiangraf/jSCSI | bundles/target/src/main/java/org/jscsi/target/storage/RandomAccessStorageModule.java | RandomAccessStorageModule.createStorageVolume | private static synchronized boolean createStorageVolume (final File pToCreate, final long pLength) throws IOException {
FileOutputStream outStream = null;
try {
// if file exists, remove it after questioning.
if (pToCreate.exists()) {
if (!pToCreate.delete())... | java | private static synchronized boolean createStorageVolume (final File pToCreate, final long pLength) throws IOException {
FileOutputStream outStream = null;
try {
// if file exists, remove it after questioning.
if (pToCreate.exists()) {
if (!pToCreate.delete())... | [
"private",
"static",
"synchronized",
"boolean",
"createStorageVolume",
"(",
"final",
"File",
"pToCreate",
",",
"final",
"long",
"pLength",
")",
"throws",
"IOException",
"{",
"FileOutputStream",
"outStream",
"=",
"null",
";",
"try",
"{",
"// if file exists, remove it a... | Creating a new file if not existing at the path defined in the config. Note that it is advised to create the file
beforehand.
@param pConf configuration to be updated
@return true if creation successful, false if file already exists.
@throws IOException if anything weird happens | [
"Creating",
"a",
"new",
"file",
"if",
"not",
"existing",
"at",
"the",
"path",
"defined",
"in",
"the",
"config",
".",
"Note",
"that",
"it",
"is",
"advised",
"to",
"create",
"the",
"file",
"beforehand",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/target/src/main/java/org/jscsi/target/storage/RandomAccessStorageModule.java#L153-L190 |
104,007 | sebastiangraf/jSCSI | bundles/target/src/main/java/org/jscsi/target/storage/RandomAccessStorageModule.java | RandomAccessStorageModule.recursiveDelete | public static boolean recursiveDelete (final File pFile) {
if (pFile.isDirectory()) {
for (final File child : pFile.listFiles()) {
if (!recursiveDelete(child)) { return false; }
}
}
return pFile.delete();
} | java | public static boolean recursiveDelete (final File pFile) {
if (pFile.isDirectory()) {
for (final File child : pFile.listFiles()) {
if (!recursiveDelete(child)) { return false; }
}
}
return pFile.delete();
} | [
"public",
"static",
"boolean",
"recursiveDelete",
"(",
"final",
"File",
"pFile",
")",
"{",
"if",
"(",
"pFile",
".",
"isDirectory",
"(",
")",
")",
"{",
"for",
"(",
"final",
"File",
"child",
":",
"pFile",
".",
"listFiles",
"(",
")",
")",
"{",
"if",
"("... | Deleting a storage recursive. Used for deleting a databases
@param pFile which should be deleted included descendants
@return true if delete is valid | [
"Deleting",
"a",
"storage",
"recursive",
".",
"Used",
"for",
"deleting",
"a",
"databases"
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/target/src/main/java/org/jscsi/target/storage/RandomAccessStorageModule.java#L198-L205 |
104,008 | sebastiangraf/jSCSI | bundles/commons/src/main/java/org/jscsi/parser/datasegment/TextParameterDataSegment.java | TextParameterDataSegment.add | public final void add (final OperationalTextKey textKey, final String value) {
final String s = textKey.value() + KEY_VALUE_DELIMITER + value + PAIR_DELIMITER;
resizeBuffer(s.length(), true);
dataBuffer.put(s.getBytes());
isDirty = true;
} | java | public final void add (final OperationalTextKey textKey, final String value) {
final String s = textKey.value() + KEY_VALUE_DELIMITER + value + PAIR_DELIMITER;
resizeBuffer(s.length(), true);
dataBuffer.put(s.getBytes());
isDirty = true;
} | [
"public",
"final",
"void",
"add",
"(",
"final",
"OperationalTextKey",
"textKey",
",",
"final",
"String",
"value",
")",
"{",
"final",
"String",
"s",
"=",
"textKey",
".",
"value",
"(",
")",
"+",
"KEY_VALUE_DELIMITER",
"+",
"value",
"+",
"PAIR_DELIMITER",
";",
... | Add a given operation text keys with the given value to the key value pairs.
@param textKey One of the valid operation text keys listed above.
@param value The value of this operation text key.
@see de.unikn.inf.disy.blockdebix.iscsi.parser.datasegment.OperationalTextKey | [
"Add",
"a",
"given",
"operation",
"text",
"keys",
"with",
"the",
"given",
"value",
"to",
"the",
"key",
"value",
"pairs",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/commons/src/main/java/org/jscsi/parser/datasegment/TextParameterDataSegment.java#L103-L110 |
104,009 | sebastiangraf/jSCSI | bundles/target/src/main/java/org/jscsi/target/scsi/sense/SenseData.java | SenseData.getReponseCodeFor | public static final int getReponseCodeFor (final ErrorType errorType, final SenseDataFormat senseDataFormat) {
if (senseDataFormat == SenseDataFormat.FIXED) {
if (errorType == ErrorType.CURRENT)
return 0x70;
else
// errorType == DEFERRED
... | java | public static final int getReponseCodeFor (final ErrorType errorType, final SenseDataFormat senseDataFormat) {
if (senseDataFormat == SenseDataFormat.FIXED) {
if (errorType == ErrorType.CURRENT)
return 0x70;
else
// errorType == DEFERRED
... | [
"public",
"static",
"final",
"int",
"getReponseCodeFor",
"(",
"final",
"ErrorType",
"errorType",
",",
"final",
"SenseDataFormat",
"senseDataFormat",
")",
"{",
"if",
"(",
"senseDataFormat",
"==",
"SenseDataFormat",
".",
"FIXED",
")",
"{",
"if",
"(",
"errorType",
... | Returns the proper response code for the given error type and sense data format.
@param errorType a sense data error type
@param senseDataFormat a sense data format
@return the proper response code | [
"Returns",
"the",
"proper",
"response",
"code",
"for",
"the",
"given",
"error",
"type",
"and",
"sense",
"data",
"format",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/target/src/main/java/org/jscsi/target/scsi/sense/SenseData.java#L77-L94 |
104,010 | sebastiangraf/jSCSI | bundles/targetExtensions/scsi/src/org/jscsi/scsi/protocol/mode/ModePageRegistry.java | ModePageRegistry.get | public Collection<ModePage> get(boolean subPages)
{
List<ModePage> value = new LinkedList<ModePage>();
for (Map<Integer, ModePage> pagelist : pages.values())
{
for (ModePage page : pagelist.values())
{
if (page.getSubPageCode() == 0x00)
{
... | java | public Collection<ModePage> get(boolean subPages)
{
List<ModePage> value = new LinkedList<ModePage>();
for (Map<Integer, ModePage> pagelist : pages.values())
{
for (ModePage page : pagelist.values())
{
if (page.getSubPageCode() == 0x00)
{
... | [
"public",
"Collection",
"<",
"ModePage",
">",
"get",
"(",
"boolean",
"subPages",
")",
"{",
"List",
"<",
"ModePage",
">",
"value",
"=",
"new",
"LinkedList",
"<",
"ModePage",
">",
"(",
")",
";",
"for",
"(",
"Map",
"<",
"Integer",
",",
"ModePage",
">",
... | Returns all mode pages.
@param subPages Returns all pages, including subpages, if <code>true</code>; returns only
page_0 pages if <code>false</code>. | [
"Returns",
"all",
"mode",
"pages",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/targetExtensions/scsi/src/org/jscsi/scsi/protocol/mode/ModePageRegistry.java#L118-L136 |
104,011 | sebastiangraf/jSCSI | bundles/targetExtensions/scsi/src/org/jscsi/scsi/protocol/mode/ModePageRegistry.java | ModePageRegistry.get | public Collection<ModePage> get(byte pageCode)
{
if (this.contains(pageCode))
return this.pages.get(pageCode).values();
else
return null;
} | java | public Collection<ModePage> get(byte pageCode)
{
if (this.contains(pageCode))
return this.pages.get(pageCode).values();
else
return null;
} | [
"public",
"Collection",
"<",
"ModePage",
">",
"get",
"(",
"byte",
"pageCode",
")",
"{",
"if",
"(",
"this",
".",
"contains",
"(",
"pageCode",
")",
")",
"return",
"this",
".",
"pages",
".",
"get",
"(",
"pageCode",
")",
".",
"values",
"(",
")",
";",
"... | Returns all mode pages with the given page code. | [
"Returns",
"all",
"mode",
"pages",
"with",
"the",
"given",
"page",
"code",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/targetExtensions/scsi/src/org/jscsi/scsi/protocol/mode/ModePageRegistry.java#L141-L147 |
104,012 | sebastiangraf/jSCSI | bundles/commons/src/main/java/org/jscsi/parser/digest/CRCTables.java | CRCTables.getTable | public final int[] getTable (final int offset) {
final int[] table = new int[SIZE_OF_TABLE];
long numberToCalculate;
for (int number = 0; number < table.length; number++) {
numberToCalculate = Integer.reverseBytes(Integer.reverse(number));
table[number] = calculateCRC32... | java | public final int[] getTable (final int offset) {
final int[] table = new int[SIZE_OF_TABLE];
long numberToCalculate;
for (int number = 0; number < table.length; number++) {
numberToCalculate = Integer.reverseBytes(Integer.reverse(number));
table[number] = calculateCRC32... | [
"public",
"final",
"int",
"[",
"]",
"getTable",
"(",
"final",
"int",
"offset",
")",
"{",
"final",
"int",
"[",
"]",
"table",
"=",
"new",
"int",
"[",
"SIZE_OF_TABLE",
"]",
";",
"long",
"numberToCalculate",
";",
"for",
"(",
"int",
"number",
"=",
"0",
";... | Returns all remainders of the polynomial division for the given offset.
@param offset The numbers of bits to shift, e.g. for <code>A</code> offset is <code>56</code>, for <code>D</code>
<code>32</code>.
@return The CRC table with all remainders for the given offset. | [
"Returns",
"all",
"remainders",
"of",
"the",
"polynomial",
"division",
"for",
"the",
"given",
"offset",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/commons/src/main/java/org/jscsi/parser/digest/CRCTables.java#L83-L94 |
104,013 | sebastiangraf/jSCSI | bundles/commons/src/main/java/org/jscsi/parser/AbstractMessageParser.java | AbstractMessageParser.deserializeBasicHeaderSegment | final void deserializeBasicHeaderSegment (final ByteBuffer pdu) throws InternetSCSIException {
deserializeBytes1to3(pdu.getInt() & FIRST_SPECIFIC_FIELD_MASK);
pdu.position(BasicHeaderSegment.BYTES_8_11);
deserializeBytes8to11(pdu.getInt());
deserializeBytes12to15(pdu.getInt());
... | java | final void deserializeBasicHeaderSegment (final ByteBuffer pdu) throws InternetSCSIException {
deserializeBytes1to3(pdu.getInt() & FIRST_SPECIFIC_FIELD_MASK);
pdu.position(BasicHeaderSegment.BYTES_8_11);
deserializeBytes8to11(pdu.getInt());
deserializeBytes12to15(pdu.getInt());
... | [
"final",
"void",
"deserializeBasicHeaderSegment",
"(",
"final",
"ByteBuffer",
"pdu",
")",
"throws",
"InternetSCSIException",
"{",
"deserializeBytes1to3",
"(",
"pdu",
".",
"getInt",
"(",
")",
"&",
"FIRST_SPECIFIC_FIELD_MASK",
")",
";",
"pdu",
".",
"position",
"(",
... | This method defines the order of the parsing process of the operation code specific fields and check their
integtity.
@param pdu Array which contains the total Protocol Data Unit.
@throws InternetSCSIException If any violation of the iSCSI-Standard emerge. | [
"This",
"method",
"defines",
"the",
"order",
"of",
"the",
"parsing",
"process",
"of",
"the",
"operation",
"code",
"specific",
"fields",
"and",
"check",
"their",
"integtity",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/commons/src/main/java/org/jscsi/parser/AbstractMessageParser.java#L89-L103 |
104,014 | sebastiangraf/jSCSI | bundles/commons/src/main/java/org/jscsi/parser/AbstractMessageParser.java | AbstractMessageParser.serializeBasicHeaderSegment | final void serializeBasicHeaderSegment (final ByteBuffer dst, final int offset) throws InternetSCSIException {
dst.position(offset);
dst.putInt(offset, dst.getInt() | serializeBytes1to3());
dst.position(offset + BasicHeaderSegment.BYTES_8_11);
dst.putInt(serializeBytes8to11());
... | java | final void serializeBasicHeaderSegment (final ByteBuffer dst, final int offset) throws InternetSCSIException {
dst.position(offset);
dst.putInt(offset, dst.getInt() | serializeBytes1to3());
dst.position(offset + BasicHeaderSegment.BYTES_8_11);
dst.putInt(serializeBytes8to11());
... | [
"final",
"void",
"serializeBasicHeaderSegment",
"(",
"final",
"ByteBuffer",
"dst",
",",
"final",
"int",
"offset",
")",
"throws",
"InternetSCSIException",
"{",
"dst",
".",
"position",
"(",
"offset",
")",
";",
"dst",
".",
"putInt",
"(",
"offset",
",",
"dst",
"... | This method serializes the whole BHS to its byte representation.
@param dst The destination <code>ByteBuffer</code> to write to.
@param offset The start offset in <code>dst</code>.
@throws InternetSCSIException If any violation of the iSCSI-Standard emerge. | [
"This",
"method",
"serializes",
"the",
"whole",
"BHS",
"to",
"its",
"byte",
"representation",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/commons/src/main/java/org/jscsi/parser/AbstractMessageParser.java#L112-L129 |
104,015 | sebastiangraf/jSCSI | bundles/initiator/src/main/java/org/jscsi/initiator/Configuration.java | Configuration.getSetting | public final String getSetting (final String targetName, final int connectionID, final OperationalTextKey textKey) throws OperationalTextKeyException {
try {
final SessionConfiguration sc;
synchronized (sessionConfigs) {
sc = sessionConfigs.get(targetName);
... | java | public final String getSetting (final String targetName, final int connectionID, final OperationalTextKey textKey) throws OperationalTextKeyException {
try {
final SessionConfiguration sc;
synchronized (sessionConfigs) {
sc = sessionConfigs.get(targetName);
... | [
"public",
"final",
"String",
"getSetting",
"(",
"final",
"String",
"targetName",
",",
"final",
"int",
"connectionID",
",",
"final",
"OperationalTextKey",
"textKey",
")",
"throws",
"OperationalTextKeyException",
"{",
"try",
"{",
"final",
"SessionConfiguration",
"sc",
... | Returns the value of a single parameter, instead of all values.
@param targetName Name of the iSCSI Target to connect.
@param connectionID The ID of the connection to retrieve.
@param textKey The name of the parameter.
@return The value of the given parameter.
@throws OperationalTextKeyException If the given parameter... | [
"Returns",
"the",
"value",
"of",
"a",
"single",
"parameter",
"instead",
"of",
"all",
"values",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/initiator/src/main/java/org/jscsi/initiator/Configuration.java#L205-L235 |
104,016 | sebastiangraf/jSCSI | bundles/initiator/src/main/java/org/jscsi/initiator/Configuration.java | Configuration.getSessionSetting | public final String getSessionSetting (final String targetName, final OperationalTextKey textKey) throws OperationalTextKeyException {
return getSetting(targetName, -1, textKey);
} | java | public final String getSessionSetting (final String targetName, final OperationalTextKey textKey) throws OperationalTextKeyException {
return getSetting(targetName, -1, textKey);
} | [
"public",
"final",
"String",
"getSessionSetting",
"(",
"final",
"String",
"targetName",
",",
"final",
"OperationalTextKey",
"textKey",
")",
"throws",
"OperationalTextKeyException",
"{",
"return",
"getSetting",
"(",
"targetName",
",",
"-",
"1",
",",
"textKey",
")",
... | Returns the value of a single parameter. It can only return session and global parameters.
@param targetName Name of the iSCSI Target to connect.
@param textKey The name of the parameter.
@return The value of the given parameter.
@throws OperationalTextKeyException If the given parameter cannot be found. | [
"Returns",
"the",
"value",
"of",
"a",
"single",
"parameter",
".",
"It",
"can",
"only",
"return",
"session",
"and",
"global",
"parameters",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/initiator/src/main/java/org/jscsi/initiator/Configuration.java#L283-L286 |
104,017 | sebastiangraf/jSCSI | bundles/initiator/src/main/java/org/jscsi/initiator/Configuration.java | Configuration.update | public final void update (final String targetName, final int connectionID, final SettingsMap response) throws NoSuchSessionException {
final SessionConfiguration sc;
synchronized (sessionConfigs) {
sc = sessionConfigs.get(targetName);
synchronized (sc) {
if (sc ... | java | public final void update (final String targetName, final int connectionID, final SettingsMap response) throws NoSuchSessionException {
final SessionConfiguration sc;
synchronized (sessionConfigs) {
sc = sessionConfigs.get(targetName);
synchronized (sc) {
if (sc ... | [
"public",
"final",
"void",
"update",
"(",
"final",
"String",
"targetName",
",",
"final",
"int",
"connectionID",
",",
"final",
"SettingsMap",
"response",
")",
"throws",
"NoSuchSessionException",
"{",
"final",
"SessionConfiguration",
"sc",
";",
"synchronized",
"(",
... | Updates the stored settings of a connection with these values from the response of the iSCSI Target.
@param targetName The name of the iSCSI Target.
@param connectionID The ID of the connection within this iSCSI Target.
@param response The response settings.
@throws NoSuchSessionException if a session with this target... | [
"Updates",
"the",
"stored",
"settings",
"of",
"a",
"connection",
"with",
"these",
"values",
"from",
"the",
"response",
"of",
"the",
"iSCSI",
"Target",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/initiator/src/main/java/org/jscsi/initiator/Configuration.java#L312-L346 |
104,018 | sebastiangraf/jSCSI | bundles/initiator/src/main/java/org/jscsi/initiator/Configuration.java | Configuration.parseSettings | private final void parseSettings (final Element root) {
if (root == null) { throw new NullPointerException(); }
clear();
parseGlobalSettings(root);
parseTargetSpecificSettings(root);
} | java | private final void parseSettings (final Element root) {
if (root == null) { throw new NullPointerException(); }
clear();
parseGlobalSettings(root);
parseTargetSpecificSettings(root);
} | [
"private",
"final",
"void",
"parseSettings",
"(",
"final",
"Element",
"root",
")",
"{",
"if",
"(",
"root",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
")",
";",
"}",
"clear",
"(",
")",
";",
"parseGlobalSettings",
"(",
"root",
")"... | Parses all settings form the main configuration file.
@param root The root element of the configuration. | [
"Parses",
"all",
"settings",
"form",
"the",
"main",
"configuration",
"file",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/initiator/src/main/java/org/jscsi/initiator/Configuration.java#L392-L399 |
104,019 | sebastiangraf/jSCSI | bundles/initiator/src/main/java/org/jscsi/initiator/Configuration.java | Configuration.parseGlobalSettings | private final void parseGlobalSettings (final Element root) {
final NodeList globalConfiguration = root.getElementsByTagName(ELEMENT_GLOBAL);
final ResultFunctionFactory resultFunctionFactory = new ResultFunctionFactory();
Node parameter;
NodeList parameters;
NamedNodeMap attri... | java | private final void parseGlobalSettings (final Element root) {
final NodeList globalConfiguration = root.getElementsByTagName(ELEMENT_GLOBAL);
final ResultFunctionFactory resultFunctionFactory = new ResultFunctionFactory();
Node parameter;
NodeList parameters;
NamedNodeMap attri... | [
"private",
"final",
"void",
"parseGlobalSettings",
"(",
"final",
"Element",
"root",
")",
"{",
"final",
"NodeList",
"globalConfiguration",
"=",
"root",
".",
"getElementsByTagName",
"(",
"ELEMENT_GLOBAL",
")",
";",
"final",
"ResultFunctionFactory",
"resultFunctionFactory"... | Parses all global settings form the main configuration file.
@param root The root element of the configuration. | [
"Parses",
"all",
"global",
"settings",
"form",
"the",
"main",
"configuration",
"file",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/initiator/src/main/java/org/jscsi/initiator/Configuration.java#L406-L437 |
104,020 | sebastiangraf/jSCSI | bundles/initiator/src/main/java/org/jscsi/initiator/Configuration.java | Configuration.parseTargetSpecificSettings | private final void parseTargetSpecificSettings (final Element root) {
final NodeList targets = root.getElementsByTagName(ELEMENT_TARGET);
Node target;
Node parameter;
NodeList parameters;
try {
for (int i = 0; i < targets.getLength(); i++) {
target ... | java | private final void parseTargetSpecificSettings (final Element root) {
final NodeList targets = root.getElementsByTagName(ELEMENT_TARGET);
Node target;
Node parameter;
NodeList parameters;
try {
for (int i = 0; i < targets.getLength(); i++) {
target ... | [
"private",
"final",
"void",
"parseTargetSpecificSettings",
"(",
"final",
"Element",
"root",
")",
"{",
"final",
"NodeList",
"targets",
"=",
"root",
".",
"getElementsByTagName",
"(",
"ELEMENT_TARGET",
")",
";",
"Node",
"target",
";",
"Node",
"parameter",
";",
"Nod... | Parses all target-specific settings form the main configuration file.
@param root The root element of the configuration. | [
"Parses",
"all",
"target",
"-",
"specific",
"settings",
"form",
"the",
"main",
"configuration",
"file",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/initiator/src/main/java/org/jscsi/initiator/Configuration.java#L444-L481 |
104,021 | sebastiangraf/jSCSI | bundles/target/src/main/java/org/jscsi/target/util/Debug.java | Debug.byteBufferToString | public static String byteBufferToString (final ByteBuffer buffer) {
if (buffer == null) return "null";
final int numberOfBytes = buffer.limit();
final StringBuilder sb = new StringBuilder();
buffer.position(0);
int value;
for (int i = 1; i <= numberOfBytes; ++... | java | public static String byteBufferToString (final ByteBuffer buffer) {
if (buffer == null) return "null";
final int numberOfBytes = buffer.limit();
final StringBuilder sb = new StringBuilder();
buffer.position(0);
int value;
for (int i = 1; i <= numberOfBytes; ++... | [
"public",
"static",
"String",
"byteBufferToString",
"(",
"final",
"ByteBuffer",
"buffer",
")",
"{",
"if",
"(",
"buffer",
"==",
"null",
")",
"return",
"\"null\"",
";",
"final",
"int",
"numberOfBytes",
"=",
"buffer",
".",
"limit",
"(",
")",
";",
"final",
"St... | Returns a string containing the buffered values in the defined format.
@param buffer contains the bytes to return in the {@link String}
@return a {@link String} with the values in tabular arrangement | [
"Returns",
"a",
"string",
"containing",
"the",
"buffered",
"values",
"in",
"the",
"defined",
"format",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/target/src/main/java/org/jscsi/target/util/Debug.java#L38-L59 |
104,022 | sebastiangraf/jSCSI | bundles/target/src/main/java/org/jscsi/target/connection/phase/TargetLoginPhase.java | TargetLoginPhase.execute | @Override
public boolean execute (ProtocolDataUnit pdu) throws IOException , InterruptedException , InternetSCSIException , DigestException , SettingsException {
// begin login negotiation
final ConnectionSettingsNegotiator negotiator = connection.getConnectionSettingsNegotiator();
whi... | java | @Override
public boolean execute (ProtocolDataUnit pdu) throws IOException , InterruptedException , InternetSCSIException , DigestException , SettingsException {
// begin login negotiation
final ConnectionSettingsNegotiator negotiator = connection.getConnectionSettingsNegotiator();
whi... | [
"@",
"Override",
"public",
"boolean",
"execute",
"(",
"ProtocolDataUnit",
"pdu",
")",
"throws",
"IOException",
",",
"InterruptedException",
",",
"InternetSCSIException",
",",
"DigestException",
",",
"SettingsException",
"{",
"// begin login negotiation\r",
"final",
"Conne... | Starts the login phase.
@param pdu {@inheritDoc}
@return {@inheritDoc}
@throws OperationNotSupportedException {@inheritDoc}
@throws IOException {@inheritDoc}
@throws InterruptedException {@inheritDoc}
@throws InternetSCSIException {@inheritDoc}
@throws DigestException {@inheritDoc}
@throws SettingsException {@inheritD... | [
"Starts",
"the",
"login",
"phase",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/target/src/main/java/org/jscsi/target/connection/phase/TargetLoginPhase.java#L75-L154 |
104,023 | sebastiangraf/jSCSI | bundles/targetExtensions/scsi/src/org/jscsi/scsi/tasks/management/DefaultTaskSet.java | DefaultTaskSet.drainTo | public int drainTo(Collection<? super Task> c)
{
if (c == this)
throw new IllegalArgumentException("cannot drain task set into itself");
if (c == null)
throw new NullPointerException("target collection must not be null");
int count = 0;
while (true)
{
... | java | public int drainTo(Collection<? super Task> c)
{
if (c == this)
throw new IllegalArgumentException("cannot drain task set into itself");
if (c == null)
throw new NullPointerException("target collection must not be null");
int count = 0;
while (true)
{
... | [
"public",
"int",
"drainTo",
"(",
"Collection",
"<",
"?",
"super",
"Task",
">",
"c",
")",
"{",
"if",
"(",
"c",
"==",
"this",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"cannot drain task set into itself\"",
")",
";",
"if",
"(",
"c",
"==",
"null... | Removes all available elements from this task set. Any tasks that are blocked will not be
removed. Will cease draining if the thread is interrupted. | [
"Removes",
"all",
"available",
"elements",
"from",
"this",
"task",
"set",
".",
"Any",
"tasks",
"that",
"are",
"blocked",
"will",
"not",
"be",
"removed",
".",
"Will",
"cease",
"draining",
"if",
"the",
"thread",
"is",
"interrupted",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/targetExtensions/scsi/src/org/jscsi/scsi/tasks/management/DefaultTaskSet.java#L612-L636 |
104,024 | sebastiangraf/jSCSI | bundles/commons/src/main/java/org/jscsi/utils/Utils.java | Utils.indent | private static final void indent (final StringBuilder sb, final int indent) {
for (int i = 0; i < indent; i++) {
sb.append(LOG_OUT_INDENT);
}
} | java | private static final void indent (final StringBuilder sb, final int indent) {
for (int i = 0; i < indent; i++) {
sb.append(LOG_OUT_INDENT);
}
} | [
"private",
"static",
"final",
"void",
"indent",
"(",
"final",
"StringBuilder",
"sb",
",",
"final",
"int",
"indent",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"indent",
";",
"i",
"++",
")",
"{",
"sb",
".",
"append",
"(",
"LOG_OUT_IN... | Appends to a given StringBuilder the given indents depending on the indent level.
@param sb StringBuilder to write in.
@param indent The number (level) of indents. | [
"Appends",
"to",
"a",
"given",
"StringBuilder",
"the",
"given",
"indents",
"depending",
"on",
"the",
"indent",
"level",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/commons/src/main/java/org/jscsi/utils/Utils.java#L213-L218 |
104,025 | sebastiangraf/jSCSI | bundles/targetExtensions/scsi/src/org/jscsi/scsi/lu/AbstractLogicalUnit.java | AbstractLogicalUnit.abortTaskSet | public TaskServiceResponse abortTaskSet(Nexus nexus)
{
try
{
this.taskSet.abort(nexus);
return TaskServiceResponse.FUNCTION_COMPLETE;
}
catch (InterruptedException e)
{
return TaskServiceResponse.SERVICE_DELIVERY_OR_TARGET_FAILURE;
}
catch (Illegal... | java | public TaskServiceResponse abortTaskSet(Nexus nexus)
{
try
{
this.taskSet.abort(nexus);
return TaskServiceResponse.FUNCTION_COMPLETE;
}
catch (InterruptedException e)
{
return TaskServiceResponse.SERVICE_DELIVERY_OR_TARGET_FAILURE;
}
catch (Illegal... | [
"public",
"TaskServiceResponse",
"abortTaskSet",
"(",
"Nexus",
"nexus",
")",
"{",
"try",
"{",
"this",
".",
"taskSet",
".",
"abort",
"(",
"nexus",
")",
";",
"return",
"TaskServiceResponse",
".",
"FUNCTION_COMPLETE",
";",
"}",
"catch",
"(",
"InterruptedException",... | is simply attempting to remove a task from the scheduler | [
"is",
"simply",
"attempting",
"to",
"remove",
"a",
"task",
"from",
"the",
"scheduler"
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/targetExtensions/scsi/src/org/jscsi/scsi/lu/AbstractLogicalUnit.java#L170-L185 |
104,026 | sebastiangraf/jSCSI | bundles/target/src/main/java/org/jscsi/target/scsi/modeSense/ModeParameterListBuilder.java | ModeParameterListBuilder.checkIntegrity | boolean checkIntegrity () {
if (headerType == null) return false;
if (headerType == HeaderType.MODE_PARAMETER_HEADER_6 && longLba) return false;
return true;
} | java | boolean checkIntegrity () {
if (headerType == null) return false;
if (headerType == HeaderType.MODE_PARAMETER_HEADER_6 && longLba) return false;
return true;
} | [
"boolean",
"checkIntegrity",
"(",
")",
"{",
"if",
"(",
"headerType",
"==",
"null",
")",
"return",
"false",
";",
"if",
"(",
"headerType",
"==",
"HeaderType",
".",
"MODE_PARAMETER_HEADER_6",
"&&",
"longLba",
")",
"return",
"false",
";",
"return",
"true",
";",
... | This method is used for checking that all required members are initialized and their respective values compatible
with each other.
@return <code>true</code> if everything is fine, <code>false</code> if not | [
"This",
"method",
"is",
"used",
"for",
"checking",
"that",
"all",
"required",
"members",
"are",
"initialized",
"and",
"their",
"respective",
"values",
"compatible",
"with",
"each",
"other",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/target/src/main/java/org/jscsi/target/scsi/modeSense/ModeParameterListBuilder.java#L71-L75 |
104,027 | sebastiangraf/jSCSI | bundles/initiator/src/main/java/org/jscsi/initiator/connection/Connection.java | Connection.update | public final void update (final SettingsMap response) throws NoSuchSessionException {
configuration.update(referenceSession.getTargetName(), connectionID, response);
} | java | public final void update (final SettingsMap response) throws NoSuchSessionException {
configuration.update(referenceSession.getTargetName(), connectionID, response);
} | [
"public",
"final",
"void",
"update",
"(",
"final",
"SettingsMap",
"response",
")",
"throws",
"NoSuchSessionException",
"{",
"configuration",
".",
"update",
"(",
"referenceSession",
".",
"getTargetName",
"(",
")",
",",
"connectionID",
",",
"response",
")",
";",
"... | Updates all entries of the given response key-values with the stored settings of this instance.
@param response The settings of the response.
@throws NoSuchSessionException if a session with this target name is not open. | [
"Updates",
"all",
"entries",
"of",
"the",
"given",
"response",
"key",
"-",
"values",
"with",
"the",
"stored",
"settings",
"of",
"this",
"instance",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/initiator/src/main/java/org/jscsi/initiator/connection/Connection.java#L118-L121 |
104,028 | sebastiangraf/jSCSI | bundles/initiator/src/main/java/org/jscsi/initiator/connection/Connection.java | Connection.nextState | public final void nextState (final IState newState) throws InternetSCSIException {
this.state = newState;
if (this.state != null) {
do {
this.state.execute();
LOGGER.info("State is following: " + this.state.nextStateFollowing());
} while (this.sta... | java | public final void nextState (final IState newState) throws InternetSCSIException {
this.state = newState;
if (this.state != null) {
do {
this.state.execute();
LOGGER.info("State is following: " + this.state.nextStateFollowing());
} while (this.sta... | [
"public",
"final",
"void",
"nextState",
"(",
"final",
"IState",
"newState",
")",
"throws",
"InternetSCSIException",
"{",
"this",
".",
"state",
"=",
"newState",
";",
"if",
"(",
"this",
".",
"state",
"!=",
"null",
")",
"{",
"do",
"{",
"this",
".",
"state",... | Switch to the new state. Start point of the state pattern. All states are computed one after another.
@param newState The new state.
@throws InternetSCSIException of any kind | [
"Switch",
"to",
"the",
"new",
"state",
".",
"Start",
"point",
"of",
"the",
"state",
"pattern",
".",
"All",
"states",
"are",
"computed",
"one",
"after",
"another",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/initiator/src/main/java/org/jscsi/initiator/connection/Connection.java#L211-L221 |
104,029 | sebastiangraf/jSCSI | bundles/initiator/src/main/java/org/jscsi/initiator/connection/Connection.java | Connection.send | public final void send (final ProtocolDataUnit protocolDataUnit) throws InternetSCSIException {
try {
senderReceiver.sendOverWire(protocolDataUnit);
} catch (IOException e) {
throw new InternetSCSIException(e);
} catch (InterruptedException e) {
throw new Int... | java | public final void send (final ProtocolDataUnit protocolDataUnit) throws InternetSCSIException {
try {
senderReceiver.sendOverWire(protocolDataUnit);
} catch (IOException e) {
throw new InternetSCSIException(e);
} catch (InterruptedException e) {
throw new Int... | [
"public",
"final",
"void",
"send",
"(",
"final",
"ProtocolDataUnit",
"protocolDataUnit",
")",
"throws",
"InternetSCSIException",
"{",
"try",
"{",
"senderReceiver",
".",
"sendOverWire",
"(",
"protocolDataUnit",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
... | Enqueue this protocol data unit to the end of the sending queue.
@param protocolDataUnit The protocol data unit to add.
@throws InternetSCSIException for nearly everything | [
"Enqueue",
"this",
"protocol",
"data",
"unit",
"to",
"the",
"end",
"of",
"the",
"sending",
"queue",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/initiator/src/main/java/org/jscsi/initiator/connection/Connection.java#L273-L282 |
104,030 | sebastiangraf/jSCSI | bundles/initiator/src/main/java/org/jscsi/initiator/connection/Connection.java | Connection.send | public final void send (final Queue<ProtocolDataUnit> protocolDataUnits) throws InternetSCSIException {
for (final ProtocolDataUnit unit : protocolDataUnits) {
send(unit);
}
} | java | public final void send (final Queue<ProtocolDataUnit> protocolDataUnits) throws InternetSCSIException {
for (final ProtocolDataUnit unit : protocolDataUnits) {
send(unit);
}
} | [
"public",
"final",
"void",
"send",
"(",
"final",
"Queue",
"<",
"ProtocolDataUnit",
">",
"protocolDataUnits",
")",
"throws",
"InternetSCSIException",
"{",
"for",
"(",
"final",
"ProtocolDataUnit",
"unit",
":",
"protocolDataUnits",
")",
"{",
"send",
"(",
"unit",
")... | Enqueue all protocol data units to the end of the sending queue.
@param protocolDataUnits The list with all protocol data units to add.
@throws InternetSCSIException for nearly everything | [
"Enqueue",
"all",
"protocol",
"data",
"units",
"to",
"the",
"end",
"of",
"the",
"sending",
"queue",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/initiator/src/main/java/org/jscsi/initiator/connection/Connection.java#L290-L295 |
104,031 | sebastiangraf/jSCSI | bundles/commons/src/main/java/org/jscsi/utils/SoftHashMap.java | SoftHashMap.processQueue | @SuppressWarnings ({ "rawtypes", "unchecked" })
private final void processQueue () {
SoftValue<V> softValue;
while ((softValue = (SoftValue) queue.poll()) != null) {
internalMap.remove(softValue.key);
}
} | java | @SuppressWarnings ({ "rawtypes", "unchecked" })
private final void processQueue () {
SoftValue<V> softValue;
while ((softValue = (SoftValue) queue.poll()) != null) {
internalMap.remove(softValue.key);
}
} | [
"@",
"SuppressWarnings",
"(",
"{",
"\"rawtypes\"",
",",
"\"unchecked\"",
"}",
")",
"private",
"final",
"void",
"processQueue",
"(",
")",
"{",
"SoftValue",
"<",
"V",
">",
"softValue",
";",
"while",
"(",
"(",
"softValue",
"=",
"(",
"SoftValue",
")",
"queue",... | Remove garbage collected soft values with the help of the reference queue. | [
"Remove",
"garbage",
"collected",
"soft",
"values",
"with",
"the",
"help",
"of",
"the",
"reference",
"queue",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/commons/src/main/java/org/jscsi/utils/SoftHashMap.java#L175-L182 |
104,032 | sebastiangraf/jSCSI | bundles/target/src/main/java/org/jscsi/target/settings/SingleNumericalValue.java | SingleNumericalValue.base64ValueOf | private static final int base64ValueOf (final char c) {
if ('A' <= c && c <= 'Z') return c - 'A';
if ('a' <= c && c <= 'z') return c - 'a' + 26;
if ('0' <= c && c <= '9') return c - '0' + 52;
if (c == '+') return 62;
if (c == '/') return 63;
throw new NumberFormatEx... | java | private static final int base64ValueOf (final char c) {
if ('A' <= c && c <= 'Z') return c - 'A';
if ('a' <= c && c <= 'z') return c - 'a' + 26;
if ('0' <= c && c <= '9') return c - '0' + 52;
if (c == '+') return 62;
if (c == '/') return 63;
throw new NumberFormatEx... | [
"private",
"static",
"final",
"int",
"base64ValueOf",
"(",
"final",
"char",
"c",
")",
"{",
"if",
"(",
"'",
"'",
"<=",
"c",
"&&",
"c",
"<=",
"'",
"'",
")",
"return",
"c",
"-",
"'",
"'",
";",
"if",
"(",
"'",
"'",
"<=",
"c",
"&&",
"c",
"<=",
"... | Returns a character's value in Base64
@param c a character that is assigned a value from 0 to 63 in Base64
@throws NumberFormatException if the parameter is not a Base64 character
@return the character's value in Base64 | [
"Returns",
"a",
"character",
"s",
"value",
"in",
"Base64"
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/target/src/main/java/org/jscsi/target/settings/SingleNumericalValue.java#L125-L132 |
104,033 | sebastiangraf/jSCSI | bundles/target/src/main/java/org/jscsi/target/connection/stage/login/TargetLoginStage.java | TargetLoginStage.sendRejectPdu | protected final void sendRejectPdu (final LoginStatus errorStatus) throws InterruptedException , IOException , InternetSCSIException {
final ProtocolDataUnit rejectPDU = TargetPduFactory.createLoginResponsePdu(false,// transit flag
false,// continueFlag
stageNumber,// currentS... | java | protected final void sendRejectPdu (final LoginStatus errorStatus) throws InterruptedException , IOException , InternetSCSIException {
final ProtocolDataUnit rejectPDU = TargetPduFactory.createLoginResponsePdu(false,// transit flag
false,// continueFlag
stageNumber,// currentS... | [
"protected",
"final",
"void",
"sendRejectPdu",
"(",
"final",
"LoginStatus",
"errorStatus",
")",
"throws",
"InterruptedException",
",",
"IOException",
",",
"InternetSCSIException",
"{",
"final",
"ProtocolDataUnit",
"rejectPDU",
"=",
"TargetPduFactory",
".",
"createLoginRes... | Sends a Login Response PDU informing the initiator that an error has occurred and that the connection must be
closed.
@param errorStatus hints to the cause of the error
@throws InterruptedException
@throws IOException
@throws InternetSCSIException | [
"Sends",
"a",
"Login",
"Response",
"PDU",
"informing",
"the",
"initiator",
"that",
"an",
"error",
"has",
"occurred",
"and",
"that",
"the",
"connection",
"must",
"be",
"closed",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/target/src/main/java/org/jscsi/target/connection/stage/login/TargetLoginStage.java#L250-L261 |
104,034 | sebastiangraf/jSCSI | bundles/commons/src/main/java/org/jscsi/parser/datasegment/SettingsMap.java | SettingsMap.get | public final String get (final OperationalTextKey textKey) {
if (textKey == null) { throw new NullPointerException(); }
return settingsMap.get(textKey);
} | java | public final String get (final OperationalTextKey textKey) {
if (textKey == null) { throw new NullPointerException(); }
return settingsMap.get(textKey);
} | [
"public",
"final",
"String",
"get",
"(",
"final",
"OperationalTextKey",
"textKey",
")",
"{",
"if",
"(",
"textKey",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
")",
";",
"}",
"return",
"settingsMap",
".",
"get",
"(",
"textKey",
")",... | Returns the value of the given parameter, which is not parsed.
@param textKey The name of the parameter.
@return The value of this parameter. | [
"Returns",
"the",
"value",
"of",
"the",
"given",
"parameter",
"which",
"is",
"not",
"parsed",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/commons/src/main/java/org/jscsi/parser/datasegment/SettingsMap.java#L91-L96 |
104,035 | sebastiangraf/jSCSI | bundles/commons/src/main/java/org/jscsi/parser/datasegment/SettingsMap.java | SettingsMap.asByteBuffer | public final ByteBuffer asByteBuffer () {
final StringBuilder sb = new StringBuilder();
for (Map.Entry<OperationalTextKey , String> e : settingsMap.entrySet()) {
sb.append(e.getKey().value());
sb.append(KEY_VALUE_DELIMITER);
sb.append(e.getValue());
sb.ap... | java | public final ByteBuffer asByteBuffer () {
final StringBuilder sb = new StringBuilder();
for (Map.Entry<OperationalTextKey , String> e : settingsMap.entrySet()) {
sb.append(e.getKey().value());
sb.append(KEY_VALUE_DELIMITER);
sb.append(e.getValue());
sb.ap... | [
"public",
"final",
"ByteBuffer",
"asByteBuffer",
"(",
")",
"{",
"final",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"Map",
".",
"Entry",
"<",
"OperationalTextKey",
",",
"String",
">",
"e",
":",
"settingsMap",
".",
"entry... | Returns a buffer of the serialized key-value pairs, which are contained in this instance.
@return The serialized key-value pairs. | [
"Returns",
"a",
"buffer",
"of",
"the",
"serialized",
"key",
"-",
"value",
"pairs",
"which",
"are",
"contained",
"in",
"this",
"instance",
"."
] | 6169bfe73f0b15de7d6485453555389e782ae888 | https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/commons/src/main/java/org/jscsi/parser/datasegment/SettingsMap.java#L265-L276 |
104,036 | RestComm/jdiameter | core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/transport/tcp/TCPTransportClient.java | TCPTransportClient.initialize | public void initialize() throws IOException, NotInitializedException {
logger.debug("Initialising TCPTransportClient. Origin address is [{}] and destination address is [{}]", origAddress, destAddress);
if (destAddress == null) {
throw new NotInitializedException("Destination address is not set");
... | java | public void initialize() throws IOException, NotInitializedException {
logger.debug("Initialising TCPTransportClient. Origin address is [{}] and destination address is [{}]", origAddress, destAddress);
if (destAddress == null) {
throw new NotInitializedException("Destination address is not set");
... | [
"public",
"void",
"initialize",
"(",
")",
"throws",
"IOException",
",",
"NotInitializedException",
"{",
"logger",
".",
"debug",
"(",
"\"Initialising TCPTransportClient. Origin address is [{}] and destination address is [{}]\"",
",",
"origAddress",
",",
"destAddress",
")",
";"... | Network init socket | [
"Network",
"init",
"socket"
] | 672134c378ea9704bf06dbe1985872ad4ebf4640 | https://github.com/RestComm/jdiameter/blob/672134c378ea9704bf06dbe1985872ad4ebf4640/core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/transport/tcp/TCPTransportClient.java#L122-L146 |
104,037 | RestComm/jdiameter | core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/transport/tcp/TCPTransportClient.java | TCPTransportClient.run | @Override
public void run() {
// Workaround for Issue #4 (http://code.google.com/p/jdiameter/issues/detail?id=4)
// BEGIN WORKAROUND // Give some time to initialization...
int sleepTime = 250;
logger.debug("Sleeping for {}ms before starting transport so that listeners can all be added and ready f... | java | @Override
public void run() {
// Workaround for Issue #4 (http://code.google.com/p/jdiameter/issues/detail?id=4)
// BEGIN WORKAROUND // Give some time to initialization...
int sleepTime = 250;
logger.debug("Sleeping for {}ms before starting transport so that listeners can all be added and ready f... | [
"@",
"Override",
"public",
"void",
"run",
"(",
")",
"{",
"// Workaround for Issue #4 (http://code.google.com/p/jdiameter/issues/detail?id=4)\r",
"// BEGIN WORKAROUND // Give some time to initialization...\r",
"int",
"sleepTime",
"=",
"250",
";",
"logger",
".",
"debug",
"(",
"\"... | PCB added logging | [
"PCB",
"added",
"logging"
] | 672134c378ea9704bf06dbe1985872ad4ebf4640 | https://github.com/RestComm/jdiameter/blob/672134c378ea9704bf06dbe1985872ad4ebf4640/core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/transport/tcp/TCPTransportClient.java#L187-L258 |
104,038 | RestComm/jdiameter | core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/transport/tcp/TCPTransportClient.java | TCPTransportClient.append | private void append(byte[] data) {
if (storage.position() + data.length >= storage.capacity()) {
ByteBuffer tmp = ByteBuffer.allocate(storage.limit() + data.length * 2);
byte[] tmpData = new byte[storage.position()];
storage.flip();
storage.get(tmpData);
tmp.put(tmpData);
... | java | private void append(byte[] data) {
if (storage.position() + data.length >= storage.capacity()) {
ByteBuffer tmp = ByteBuffer.allocate(storage.limit() + data.length * 2);
byte[] tmpData = new byte[storage.position()];
storage.flip();
storage.get(tmpData);
tmp.put(tmpData);
... | [
"private",
"void",
"append",
"(",
"byte",
"[",
"]",
"data",
")",
"{",
"if",
"(",
"storage",
".",
"position",
"(",
")",
"+",
"data",
".",
"length",
">=",
"storage",
".",
"capacity",
"(",
")",
")",
"{",
"ByteBuffer",
"tmp",
"=",
"ByteBuffer",
".",
"a... | Adds data to storage
@param data data to add | [
"Adds",
"data",
"to",
"storage"
] | 672134c378ea9704bf06dbe1985872ad4ebf4640 | https://github.com/RestComm/jdiameter/blob/672134c378ea9704bf06dbe1985872ad4ebf4640/core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/transport/tcp/TCPTransportClient.java#L369-L390 |
104,039 | RestComm/jdiameter | core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/router/RouterImpl.java | RouterImpl.makeRoutingKey | private String makeRoutingKey(Message message) {
String sessionId = message.getSessionId();
return new StringBuilder(sessionId != null ? sessionId : "null").append(message.getEndToEndIdentifier())
.append(message.getHopByHopIdentifier()).toString();
} | java | private String makeRoutingKey(Message message) {
String sessionId = message.getSessionId();
return new StringBuilder(sessionId != null ? sessionId : "null").append(message.getEndToEndIdentifier())
.append(message.getHopByHopIdentifier()).toString();
} | [
"private",
"String",
"makeRoutingKey",
"(",
"Message",
"message",
")",
"{",
"String",
"sessionId",
"=",
"message",
".",
"getSessionId",
"(",
")",
";",
"return",
"new",
"StringBuilder",
"(",
"sessionId",
"!=",
"null",
"?",
"sessionId",
":",
"\"null\"",
")",
"... | PCB - Made better routing algorithm that should not grow all the time | [
"PCB",
"-",
"Made",
"better",
"routing",
"algorithm",
"that",
"should",
"not",
"grow",
"all",
"the",
"time"
] | 672134c378ea9704bf06dbe1985872ad4ebf4640 | https://github.com/RestComm/jdiameter/blob/672134c378ea9704bf06dbe1985872ad4ebf4640/core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/router/RouterImpl.java#L327-L331 |
104,040 | RestComm/jdiameter | core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/helpers/ExtensionPoint.java | ExtensionPoint.appendElements | public void appendElements(ExtensionPoint... elements) {
List<ExtensionPoint> rc = new ArrayList<ExtensionPoint>();
rc.addAll(Arrays.asList(this.elements));
rc.addAll(Arrays.asList(elements));
this.elements = rc.toArray(new ExtensionPoint[0]);
} | java | public void appendElements(ExtensionPoint... elements) {
List<ExtensionPoint> rc = new ArrayList<ExtensionPoint>();
rc.addAll(Arrays.asList(this.elements));
rc.addAll(Arrays.asList(elements));
this.elements = rc.toArray(new ExtensionPoint[0]);
} | [
"public",
"void",
"appendElements",
"(",
"ExtensionPoint",
"...",
"elements",
")",
"{",
"List",
"<",
"ExtensionPoint",
">",
"rc",
"=",
"new",
"ArrayList",
"<",
"ExtensionPoint",
">",
"(",
")",
";",
"rc",
".",
"addAll",
"(",
"Arrays",
".",
"asList",
"(",
... | Append extension point entries
@param elements array of append extension point entries | [
"Append",
"extension",
"point",
"entries"
] | 672134c378ea9704bf06dbe1985872ad4ebf4640 | https://github.com/RestComm/jdiameter/blob/672134c378ea9704bf06dbe1985872ad4ebf4640/core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/helpers/ExtensionPoint.java#L251-L256 |
104,041 | RestComm/jdiameter | core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/router/WeightedLeastConnectionsRouter.java | WeightedLeastConnectionsRouter.getNumConnections | protected long getNumConnections(IPeer peer) {
if (peer == null) {
return 0;
}
IStatistic stats = peer.getStatistic();
// If no statistics are available, return zero
if (!stats.isEnabled()) {
if (logger.isDebugEnabled()) {
logger.debug("Statistics for peer are disabled. Please e... | java | protected long getNumConnections(IPeer peer) {
if (peer == null) {
return 0;
}
IStatistic stats = peer.getStatistic();
// If no statistics are available, return zero
if (!stats.isEnabled()) {
if (logger.isDebugEnabled()) {
logger.debug("Statistics for peer are disabled. Please e... | [
"protected",
"long",
"getNumConnections",
"(",
"IPeer",
"peer",
")",
"{",
"if",
"(",
"peer",
"==",
"null",
")",
"{",
"return",
"0",
";",
"}",
"IStatistic",
"stats",
"=",
"peer",
".",
"getStatistic",
"(",
")",
";",
"// If no statistics are available, return zer... | Since num connections is not available, determine throughput by reading statistics
and assume the load of the peer
@param peer
@return throughput indicator | [
"Since",
"num",
"connections",
"is",
"not",
"available",
"determine",
"throughput",
"by",
"reading",
"statistics",
"and",
"assume",
"the",
"load",
"of",
"the",
"peer"
] | 672134c378ea9704bf06dbe1985872ad4ebf4640 | https://github.com/RestComm/jdiameter/blob/672134c378ea9704bf06dbe1985872ad4ebf4640/core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/router/WeightedLeastConnectionsRouter.java#L162-L189 |
104,042 | RestComm/jdiameter | core/jdiameter/impl/src/main/java/org/jdiameter/common/impl/concurrent/ConcurrentFactory.java | ConcurrentFactory.getConfigByName | private Configuration getConfigByName(String name) {
if (config != null) {
for (Configuration c : config) {
if (c != null && c.getStringValue(Parameters.ConcurrentEntityName.ordinal(), "").equals(name)) {
return c;
}
}
}
return null;
} | java | private Configuration getConfigByName(String name) {
if (config != null) {
for (Configuration c : config) {
if (c != null && c.getStringValue(Parameters.ConcurrentEntityName.ordinal(), "").equals(name)) {
return c;
}
}
}
return null;
} | [
"private",
"Configuration",
"getConfigByName",
"(",
"String",
"name",
")",
"{",
"if",
"(",
"config",
"!=",
"null",
")",
"{",
"for",
"(",
"Configuration",
"c",
":",
"config",
")",
"{",
"if",
"(",
"c",
"!=",
"null",
"&&",
"c",
".",
"getStringValue",
"(",... | fetch configuration for executor
@param name
@return | [
"fetch",
"configuration",
"for",
"executor"
] | 672134c378ea9704bf06dbe1985872ad4ebf4640 | https://github.com/RestComm/jdiameter/blob/672134c378ea9704bf06dbe1985872ad4ebf4640/core/jdiameter/impl/src/main/java/org/jdiameter/common/impl/concurrent/ConcurrentFactory.java#L124-L133 |
104,043 | RestComm/jdiameter | core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/helpers/UIDGenerator.java | UIDGenerator.nextLong | public long nextLong() {
Delta d = ranges.get();
if (d.start <= d.stop) {
mutex.lock();
value = d.update(value);
mutex.unlock();
}
return d.start++;
} | java | public long nextLong() {
Delta d = ranges.get();
if (d.start <= d.stop) {
mutex.lock();
value = d.update(value);
mutex.unlock();
}
return d.start++;
} | [
"public",
"long",
"nextLong",
"(",
")",
"{",
"Delta",
"d",
"=",
"ranges",
".",
"get",
"(",
")",
";",
"if",
"(",
"d",
".",
"start",
"<=",
"d",
".",
"stop",
")",
"{",
"mutex",
".",
"lock",
"(",
")",
";",
"value",
"=",
"d",
".",
"update",
"(",
... | Return next uid as long
@return uid as long | [
"Return",
"next",
"uid",
"as",
"long"
] | 672134c378ea9704bf06dbe1985872ad4ebf4640 | https://github.com/RestComm/jdiameter/blob/672134c378ea9704bf06dbe1985872ad4ebf4640/core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/helpers/UIDGenerator.java#L107-L115 |
104,044 | RestComm/jdiameter | core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/helpers/IPConverter.java | IPConverter.InetAddressByIPv4 | public static InetAddress InetAddressByIPv4(String address) {
StringTokenizer addressTokens = new StringTokenizer(address, ".");
byte[] bytes;
if (addressTokens.countTokens() == 4) {
bytes = new byte[]{
getByBytes(addressTokens),
getByBytes(addressTokens),
getByByt... | java | public static InetAddress InetAddressByIPv4(String address) {
StringTokenizer addressTokens = new StringTokenizer(address, ".");
byte[] bytes;
if (addressTokens.countTokens() == 4) {
bytes = new byte[]{
getByBytes(addressTokens),
getByBytes(addressTokens),
getByByt... | [
"public",
"static",
"InetAddress",
"InetAddressByIPv4",
"(",
"String",
"address",
")",
"{",
"StringTokenizer",
"addressTokens",
"=",
"new",
"StringTokenizer",
"(",
"address",
",",
"\".\"",
")",
";",
"byte",
"[",
"]",
"bytes",
";",
"if",
"(",
"addressTokens",
"... | Convert defined string to IPv4 object instance
@param address string representation of ip address
@return IPv4 object instance | [
"Convert",
"defined",
"string",
"to",
"IPv4",
"object",
"instance"
] | 672134c378ea9704bf06dbe1985872ad4ebf4640 | https://github.com/RestComm/jdiameter/blob/672134c378ea9704bf06dbe1985872ad4ebf4640/core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/helpers/IPConverter.java#L63-L83 |
104,045 | RestComm/jdiameter | core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/helpers/IPConverter.java | IPConverter.InetAddressByIPv6 | public static InetAddress InetAddressByIPv6(String address) {
StringTokenizer addressTokens = new StringTokenizer(address, ":");
byte[] bytes = new byte[16];
if (addressTokens.countTokens() == 8) {
int count = 0;
while (addressTokens.hasMoreTokens()) {
int word = Integer.parseInt(a... | java | public static InetAddress InetAddressByIPv6(String address) {
StringTokenizer addressTokens = new StringTokenizer(address, ":");
byte[] bytes = new byte[16];
if (addressTokens.countTokens() == 8) {
int count = 0;
while (addressTokens.hasMoreTokens()) {
int word = Integer.parseInt(a... | [
"public",
"static",
"InetAddress",
"InetAddressByIPv6",
"(",
"String",
"address",
")",
"{",
"StringTokenizer",
"addressTokens",
"=",
"new",
"StringTokenizer",
"(",
"address",
",",
"\":\"",
")",
";",
"byte",
"[",
"]",
"bytes",
"=",
"new",
"byte",
"[",
"16",
"... | Convert defined string to IPv6 object instance
@param address string representation of ip address
@return IPv6 object instance | [
"Convert",
"defined",
"string",
"to",
"IPv6",
"object",
"instance"
] | 672134c378ea9704bf06dbe1985872ad4ebf4640 | https://github.com/RestComm/jdiameter/blob/672134c378ea9704bf06dbe1985872ad4ebf4640/core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/helpers/IPConverter.java#L95-L115 |
104,046 | RestComm/jdiameter | examples/guide1/src/main/java/org/example/client/ExampleClient.java | ExampleClient.initStack | private void initStack() {
if (log.isInfoEnabled()) {
log.info("Initializing Stack...");
}
InputStream is = null;
try {
//Parse dictionary, it is used for user friendly info.
dictionary.parseDictionary(this.getClass().getClassLoader().getResourceAsStream(dictionaryFile));
... | java | private void initStack() {
if (log.isInfoEnabled()) {
log.info("Initializing Stack...");
}
InputStream is = null;
try {
//Parse dictionary, it is used for user friendly info.
dictionary.parseDictionary(this.getClass().getClassLoader().getResourceAsStream(dictionaryFile));
... | [
"private",
"void",
"initStack",
"(",
")",
"{",
"if",
"(",
"log",
".",
"isInfoEnabled",
"(",
")",
")",
"{",
"log",
".",
"info",
"(",
"\"Initializing Stack...\"",
")",
";",
"}",
"InputStream",
"is",
"=",
"null",
";",
"try",
"{",
"//Parse dictionary, it is us... | boolean telling if we finished our interaction | [
"boolean",
"telling",
"if",
"we",
"finished",
"our",
"interaction"
] | 672134c378ea9704bf06dbe1985872ad4ebf4640 | https://github.com/RestComm/jdiameter/blob/672134c378ea9704bf06dbe1985872ad4ebf4640/examples/guide1/src/main/java/org/example/client/ExampleClient.java#L119-L200 |
104,047 | RestComm/jdiameter | examples/guide1/src/main/java/org/example/client/ExampleClient.java | ExampleClient.printAvpsAux | private void printAvpsAux(AvpSet avpSet, int level) throws AvpDataException {
String prefix = " ".substring(0, level * 2);
for (Avp avp : avpSet) {
AvpRepresentation avpRep = AvpDictionary.INSTANCE.getAvp(avp.getCode(), avp.getVendorId());
if (avpRep != null && avpRep.ge... | java | private void printAvpsAux(AvpSet avpSet, int level) throws AvpDataException {
String prefix = " ".substring(0, level * 2);
for (Avp avp : avpSet) {
AvpRepresentation avpRep = AvpDictionary.INSTANCE.getAvp(avp.getCode(), avp.getVendorId());
if (avpRep != null && avpRep.ge... | [
"private",
"void",
"printAvpsAux",
"(",
"AvpSet",
"avpSet",
",",
"int",
"level",
")",
"throws",
"AvpDataException",
"{",
"String",
"prefix",
"=",
"\" \"",
".",
"substring",
"(",
"0",
",",
"level",
"*",
"2",
")",
";",
"for",
"(",
"Avp",
... | Prints the AVPs present in an AvpSet with a specified 'tab' level
@param avpSet
the AvpSet containing the AVPs to be printed
@param level
an int representing the number of 'tabs' to make a pretty
print
@throws AvpDataException | [
"Prints",
"the",
"AVPs",
"present",
"in",
"an",
"AvpSet",
"with",
"a",
"specified",
"tab",
"level"
] | 672134c378ea9704bf06dbe1985872ad4ebf4640 | https://github.com/RestComm/jdiameter/blob/672134c378ea9704bf06dbe1985872ad4ebf4640/examples/guide1/src/main/java/org/example/client/ExampleClient.java#L388-L417 |
104,048 | RestComm/jdiameter | core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/transport/tls/netty/TLSTransportClient.java | TLSTransportClient.start | public void start() throws InterruptedException {
logger.debug("Staring client TLSTransportClient {} ", socketDescription);
if (isConnected()) {
logger.debug("Already connected TLSTransportClient {} ", socketDescription);
return;
}
workerGroup = new NioEventLoopGroup();
Bootstrap bootst... | java | public void start() throws InterruptedException {
logger.debug("Staring client TLSTransportClient {} ", socketDescription);
if (isConnected()) {
logger.debug("Already connected TLSTransportClient {} ", socketDescription);
return;
}
workerGroup = new NioEventLoopGroup();
Bootstrap bootst... | [
"public",
"void",
"start",
"(",
")",
"throws",
"InterruptedException",
"{",
"logger",
".",
"debug",
"(",
"\"Staring client TLSTransportClient {} \"",
",",
"socketDescription",
")",
";",
"if",
"(",
"isConnected",
"(",
")",
")",
"{",
"logger",
".",
"debug",
"(",
... | only client side | [
"only",
"client",
"side"
] | 672134c378ea9704bf06dbe1985872ad4ebf4640 | https://github.com/RestComm/jdiameter/blob/672134c378ea9704bf06dbe1985872ad4ebf4640/core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/transport/tls/netty/TLSTransportClient.java#L110-L136 |
104,049 | RestComm/jdiameter | core/jdiameter/api/src/main/java/org/jdiameter/api/StackManager.java | StackManager.getStacks | public static synchronized Enumeration<Stack> getStacks() {
List<Stack> result = new CopyOnWriteArrayList<Stack>();
if (!initialized) {
initialize();
}
// Gets the classloader of the code that called this method, may be null.
ClassLoader callerCL = ClassLoader.getSystemClassLoader();
... | java | public static synchronized Enumeration<Stack> getStacks() {
List<Stack> result = new CopyOnWriteArrayList<Stack>();
if (!initialized) {
initialize();
}
// Gets the classloader of the code that called this method, may be null.
ClassLoader callerCL = ClassLoader.getSystemClassLoader();
... | [
"public",
"static",
"synchronized",
"Enumeration",
"<",
"Stack",
">",
"getStacks",
"(",
")",
"{",
"List",
"<",
"Stack",
">",
"result",
"=",
"new",
"CopyOnWriteArrayList",
"<",
"Stack",
">",
"(",
")",
";",
"if",
"(",
"!",
"initialized",
")",
"{",
"initial... | Retrieves an Enumeration with all of the currently loaded Diameter stacks
to which the current caller has access.
<P><B>Note:</B> The classname of a stack can be found using
<CODE>d.getClass().getName()</CODE>
@return the list of Diameter stacks loaded by the caller's class loader | [
"Retrieves",
"an",
"Enumeration",
"with",
"all",
"of",
"the",
"currently",
"loaded",
"Diameter",
"stacks",
"to",
"which",
"the",
"current",
"caller",
"has",
"access",
"."
] | 672134c378ea9704bf06dbe1985872ad4ebf4640 | https://github.com/RestComm/jdiameter/blob/672134c378ea9704bf06dbe1985872ad4ebf4640/core/jdiameter/api/src/main/java/org/jdiameter/api/StackManager.java#L235-L253 |
104,050 | RestComm/jdiameter | core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/MessageUtility.java | MessageUtility.addOriginAvps | public static void addOriginAvps(Message m, MetaData md) {
// FIXME: check for "userFqnAsUri" ?
AvpSet set = m.getAvps();
if (set.getAvp(Avp.ORIGIN_HOST) == null) {
m.getAvps().addAvp(Avp.ORIGIN_HOST, md.getLocalPeer().getUri().getFQDN(), true, false, true);
}
if (set.getAvp(Avp.ORIGIN_REALM) ... | java | public static void addOriginAvps(Message m, MetaData md) {
// FIXME: check for "userFqnAsUri" ?
AvpSet set = m.getAvps();
if (set.getAvp(Avp.ORIGIN_HOST) == null) {
m.getAvps().addAvp(Avp.ORIGIN_HOST, md.getLocalPeer().getUri().getFQDN(), true, false, true);
}
if (set.getAvp(Avp.ORIGIN_REALM) ... | [
"public",
"static",
"void",
"addOriginAvps",
"(",
"Message",
"m",
",",
"MetaData",
"md",
")",
"{",
"// FIXME: check for \"userFqnAsUri\" ?",
"AvpSet",
"set",
"=",
"m",
".",
"getAvps",
"(",
")",
";",
"if",
"(",
"set",
".",
"getAvp",
"(",
"Avp",
".",
"ORIGIN... | Used to set origin, previously done in MessageParser.
@param m
@param md | [
"Used",
"to",
"set",
"origin",
"previously",
"done",
"in",
"MessageParser",
"."
] | 672134c378ea9704bf06dbe1985872ad4ebf4640 | https://github.com/RestComm/jdiameter/blob/672134c378ea9704bf06dbe1985872ad4ebf4640/core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/MessageUtility.java#L66-L75 |
104,051 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/query/RiakObject.java | RiakObject.setVTag | public RiakObject setVTag(String vtag)
{
if (vtag != null && vtag.isEmpty())
{
throw new IllegalArgumentException("vtag can not be zero length");
}
this.vtag = vtag;
return this;
} | java | public RiakObject setVTag(String vtag)
{
if (vtag != null && vtag.isEmpty())
{
throw new IllegalArgumentException("vtag can not be zero length");
}
this.vtag = vtag;
return this;
} | [
"public",
"RiakObject",
"setVTag",
"(",
"String",
"vtag",
")",
"{",
"if",
"(",
"vtag",
"!=",
"null",
"&&",
"vtag",
".",
"isEmpty",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"vtag can not be zero length\"",
")",
";",
"}",
"this",
... | Set the version tag for this RiakObject
@param vtag a {@code String} representing the VTag for this RiakObject
@return a reference to this object
@throws IllegalArgumentException if {@code vtag} is zero length | [
"Set",
"the",
"version",
"tag",
"for",
"this",
"RiakObject"
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/query/RiakObject.java#L179-L187 |
104,052 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/RiakCluster.java | RiakCluster.removeNode | public boolean removeNode(RiakNode node)
{
stateCheck(State.CREATED, State.RUNNING, State.QUEUING);
boolean removed = false;
try
{
nodeListLock.writeLock().lock();
removed = nodeList.remove(node);
for (NodeStateListener listener : stateListeners)
... | java | public boolean removeNode(RiakNode node)
{
stateCheck(State.CREATED, State.RUNNING, State.QUEUING);
boolean removed = false;
try
{
nodeListLock.writeLock().lock();
removed = nodeList.remove(node);
for (NodeStateListener listener : stateListeners)
... | [
"public",
"boolean",
"removeNode",
"(",
"RiakNode",
"node",
")",
"{",
"stateCheck",
"(",
"State",
".",
"CREATED",
",",
"State",
".",
"RUNNING",
",",
"State",
".",
"QUEUING",
")",
";",
"boolean",
"removed",
"=",
"false",
";",
"try",
"{",
"nodeListLock",
"... | Removes the provided node from the cluster.
@param node
@return true if the node was in the cluster, false otherwise. | [
"Removes",
"the",
"provided",
"node",
"from",
"the",
"cluster",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/RiakCluster.java#L381-L400 |
104,053 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/RiakCluster.java | RiakCluster.getNodes | public List<RiakNode> getNodes()
{
stateCheck(State.CREATED, State.RUNNING, State.SHUTTING_DOWN, State.QUEUING);
try
{
nodeListLock.readLock().lock();
return new ArrayList<>(nodeList);
}
finally
{
nodeListLock.readLock().unlock();
... | java | public List<RiakNode> getNodes()
{
stateCheck(State.CREATED, State.RUNNING, State.SHUTTING_DOWN, State.QUEUING);
try
{
nodeListLock.readLock().lock();
return new ArrayList<>(nodeList);
}
finally
{
nodeListLock.readLock().unlock();
... | [
"public",
"List",
"<",
"RiakNode",
">",
"getNodes",
"(",
")",
"{",
"stateCheck",
"(",
"State",
".",
"CREATED",
",",
"State",
".",
"RUNNING",
",",
"State",
".",
"SHUTTING_DOWN",
",",
"State",
".",
"QUEUING",
")",
";",
"try",
"{",
"nodeListLock",
".",
"r... | Returns a copy of the list of nodes in this cluster.
@return A copy of the list of RiakNodes | [
"Returns",
"a",
"copy",
"of",
"the",
"list",
"of",
"nodes",
"in",
"this",
"cluster",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/RiakCluster.java#L406-L418 |
104,054 | basho/riak-java-client | src/main/java/com/basho/riak/client/api/convert/RiakBeanSerializerModifier.java | RiakBeanSerializerModifier.keepProperty | private boolean keepProperty(BeanPropertyWriter beanPropertyWriter)
{
if (beanPropertyWriter.getAnnotation(JsonProperty.class) != null)
{
return true;
}
for (Class<? extends Annotation> annotation : RIAK_ANNOTATIONS)
{
if (beanPropertyWriter.getAnnotat... | java | private boolean keepProperty(BeanPropertyWriter beanPropertyWriter)
{
if (beanPropertyWriter.getAnnotation(JsonProperty.class) != null)
{
return true;
}
for (Class<? extends Annotation> annotation : RIAK_ANNOTATIONS)
{
if (beanPropertyWriter.getAnnotat... | [
"private",
"boolean",
"keepProperty",
"(",
"BeanPropertyWriter",
"beanPropertyWriter",
")",
"{",
"if",
"(",
"beanPropertyWriter",
".",
"getAnnotation",
"(",
"JsonProperty",
".",
"class",
")",
"!=",
"null",
")",
"{",
"return",
"true",
";",
"}",
"for",
"(",
"Cla... | Checks if the property has any of the Riak annotations on it or the
Jackson JsonProperty annotation.
If a Riak annotation is present without the Jackson JsonProperty
annotation, this will return false.
If a property has been annotated with both the Jackson JsonProperty
annotation and a Riak annotation, the Jackson an... | [
"Checks",
"if",
"the",
"property",
"has",
"any",
"of",
"the",
"Riak",
"annotations",
"on",
"it",
"or",
"the",
"Jackson",
"JsonProperty",
"annotation",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/api/convert/RiakBeanSerializerModifier.java#L119-L133 |
104,055 | basho/riak-java-client | src/main/java/com/basho/riak/client/api/RiakClient.java | RiakClient.newClient | public static RiakClient newClient(InetSocketAddress... addresses) throws UnknownHostException
{
final List<String> remoteAddresses = new ArrayList<>(addresses.length);
for (InetSocketAddress addy : addresses)
{
remoteAddresses.add(
String.format("%s:%s", add... | java | public static RiakClient newClient(InetSocketAddress... addresses) throws UnknownHostException
{
final List<String> remoteAddresses = new ArrayList<>(addresses.length);
for (InetSocketAddress addy : addresses)
{
remoteAddresses.add(
String.format("%s:%s", add... | [
"public",
"static",
"RiakClient",
"newClient",
"(",
"InetSocketAddress",
"...",
"addresses",
")",
"throws",
"UnknownHostException",
"{",
"final",
"List",
"<",
"String",
">",
"remoteAddresses",
"=",
"new",
"ArrayList",
"<>",
"(",
"addresses",
".",
"length",
")",
... | Static factory method to create a new client instance.
This method produces a client connected to the supplied addresses.
@param addresses one or more addresses to connect to.
@return a new RiakClient instance.
@throws java.net.UnknownHostException if a supplied hostname cannot be resolved. | [
"Static",
"factory",
"method",
"to",
"create",
"a",
"new",
"client",
"instance",
".",
"This",
"method",
"produces",
"a",
"client",
"connected",
"to",
"the",
"supplied",
"addresses",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/api/RiakClient.java#L259-L271 |
104,056 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/query/functions/Function.java | Function.newStoredJsFunction | public static Function newStoredJsFunction(String bucket, String key)
{
return new Builder().withBucket(bucket).withKey(key).build();
} | java | public static Function newStoredJsFunction(String bucket, String key)
{
return new Builder().withBucket(bucket).withKey(key).build();
} | [
"public",
"static",
"Function",
"newStoredJsFunction",
"(",
"String",
"bucket",
",",
"String",
"key",
")",
"{",
"return",
"new",
"Builder",
"(",
")",
".",
"withBucket",
"(",
"bucket",
")",
".",
"withKey",
"(",
"key",
")",
".",
"build",
"(",
")",
";",
"... | Static factory method for Stored Javascript Functions.
@param bucket The bucket where the JS function is stored
@param key the key for the object containing the JS function
@return a Function representing a stored JS function. | [
"Static",
"factory",
"method",
"for",
"Stored",
"Javascript",
"Functions",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/query/functions/Function.java#L167-L170 |
104,057 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/query/functions/Function.java | Function.newErlangFunction | public static Function newErlangFunction(String module, String function)
{
return new Builder().withModule(module).withFunction(function).build();
} | java | public static Function newErlangFunction(String module, String function)
{
return new Builder().withModule(module).withFunction(function).build();
} | [
"public",
"static",
"Function",
"newErlangFunction",
"(",
"String",
"module",
",",
"String",
"function",
")",
"{",
"return",
"new",
"Builder",
"(",
")",
".",
"withModule",
"(",
"module",
")",
".",
"withFunction",
"(",
"function",
")",
".",
"build",
"(",
")... | Static factory method for Erlang Functions.
@param module the module that contains the Erlang function.
@param function the name of the erlang function.
@return a Function representing a Erlang function. | [
"Static",
"factory",
"method",
"for",
"Erlang",
"Functions",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/query/functions/Function.java#L188-L191 |
104,058 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/query/timeseries/Row.java | Row.getCellsCopy | public List<Cell> getCellsCopy()
{
final ArrayList<Cell> cells = new ArrayList<>(this.getCellsCount());
for (Cell c: this)
{
cells.add(c);
}
return cells;
} | java | public List<Cell> getCellsCopy()
{
final ArrayList<Cell> cells = new ArrayList<>(this.getCellsCount());
for (Cell c: this)
{
cells.add(c);
}
return cells;
} | [
"public",
"List",
"<",
"Cell",
">",
"getCellsCopy",
"(",
")",
"{",
"final",
"ArrayList",
"<",
"Cell",
">",
"cells",
"=",
"new",
"ArrayList",
"<>",
"(",
"this",
".",
"getCellsCount",
"(",
")",
")",
";",
"for",
"(",
"Cell",
"c",
":",
"this",
")",
"{"... | Get a shallow copy of the cells in this row.
@return a List<Cell> shallow copy of the cells in this row. | [
"Get",
"a",
"shallow",
"copy",
"of",
"the",
"cells",
"in",
"this",
"row",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/query/timeseries/Row.java#L73-L82 |
104,059 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/query/timeseries/Row.java | Row.iterator | @Override
public Iterator<Cell> iterator()
{
if (cells != null)
{
return cells.iterator();
}
else // if (pbRow != null)
{
assert pbRow != null;
return ConvertibleIteratorUtils.iterateAsCell(pbRow.getCellsList().iterator(),
... | java | @Override
public Iterator<Cell> iterator()
{
if (cells != null)
{
return cells.iterator();
}
else // if (pbRow != null)
{
assert pbRow != null;
return ConvertibleIteratorUtils.iterateAsCell(pbRow.getCellsList().iterator(),
... | [
"@",
"Override",
"public",
"Iterator",
"<",
"Cell",
">",
"iterator",
"(",
")",
"{",
"if",
"(",
"cells",
"!=",
"null",
")",
"{",
"return",
"cells",
".",
"iterator",
"(",
")",
";",
"}",
"else",
"// if (pbRow != null)",
"{",
"assert",
"pbRow",
"!=",
"null... | An iterator of the Cells in this row.
@return an iterator. | [
"An",
"iterator",
"of",
"the",
"Cells",
"in",
"this",
"row",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/query/timeseries/Row.java#L100-L115 |
104,060 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/util/DefaultCharset.java | DefaultCharset.set | public static void set(Charset charset)
{
final Charset current = instance.currentCharset.get();
logger.info("Setting client charset from '{}' to '{}'", current.name(), charset.name());
instance.currentCharset.set(charset);
} | java | public static void set(Charset charset)
{
final Charset current = instance.currentCharset.get();
logger.info("Setting client charset from '{}' to '{}'", current.name(), charset.name());
instance.currentCharset.set(charset);
} | [
"public",
"static",
"void",
"set",
"(",
"Charset",
"charset",
")",
"{",
"final",
"Charset",
"current",
"=",
"instance",
".",
"currentCharset",
".",
"get",
"(",
")",
";",
"logger",
".",
"info",
"(",
"\"Setting client charset from '{}' to '{}'\"",
",",
"current",
... | Set the classloader-wide default Charset for the Riak client.
@param charset The charset to set the classloader-wide default to. | [
"Set",
"the",
"classloader",
"-",
"wide",
"default",
"Charset",
"for",
"the",
"Riak",
"client",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/util/DefaultCharset.java#L109-L114 |
104,061 | basho/riak-java-client | src/main/java/com/basho/riak/client/api/commands/datatypes/MapUpdate.java | MapUpdate.removeCounter | public MapUpdate removeCounter(String key)
{
BinaryValue k = BinaryValue.create(key);
removes.add(new MapOp.MapField(MapOp.FieldType.COUNTER, k));
return this;
} | java | public MapUpdate removeCounter(String key)
{
BinaryValue k = BinaryValue.create(key);
removes.add(new MapOp.MapField(MapOp.FieldType.COUNTER, k));
return this;
} | [
"public",
"MapUpdate",
"removeCounter",
"(",
"String",
"key",
")",
"{",
"BinaryValue",
"k",
"=",
"BinaryValue",
".",
"create",
"(",
"key",
")",
";",
"removes",
".",
"add",
"(",
"new",
"MapOp",
".",
"MapField",
"(",
"MapOp",
".",
"FieldType",
".",
"COUNTE... | Update the map in Riak by removing the counter mapped to the provided key.
@param key the key the counter is mapped to.
@return a reference to this object. | [
"Update",
"the",
"map",
"in",
"Riak",
"by",
"removing",
"the",
"counter",
"mapped",
"to",
"the",
"provided",
"key",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/api/commands/datatypes/MapUpdate.java#L52-L57 |
104,062 | basho/riak-java-client | src/main/java/com/basho/riak/client/api/commands/datatypes/MapUpdate.java | MapUpdate.removeRegister | public MapUpdate removeRegister(String key)
{
BinaryValue k = BinaryValue.create(key);
removes.add(new MapOp.MapField(MapOp.FieldType.REGISTER, k));
return this;
} | java | public MapUpdate removeRegister(String key)
{
BinaryValue k = BinaryValue.create(key);
removes.add(new MapOp.MapField(MapOp.FieldType.REGISTER, k));
return this;
} | [
"public",
"MapUpdate",
"removeRegister",
"(",
"String",
"key",
")",
"{",
"BinaryValue",
"k",
"=",
"BinaryValue",
".",
"create",
"(",
"key",
")",
";",
"removes",
".",
"add",
"(",
"new",
"MapOp",
".",
"MapField",
"(",
"MapOp",
".",
"FieldType",
".",
"REGIS... | Update the map in Riak by removing the register mapped to the provided key.
@param key the key the register is mapped to.
@return a reference to this object. | [
"Update",
"the",
"map",
"in",
"Riak",
"by",
"removing",
"the",
"register",
"mapped",
"to",
"the",
"provided",
"key",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/api/commands/datatypes/MapUpdate.java#L64-L69 |
104,063 | basho/riak-java-client | src/main/java/com/basho/riak/client/api/commands/datatypes/MapUpdate.java | MapUpdate.removeFlag | public MapUpdate removeFlag(String key)
{
BinaryValue k = BinaryValue.create(key);
removes.add(new MapOp.MapField(MapOp.FieldType.FLAG, k));
return this;
} | java | public MapUpdate removeFlag(String key)
{
BinaryValue k = BinaryValue.create(key);
removes.add(new MapOp.MapField(MapOp.FieldType.FLAG, k));
return this;
} | [
"public",
"MapUpdate",
"removeFlag",
"(",
"String",
"key",
")",
"{",
"BinaryValue",
"k",
"=",
"BinaryValue",
".",
"create",
"(",
"key",
")",
";",
"removes",
".",
"add",
"(",
"new",
"MapOp",
".",
"MapField",
"(",
"MapOp",
".",
"FieldType",
".",
"FLAG",
... | Update the map in Riak by removing the flag mapped to the provided key.
@param key the key the flag is mapped to.
@return a reference to this object. | [
"Update",
"the",
"map",
"in",
"Riak",
"by",
"removing",
"the",
"flag",
"mapped",
"to",
"the",
"provided",
"key",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/api/commands/datatypes/MapUpdate.java#L76-L81 |
104,064 | basho/riak-java-client | src/main/java/com/basho/riak/client/api/commands/datatypes/MapUpdate.java | MapUpdate.removeSet | public MapUpdate removeSet(String key)
{
BinaryValue k = BinaryValue.create(key);
removes.add(new MapOp.MapField(MapOp.FieldType.SET, k));
return this;
} | java | public MapUpdate removeSet(String key)
{
BinaryValue k = BinaryValue.create(key);
removes.add(new MapOp.MapField(MapOp.FieldType.SET, k));
return this;
} | [
"public",
"MapUpdate",
"removeSet",
"(",
"String",
"key",
")",
"{",
"BinaryValue",
"k",
"=",
"BinaryValue",
".",
"create",
"(",
"key",
")",
";",
"removes",
".",
"add",
"(",
"new",
"MapOp",
".",
"MapField",
"(",
"MapOp",
".",
"FieldType",
".",
"SET",
",... | Update the map in Riak by removing the set mapped to the provided key.
@param key the key the set is mapped to.
@return a reference to this object. | [
"Update",
"the",
"map",
"in",
"Riak",
"by",
"removing",
"the",
"set",
"mapped",
"to",
"the",
"provided",
"key",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/api/commands/datatypes/MapUpdate.java#L88-L93 |
104,065 | basho/riak-java-client | src/main/java/com/basho/riak/client/api/commands/datatypes/MapUpdate.java | MapUpdate.removeMap | public MapUpdate removeMap(String key)
{
BinaryValue k = BinaryValue.create(key);
removes.add(new MapOp.MapField(MapOp.FieldType.MAP, k));
return this;
} | java | public MapUpdate removeMap(String key)
{
BinaryValue k = BinaryValue.create(key);
removes.add(new MapOp.MapField(MapOp.FieldType.MAP, k));
return this;
} | [
"public",
"MapUpdate",
"removeMap",
"(",
"String",
"key",
")",
"{",
"BinaryValue",
"k",
"=",
"BinaryValue",
".",
"create",
"(",
"key",
")",
";",
"removes",
".",
"add",
"(",
"new",
"MapOp",
".",
"MapField",
"(",
"MapOp",
".",
"FieldType",
".",
"MAP",
",... | Update the map in Riak by removing the map mapped to the provided key.
@param key the key the map is mapped to.
@return a reference to this object. | [
"Update",
"the",
"map",
"in",
"Riak",
"by",
"removing",
"the",
"map",
"mapped",
"to",
"the",
"provided",
"key",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/api/commands/datatypes/MapUpdate.java#L100-L105 |
104,066 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/query/timeseries/QueryResult.java | QueryResult.iterator | public Iterator<Row> iterator()
{
if (this.rows != null)
{
return Arrays.asList(this.rows).iterator();
}
else
{
return ConvertibleIteratorUtils.iterateAsRow(this.pbRows.iterator(), this.pbColumnDescriptions);
}
} | java | public Iterator<Row> iterator()
{
if (this.rows != null)
{
return Arrays.asList(this.rows).iterator();
}
else
{
return ConvertibleIteratorUtils.iterateAsRow(this.pbRows.iterator(), this.pbColumnDescriptions);
}
} | [
"public",
"Iterator",
"<",
"Row",
">",
"iterator",
"(",
")",
"{",
"if",
"(",
"this",
".",
"rows",
"!=",
"null",
")",
"{",
"return",
"Arrays",
".",
"asList",
"(",
"this",
".",
"rows",
")",
".",
"iterator",
"(",
")",
";",
"}",
"else",
"{",
"return"... | An iterator of the Rows in this QueryResult.
@return an iterator. | [
"An",
"iterator",
"of",
"the",
"Rows",
"in",
"this",
"QueryResult",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/query/timeseries/QueryResult.java#L76-L86 |
104,067 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/query/timeseries/QueryResult.java | QueryResult.getRowsCopy | public List<Row> getRowsCopy()
{
final List<Row> rows = new ArrayList<>(this.getRowsCount());
for (Row cells : this)
{
rows.add(cells);
}
return rows;
} | java | public List<Row> getRowsCopy()
{
final List<Row> rows = new ArrayList<>(this.getRowsCount());
for (Row cells : this)
{
rows.add(cells);
}
return rows;
} | [
"public",
"List",
"<",
"Row",
">",
"getRowsCopy",
"(",
")",
"{",
"final",
"List",
"<",
"Row",
">",
"rows",
"=",
"new",
"ArrayList",
"<>",
"(",
"this",
".",
"getRowsCount",
"(",
")",
")",
";",
"for",
"(",
"Row",
"cells",
":",
"this",
")",
"{",
"ro... | Get a shallow copy of the rows in this query result.
@return a List<Row> shallow copy of the rows in this query result. | [
"Get",
"a",
"shallow",
"copy",
"of",
"the",
"rows",
"in",
"this",
"query",
"result",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/query/timeseries/QueryResult.java#L101-L111 |
104,068 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/query/indexes/RiakIndexes.java | RiakIndexes.hasIndex | public <T extends RiakIndex<?>> boolean hasIndex(RiakIndex.Name<T> name)
{
return indexes.containsKey(name.getFullname());
} | java | public <T extends RiakIndex<?>> boolean hasIndex(RiakIndex.Name<T> name)
{
return indexes.containsKey(name.getFullname());
} | [
"public",
"<",
"T",
"extends",
"RiakIndex",
"<",
"?",
">",
">",
"boolean",
"hasIndex",
"(",
"RiakIndex",
".",
"Name",
"<",
"T",
">",
"name",
")",
"{",
"return",
"indexes",
".",
"containsKey",
"(",
"name",
".",
"getFullname",
"(",
")",
")",
";",
"}"
] | Returns whether a specific RiakIndex is present
@param name the {@link RiakIndex.Name} representing the index to check for
@return {@code true} if the index is present, {@code false} otherwise | [
"Returns",
"whether",
"a",
"specific",
"RiakIndex",
"is",
"present"
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/query/indexes/RiakIndexes.java#L129-L132 |
104,069 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/query/indexes/RiakIndexes.java | RiakIndexes.removeIndex | public <V,T extends RiakIndex<V>> T removeIndex(RiakIndex.Name<T> name)
{
RiakIndex<?> removed = indexes.remove(name.getFullname());
if (removed != null)
{
T index = name.wrap(removed).createIndex();
return index;
}
else
{
return nu... | java | public <V,T extends RiakIndex<V>> T removeIndex(RiakIndex.Name<T> name)
{
RiakIndex<?> removed = indexes.remove(name.getFullname());
if (removed != null)
{
T index = name.wrap(removed).createIndex();
return index;
}
else
{
return nu... | [
"public",
"<",
"V",
",",
"T",
"extends",
"RiakIndex",
"<",
"V",
">",
">",
"T",
"removeIndex",
"(",
"RiakIndex",
".",
"Name",
"<",
"T",
">",
"name",
")",
"{",
"RiakIndex",
"<",
"?",
">",
"removed",
"=",
"indexes",
".",
"remove",
"(",
"name",
".",
... | Remove the named RiakIndex
@param name the {@code RiakIndex.Name} representing the index to remove
@return the removed {@code RiakIndex} (typed accordingly) if the index was present,
{@code null} otherwise | [
"Remove",
"the",
"named",
"RiakIndex"
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/query/indexes/RiakIndexes.java#L178-L190 |
104,070 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/RiakNode.java | RiakNode.setMaxConnections | public RiakNode setMaxConnections(int maxConnections)
{
stateCheck(State.CREATED, State.RUNNING, State.HEALTH_CHECKING);
if (maxConnections >= getMinConnections())
{
permits.setMaxPermits(maxConnections);
}
else
{
throw new IllegalArgumentExcep... | java | public RiakNode setMaxConnections(int maxConnections)
{
stateCheck(State.CREATED, State.RUNNING, State.HEALTH_CHECKING);
if (maxConnections >= getMinConnections())
{
permits.setMaxPermits(maxConnections);
}
else
{
throw new IllegalArgumentExcep... | [
"public",
"RiakNode",
"setMaxConnections",
"(",
"int",
"maxConnections",
")",
"{",
"stateCheck",
"(",
"State",
".",
"CREATED",
",",
"State",
".",
"RUNNING",
",",
"State",
".",
"HEALTH_CHECKING",
")",
";",
"if",
"(",
"maxConnections",
">=",
"getMinConnections",
... | Sets the maximum number of connections allowed.
@param maxConnections the maxConnections to set.
@return a reference to this RiakNode.
@see Builder#withMaxConnections(int) | [
"Sets",
"the",
"maximum",
"number",
"of",
"connections",
"allowed",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/RiakNode.java#L399-L412 |
104,071 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/RiakNode.java | RiakNode.getMaxConnections | public int getMaxConnections()
{
stateCheck(State.CREATED, State.RUNNING, State.HEALTH_CHECKING);
return permits.getMaxPermits();
} | java | public int getMaxConnections()
{
stateCheck(State.CREATED, State.RUNNING, State.HEALTH_CHECKING);
return permits.getMaxPermits();
} | [
"public",
"int",
"getMaxConnections",
"(",
")",
"{",
"stateCheck",
"(",
"State",
".",
"CREATED",
",",
"State",
".",
"RUNNING",
",",
"State",
".",
"HEALTH_CHECKING",
")",
";",
"return",
"permits",
".",
"getMaxPermits",
"(",
")",
";",
"}"
] | Returns the maximum number of connections allowed.
@return the maxConnections
@see Builder#withMaxConnections(int) | [
"Returns",
"the",
"maximum",
"number",
"of",
"connections",
"allowed",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/RiakNode.java#L420-L424 |
104,072 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/RiakNode.java | RiakNode.setMinConnections | public RiakNode setMinConnections(int minConnections)
{
stateCheck(State.CREATED, State.RUNNING, State.HEALTH_CHECKING);
if (minConnections <= getMaxConnections())
{
this.minConnections = minConnections;
}
else
{
throw new IllegalArgumentExcept... | java | public RiakNode setMinConnections(int minConnections)
{
stateCheck(State.CREATED, State.RUNNING, State.HEALTH_CHECKING);
if (minConnections <= getMaxConnections())
{
this.minConnections = minConnections;
}
else
{
throw new IllegalArgumentExcept... | [
"public",
"RiakNode",
"setMinConnections",
"(",
"int",
"minConnections",
")",
"{",
"stateCheck",
"(",
"State",
".",
"CREATED",
",",
"State",
".",
"RUNNING",
",",
"State",
".",
"HEALTH_CHECKING",
")",
";",
"if",
"(",
"minConnections",
"<=",
"getMaxConnections",
... | Sets the minimum number of active connections to be maintained.
@param minConnections the minConnections to set
@return a reference to this RiakNode
@see Builder#withMinConnections(int) | [
"Sets",
"the",
"minimum",
"number",
"of",
"active",
"connections",
"to",
"be",
"maintained",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/RiakNode.java#L433-L446 |
104,073 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/RiakNode.java | RiakNode.setIdleTimeout | public RiakNode setIdleTimeout(int idleTimeoutInMillis)
{
stateCheck(State.CREATED, State.RUNNING, State.HEALTH_CHECKING);
this.idleTimeoutInNanos = TimeUnit.NANOSECONDS.convert(idleTimeoutInMillis, TimeUnit.MILLISECONDS);
return this;
} | java | public RiakNode setIdleTimeout(int idleTimeoutInMillis)
{
stateCheck(State.CREATED, State.RUNNING, State.HEALTH_CHECKING);
this.idleTimeoutInNanos = TimeUnit.NANOSECONDS.convert(idleTimeoutInMillis, TimeUnit.MILLISECONDS);
return this;
} | [
"public",
"RiakNode",
"setIdleTimeout",
"(",
"int",
"idleTimeoutInMillis",
")",
"{",
"stateCheck",
"(",
"State",
".",
"CREATED",
",",
"State",
".",
"RUNNING",
",",
"State",
".",
"HEALTH_CHECKING",
")",
";",
"this",
".",
"idleTimeoutInNanos",
"=",
"TimeUnit",
"... | Sets the connection idle timeout for connections.
@param idleTimeoutInMillis the idleTimeout to set
@return a reference to this RiakNode
@see Builder#withIdleTimeout(int) | [
"Sets",
"the",
"connection",
"idle",
"timeout",
"for",
"connections",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/RiakNode.java#L487-L492 |
104,074 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/RiakNode.java | RiakNode.getIdleTimeout | public int getIdleTimeout()
{
stateCheck(State.CREATED, State.RUNNING, State.HEALTH_CHECKING);
return (int) TimeUnit.MILLISECONDS.convert(idleTimeoutInNanos, TimeUnit.NANOSECONDS);
} | java | public int getIdleTimeout()
{
stateCheck(State.CREATED, State.RUNNING, State.HEALTH_CHECKING);
return (int) TimeUnit.MILLISECONDS.convert(idleTimeoutInNanos, TimeUnit.NANOSECONDS);
} | [
"public",
"int",
"getIdleTimeout",
"(",
")",
"{",
"stateCheck",
"(",
"State",
".",
"CREATED",
",",
"State",
".",
"RUNNING",
",",
"State",
".",
"HEALTH_CHECKING",
")",
";",
"return",
"(",
"int",
")",
"TimeUnit",
".",
"MILLISECONDS",
".",
"convert",
"(",
"... | Returns the connection idle timeout for connections in milliseconds.
@return the idleTimeout in milliseconds
@see Builder#withIdleTimeout(int) | [
"Returns",
"the",
"connection",
"idle",
"timeout",
"for",
"connections",
"in",
"milliseconds",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/RiakNode.java#L500-L504 |
104,075 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/RiakNode.java | RiakNode.setConnectionTimeout | public RiakNode setConnectionTimeout(int connectionTimeoutInMillis)
{
stateCheck(State.CREATED, State.RUNNING, State.HEALTH_CHECKING);
this.connectionTimeout = connectionTimeoutInMillis;
bootstrap.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, connectionTimeout);
return this;
} | java | public RiakNode setConnectionTimeout(int connectionTimeoutInMillis)
{
stateCheck(State.CREATED, State.RUNNING, State.HEALTH_CHECKING);
this.connectionTimeout = connectionTimeoutInMillis;
bootstrap.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, connectionTimeout);
return this;
} | [
"public",
"RiakNode",
"setConnectionTimeout",
"(",
"int",
"connectionTimeoutInMillis",
")",
"{",
"stateCheck",
"(",
"State",
".",
"CREATED",
",",
"State",
".",
"RUNNING",
",",
"State",
".",
"HEALTH_CHECKING",
")",
";",
"this",
".",
"connectionTimeout",
"=",
"con... | Sets the connection timeout for new connections.
@param connectionTimeoutInMillis the connectionTimeout to set
@return a reference to this RiakNode
@see Builder#withConnectionTimeout(int) | [
"Sets",
"the",
"connection",
"timeout",
"for",
"new",
"connections",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/RiakNode.java#L513-L519 |
104,076 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/RiakNode.java | RiakNode.availablePermits | public int availablePermits()
{
stateCheck(State.CREATED, State.RUNNING, State.HEALTH_CHECKING);
return permits.availablePermits();
} | java | public int availablePermits()
{
stateCheck(State.CREATED, State.RUNNING, State.HEALTH_CHECKING);
return permits.availablePermits();
} | [
"public",
"int",
"availablePermits",
"(",
")",
"{",
"stateCheck",
"(",
"State",
".",
"CREATED",
",",
"State",
".",
"RUNNING",
",",
"State",
".",
"HEALTH_CHECKING",
")",
";",
"return",
"permits",
".",
"availablePermits",
"(",
")",
";",
"}"
] | Returns the number of permits currently available.
The number of available permits indicates how many additional
connections can be made without blocking.
@return the number of available permits.
@see Builder#withMaxConnections(int) | [
"Returns",
"the",
"number",
"of",
"permits",
"currently",
"available",
".",
"The",
"number",
"of",
"available",
"permits",
"indicates",
"how",
"many",
"additional",
"connections",
"can",
"be",
"made",
"without",
"blocking",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/RiakNode.java#L541-L545 |
104,077 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/RiakNode.java | RiakNode.execute | public boolean execute(FutureOperation operation)
{
stateCheck(State.RUNNING, State.HEALTH_CHECKING);
operation.setLastNode(this);
Channel channel = getConnection();
if (channel != null)
{
inProgressMap.put(channel, operation);
ChannelFuture writeFutu... | java | public boolean execute(FutureOperation operation)
{
stateCheck(State.RUNNING, State.HEALTH_CHECKING);
operation.setLastNode(this);
Channel channel = getConnection();
if (channel != null)
{
inProgressMap.put(channel, operation);
ChannelFuture writeFutu... | [
"public",
"boolean",
"execute",
"(",
"FutureOperation",
"operation",
")",
"{",
"stateCheck",
"(",
"State",
".",
"RUNNING",
",",
"State",
".",
"HEALTH_CHECKING",
")",
";",
"operation",
".",
"setLastNode",
"(",
"this",
")",
";",
"Channel",
"channel",
"=",
"get... | Submits the operation to be executed on this node.
@param operation The operation to perform
@return {@code true} if this operation was accepted, {@code false} if there
were no available connections.
@throws IllegalStateException if this node is not in the {@code RUNNING} or {@code HEALTH_CHECKING} state
@throws Il... | [
"Submits",
"the",
"operation",
"to",
"be",
"executed",
"on",
"this",
"node",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/RiakNode.java#L577-L598 |
104,078 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/RiakNode.java | RiakNode.returnConnection | private void returnConnection(Channel c)
{
switch (state)
{
case SHUTTING_DOWN:
case SHUTDOWN:
closeConnection(c);
break;
case RUNNING:
case HEALTH_CHECKING:
default:
if (inProgressMap.contain... | java | private void returnConnection(Channel c)
{
switch (state)
{
case SHUTTING_DOWN:
case SHUTDOWN:
closeConnection(c);
break;
case RUNNING:
case HEALTH_CHECKING:
default:
if (inProgressMap.contain... | [
"private",
"void",
"returnConnection",
"(",
"Channel",
"c",
")",
"{",
"switch",
"(",
"state",
")",
"{",
"case",
"SHUTTING_DOWN",
":",
"case",
"SHUTDOWN",
":",
"closeConnection",
"(",
"c",
")",
";",
"break",
";",
"case",
"RUNNING",
":",
"case",
"HEALTH_CHEC... | Return a Netty channel.
@param c The Netty channel to return to the pool | [
"Return",
"a",
"Netty",
"channel",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/RiakNode.java#L811-L844 |
104,079 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/RiakNode.java | RiakNode.onSuccess | @Override
public void onSuccess(Channel channel, final RiakMessage response)
{
logger.debug("Operation onSuccess() channel: id:{} {}:{}", channel.hashCode(), remoteAddress, port);
consecutiveFailedOperations.set(0);
final FutureOperation inProgress = inProgressMap.get(channel);
... | java | @Override
public void onSuccess(Channel channel, final RiakMessage response)
{
logger.debug("Operation onSuccess() channel: id:{} {}:{}", channel.hashCode(), remoteAddress, port);
consecutiveFailedOperations.set(0);
final FutureOperation inProgress = inProgressMap.get(channel);
... | [
"@",
"Override",
"public",
"void",
"onSuccess",
"(",
"Channel",
"channel",
",",
"final",
"RiakMessage",
"response",
")",
"{",
"logger",
".",
"debug",
"(",
"\"Operation onSuccess() channel: id:{} {}:{}\"",
",",
"channel",
".",
"hashCode",
"(",
")",
",",
"remoteAddr... | End ConnectionPool stuff | [
"End",
"ConnectionPool",
"stuff"
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/RiakNode.java#L857-L883 |
104,080 | basho/riak-java-client | src/main/java/com/basho/riak/client/api/cap/DefaultResolver.java | DefaultResolver.resolve | @Override
public T resolve(List<T> siblings) throws UnresolvedConflictException
{
if (siblings.size() > 1)
{
throw new UnresolvedConflictException("Siblings found", siblings);
}
else if (siblings.size() == 1)
{
return siblings.get(0);
}
... | java | @Override
public T resolve(List<T> siblings) throws UnresolvedConflictException
{
if (siblings.size() > 1)
{
throw new UnresolvedConflictException("Siblings found", siblings);
}
else if (siblings.size() == 1)
{
return siblings.get(0);
}
... | [
"@",
"Override",
"public",
"T",
"resolve",
"(",
"List",
"<",
"T",
">",
"siblings",
")",
"throws",
"UnresolvedConflictException",
"{",
"if",
"(",
"siblings",
".",
"size",
"(",
")",
">",
"1",
")",
"{",
"throw",
"new",
"UnresolvedConflictException",
"(",
"\"S... | Detects conflict but does not resolve it.
@param siblings the list of siblings returned from Riak
@return null or the single value in the collection
@throws UnresolvedConflictException if {@code siblings} has > 1 entry. | [
"Detects",
"conflict",
"but",
"does",
"not",
"resolve",
"it",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/api/cap/DefaultResolver.java#L43-L58 |
104,081 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/query/timeseries/TableDefinition.java | TableDefinition.getPartitionKeyColumnDescriptions | public Collection<FullColumnDescription> getPartitionKeyColumnDescriptions()
{
if (partitionKeys == null)
{
partitionKeys = new LinkedList<>();
for (FullColumnDescription col : fullColumnDescriptions.values())
{
if (col.isPartitionKeyMember())
... | java | public Collection<FullColumnDescription> getPartitionKeyColumnDescriptions()
{
if (partitionKeys == null)
{
partitionKeys = new LinkedList<>();
for (FullColumnDescription col : fullColumnDescriptions.values())
{
if (col.isPartitionKeyMember())
... | [
"public",
"Collection",
"<",
"FullColumnDescription",
">",
"getPartitionKeyColumnDescriptions",
"(",
")",
"{",
"if",
"(",
"partitionKeys",
"==",
"null",
")",
"{",
"partitionKeys",
"=",
"new",
"LinkedList",
"<>",
"(",
")",
";",
"for",
"(",
"FullColumnDescription",
... | Get the collection of Partition Key FullColumnDescriptions, in order.
@return an iterable collection. | [
"Get",
"the",
"collection",
"of",
"Partition",
"Key",
"FullColumnDescriptions",
"in",
"order",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/query/timeseries/TableDefinition.java#L68-L86 |
104,082 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/query/timeseries/TableDefinition.java | TableDefinition.getQuantumDescription | public FullColumnDescription getQuantumDescription()
{
if (quantumField == null)
{
for (FullColumnDescription fd: getPartitionKeyColumnDescriptions())
{
if (fd.hasQuantum())
{
if (quantumField != null)
{
... | java | public FullColumnDescription getQuantumDescription()
{
if (quantumField == null)
{
for (FullColumnDescription fd: getPartitionKeyColumnDescriptions())
{
if (fd.hasQuantum())
{
if (quantumField != null)
{
... | [
"public",
"FullColumnDescription",
"getQuantumDescription",
"(",
")",
"{",
"if",
"(",
"quantumField",
"==",
"null",
")",
"{",
"for",
"(",
"FullColumnDescription",
"fd",
":",
"getPartitionKeyColumnDescriptions",
"(",
")",
")",
"{",
"if",
"(",
"fd",
".",
"hasQuant... | Get the FullColumnDescription for a quantum field, if any.
@return null if there is no quantum information | [
"Get",
"the",
"FullColumnDescription",
"for",
"a",
"quantum",
"field",
"if",
"any",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/query/timeseries/TableDefinition.java#L92-L113 |
104,083 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/query/timeseries/TableDefinition.java | TableDefinition.getLocalKeyColumnDescriptions | public Collection<FullColumnDescription> getLocalKeyColumnDescriptions()
{
if (localKeys == null)
{
localKeys = new LinkedList<>();
for (FullColumnDescription col : fullColumnDescriptions.values())
{
if (col.isLocalKeyMember())
{
... | java | public Collection<FullColumnDescription> getLocalKeyColumnDescriptions()
{
if (localKeys == null)
{
localKeys = new LinkedList<>();
for (FullColumnDescription col : fullColumnDescriptions.values())
{
if (col.isLocalKeyMember())
{
... | [
"public",
"Collection",
"<",
"FullColumnDescription",
">",
"getLocalKeyColumnDescriptions",
"(",
")",
"{",
"if",
"(",
"localKeys",
"==",
"null",
")",
"{",
"localKeys",
"=",
"new",
"LinkedList",
"<>",
"(",
")",
";",
"for",
"(",
"FullColumnDescription",
"col",
"... | Get the collection of Local Key FullColumnDescriptions, in order.
@return an iterable collection. | [
"Get",
"the",
"collection",
"of",
"Local",
"Key",
"FullColumnDescriptions",
"in",
"order",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/query/timeseries/TableDefinition.java#L119-L137 |
104,084 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/FutureOperation.java | FutureOperation.setResponse | public synchronized final void setResponse(RiakMessage rawResponse)
{
stateCheck(State.CREATED, State.WRITTEN, State.RETRY);
U decodedMessage = decode(rawResponse);
processMessage(decodedMessage);
exception = null;
if (done(decodedMessage))
{
logger.debu... | java | public synchronized final void setResponse(RiakMessage rawResponse)
{
stateCheck(State.CREATED, State.WRITTEN, State.RETRY);
U decodedMessage = decode(rawResponse);
processMessage(decodedMessage);
exception = null;
if (done(decodedMessage))
{
logger.debu... | [
"public",
"synchronized",
"final",
"void",
"setResponse",
"(",
"RiakMessage",
"rawResponse",
")",
"{",
"stateCheck",
"(",
"State",
".",
"CREATED",
",",
"State",
".",
"WRITTEN",
",",
"State",
".",
"RETRY",
")",
";",
"U",
"decodedMessage",
"=",
"decode",
"(",
... | Exposed for testing. | [
"Exposed",
"for",
"testing",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/FutureOperation.java#L193-L211 |
104,085 | basho/riak-java-client | src/main/java/com/basho/riak/client/api/convert/Converter.java | Converter.toDomain | public T toDomain(RiakObject obj, Location location)
{
T domainObject;
if (obj.isDeleted())
{
domainObject = newDomainInstance();
}
else
{
domainObject = toDomain(obj.getValue(), obj.getContentType());
AnnotationUtil.populateIndexe... | java | public T toDomain(RiakObject obj, Location location)
{
T domainObject;
if (obj.isDeleted())
{
domainObject = newDomainInstance();
}
else
{
domainObject = toDomain(obj.getValue(), obj.getContentType());
AnnotationUtil.populateIndexe... | [
"public",
"T",
"toDomain",
"(",
"RiakObject",
"obj",
",",
"Location",
"location",
")",
"{",
"T",
"domainObject",
";",
"if",
"(",
"obj",
".",
"isDeleted",
"(",
")",
")",
"{",
"domainObject",
"=",
"newDomainInstance",
"(",
")",
";",
"}",
"else",
"{",
"do... | Converts from a RiakObject to a domain object.
@param obj the RiakObject to be converted
@param location The location of this RiakObject in Riak
@return an instance of the domain type T | [
"Converts",
"from",
"a",
"RiakObject",
"to",
"a",
"domain",
"object",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/api/convert/Converter.java#L74-L101 |
104,086 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/util/BinaryValue.java | BinaryValue.create | public static BinaryValue create(String data, Charset charset)
{
byte[] bytes = null;
if (data != null)
{
bytes = data.getBytes(charset);
}
return new BinaryValue(bytes);
} | java | public static BinaryValue create(String data, Charset charset)
{
byte[] bytes = null;
if (data != null)
{
bytes = data.getBytes(charset);
}
return new BinaryValue(bytes);
} | [
"public",
"static",
"BinaryValue",
"create",
"(",
"String",
"data",
",",
"Charset",
"charset",
")",
"{",
"byte",
"[",
"]",
"bytes",
"=",
"null",
";",
"if",
"(",
"data",
"!=",
"null",
")",
"{",
"bytes",
"=",
"data",
".",
"getBytes",
"(",
"charset",
")... | Create a BinaryValue containing a copy of the supplied string
encoded using the supplied Charset.
@param data the data to copy
@param charset the charset to use for encoding
@return a new {@code BinaryValue} | [
"Create",
"a",
"BinaryValue",
"containing",
"a",
"copy",
"of",
"the",
"supplied",
"string",
"encoded",
"using",
"the",
"supplied",
"Charset",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/util/BinaryValue.java#L106-L114 |
104,087 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/query/indexes/RiakIndex.java | RiakIndex.add | public final RiakIndex<T> add(Collection<T> values)
{
for (T value : values)
{
add(value);
}
return this;
} | java | public final RiakIndex<T> add(Collection<T> values)
{
for (T value : values)
{
add(value);
}
return this;
} | [
"public",
"final",
"RiakIndex",
"<",
"T",
">",
"add",
"(",
"Collection",
"<",
"T",
">",
"values",
")",
"{",
"for",
"(",
"T",
"value",
":",
"values",
")",
"{",
"add",
"(",
"value",
")",
";",
"}",
"return",
"this",
";",
"}"
] | Add a asSet of values to this secondary index.
@param values a collection of values to add
@return a reference to this object | [
"Add",
"a",
"asSet",
"of",
"values",
"to",
"this",
"secondary",
"index",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/query/indexes/RiakIndex.java#L96-L104 |
104,088 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/query/indexes/RiakIndex.java | RiakIndex.remove | public final RiakIndex<T> remove(Collection<T> values)
{
for (T value : values)
{
remove(value);
}
return this;
} | java | public final RiakIndex<T> remove(Collection<T> values)
{
for (T value : values)
{
remove(value);
}
return this;
} | [
"public",
"final",
"RiakIndex",
"<",
"T",
">",
"remove",
"(",
"Collection",
"<",
"T",
">",
"values",
")",
"{",
"for",
"(",
"T",
"value",
":",
"values",
")",
"{",
"remove",
"(",
"value",
")",
";",
"}",
"return",
"this",
";",
"}"
] | Remove a asSet of values from this index
@param values a collection of values to remove
@return a reference to this object | [
"Remove",
"a",
"asSet",
"of",
"values",
"from",
"this",
"index"
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/query/indexes/RiakIndex.java#L136-L143 |
104,089 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/util/CharsetUtils.java | CharsetUtils.addUtf8Charset | public static String addUtf8Charset(String contentType)
{
if (contentType == null)
{
return "text/plain;charset=utf-8";
}
Matcher matcher = CHARSET_PATT.matcher(contentType);
if (matcher.find())
{
// replace what ever content-type with utf8
... | java | public static String addUtf8Charset(String contentType)
{
if (contentType == null)
{
return "text/plain;charset=utf-8";
}
Matcher matcher = CHARSET_PATT.matcher(contentType);
if (matcher.find())
{
// replace what ever content-type with utf8
... | [
"public",
"static",
"String",
"addUtf8Charset",
"(",
"String",
"contentType",
")",
"{",
"if",
"(",
"contentType",
"==",
"null",
")",
"{",
"return",
"\"text/plain;charset=utf-8\"",
";",
"}",
"Matcher",
"matcher",
"=",
"CHARSET_PATT",
".",
"matcher",
"(",
"content... | Adds the utf-8 charset to a content type.
@param contentType
@return the {@code contentType} with {@literal ;charset=utf-8} appended. | [
"Adds",
"the",
"utf",
"-",
"8",
"charset",
"to",
"a",
"content",
"type",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/util/CharsetUtils.java#L126-L141 |
104,090 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/util/CharsetUtils.java | CharsetUtils.addCharset | public static String addCharset(String charset, String contentType)
{
if (null == contentType)
{
return "text/plain;charset=" + charset;
}
else
{
Matcher matcher = CHARSET_PATT.matcher(contentType);
if (matcher.find())
{
... | java | public static String addCharset(String charset, String contentType)
{
if (null == contentType)
{
return "text/plain;charset=" + charset;
}
else
{
Matcher matcher = CHARSET_PATT.matcher(contentType);
if (matcher.find())
{
... | [
"public",
"static",
"String",
"addCharset",
"(",
"String",
"charset",
",",
"String",
"contentType",
")",
"{",
"if",
"(",
"null",
"==",
"contentType",
")",
"{",
"return",
"\"text/plain;charset=\"",
"+",
"charset",
";",
"}",
"else",
"{",
"Matcher",
"matcher",
... | Adds the charset to a content type.
@param contentType
@return the {@code contentType} with {@code charset.name()} appended. | [
"Adds",
"the",
"charset",
"to",
"a",
"content",
"type",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/util/CharsetUtils.java#L149-L169 |
104,091 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/util/CharsetUtils.java | CharsetUtils.hasCharset | public static boolean hasCharset(String ctype)
{
if (ctype == null)
{
return false;
}
Matcher matcher = CHARSET_PATT.matcher(ctype);
if (matcher.find())
{
return true;
}
else
{
return false;
}
} | java | public static boolean hasCharset(String ctype)
{
if (ctype == null)
{
return false;
}
Matcher matcher = CHARSET_PATT.matcher(ctype);
if (matcher.find())
{
return true;
}
else
{
return false;
}
} | [
"public",
"static",
"boolean",
"hasCharset",
"(",
"String",
"ctype",
")",
"{",
"if",
"(",
"ctype",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"Matcher",
"matcher",
"=",
"CHARSET_PATT",
".",
"matcher",
"(",
"ctype",
")",
";",
"if",
"(",
"match... | Check if a content-type string has a charset field appended.
@param ctype
the content-type string
@return true if {@code ctype} has a charset, false otherwise | [
"Check",
"if",
"a",
"content",
"-",
"type",
"string",
"has",
"a",
"charset",
"field",
"appended",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/util/CharsetUtils.java#L270-L285 |
104,092 | basho/riak-java-client | src/main/java/com/basho/riak/client/core/query/timeseries/Cell.java | Cell.newTimestamp | public static Cell newTimestamp(long rawTimestampValue)
{
final Cell cell = new Cell();
cell.initTimestamp(rawTimestampValue);
return cell;
} | java | public static Cell newTimestamp(long rawTimestampValue)
{
final Cell cell = new Cell();
cell.initTimestamp(rawTimestampValue);
return cell;
} | [
"public",
"static",
"Cell",
"newTimestamp",
"(",
"long",
"rawTimestampValue",
")",
"{",
"final",
"Cell",
"cell",
"=",
"new",
"Cell",
"(",
")",
";",
"cell",
".",
"initTimestamp",
"(",
"rawTimestampValue",
")",
";",
"return",
"cell",
";",
"}"
] | Creates a new "Timestamp" cell from the provided raw value.
@param rawTimestampValue The epoch timestamp, including milliseconds.
@return The new timestamp Cell. | [
"Creates",
"a",
"new",
"Timestamp",
"cell",
"from",
"the",
"provided",
"raw",
"value",
"."
] | bed6cd60f360bacf1b873ab92dd74f2526651e71 | https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/query/timeseries/Cell.java#L212-L217 |
104,093 | opentok/Opentok-Java-SDK | src/main/java/com/opentok/util/TokenGenerator.java | TokenGenerator.generateToken | public static String generateToken(final Integer apiKey, final String apiSecret)
throws OpenTokException {
//This is the default expire time we use for rest endpoints.
final long defaultExpireTime = System.currentTimeMillis() / 1000L
+ TimeUnit.MINUTES.toSeconds(3);
... | java | public static String generateToken(final Integer apiKey, final String apiSecret)
throws OpenTokException {
//This is the default expire time we use for rest endpoints.
final long defaultExpireTime = System.currentTimeMillis() / 1000L
+ TimeUnit.MINUTES.toSeconds(3);
... | [
"public",
"static",
"String",
"generateToken",
"(",
"final",
"Integer",
"apiKey",
",",
"final",
"String",
"apiSecret",
")",
"throws",
"OpenTokException",
"{",
"//This is the default expire time we use for rest endpoints.",
"final",
"long",
"defaultExpireTime",
"=",
"System"... | Used by the REST Endpoints | [
"Used",
"by",
"the",
"REST",
"Endpoints"
] | d71b7999facc3131c415aebea874ea55776d477f | https://github.com/opentok/Opentok-Java-SDK/blob/d71b7999facc3131c415aebea874ea55776d477f/src/main/java/com/opentok/util/TokenGenerator.java#L30-L42 |
104,094 | opentok/Opentok-Java-SDK | src/main/java/com/opentok/SignalProperties.java | SignalProperties.toMap | public Map<String, Collection<String>> toMap() {
Map<String, Collection<String>> params = new HashMap<String, Collection<String>>();
if (null != type) {
ArrayList<String> valueList = new ArrayList<String>();
valueList.add(type);
params.put("type", valueList);
... | java | public Map<String, Collection<String>> toMap() {
Map<String, Collection<String>> params = new HashMap<String, Collection<String>>();
if (null != type) {
ArrayList<String> valueList = new ArrayList<String>();
valueList.add(type);
params.put("type", valueList);
... | [
"public",
"Map",
"<",
"String",
",",
"Collection",
"<",
"String",
">",
">",
"toMap",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"Collection",
"<",
"String",
">",
">",
"params",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Collection",
"<",
"String",
">... | Returns the signal properties as a Map. | [
"Returns",
"the",
"signal",
"properties",
"as",
"a",
"Map",
"."
] | d71b7999facc3131c415aebea874ea55776d477f | https://github.com/opentok/Opentok-Java-SDK/blob/d71b7999facc3131c415aebea874ea55776d477f/src/main/java/com/opentok/SignalProperties.java#L89-L103 |
104,095 | opentok/Opentok-Java-SDK | src/main/java/com/opentok/ArchiveProperties.java | ArchiveProperties.toMap | public Map<String, Collection<String>> toMap() {
Map<String, Collection<String>> params = new HashMap<String, Collection<String>>();
if (name != null) {
ArrayList<String> valueList = new ArrayList<String>();
valueList.add(name);
params.put("name", valueList);
... | java | public Map<String, Collection<String>> toMap() {
Map<String, Collection<String>> params = new HashMap<String, Collection<String>>();
if (name != null) {
ArrayList<String> valueList = new ArrayList<String>();
valueList.add(name);
params.put("name", valueList);
... | [
"public",
"Map",
"<",
"String",
",",
"Collection",
"<",
"String",
">",
">",
"toMap",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"Collection",
"<",
"String",
">",
">",
"params",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Collection",
"<",
"String",
">... | Returns the archive properties as a Map. | [
"Returns",
"the",
"archive",
"properties",
"as",
"a",
"Map",
"."
] | d71b7999facc3131c415aebea874ea55776d477f | https://github.com/opentok/Opentok-Java-SDK/blob/d71b7999facc3131c415aebea874ea55776d477f/src/main/java/com/opentok/ArchiveProperties.java#L185-L216 |
104,096 | opentok/Opentok-Java-SDK | src/main/java/com/opentok/SessionProperties.java | SessionProperties.toMap | public Map<String, Collection<String>> toMap() {
Map<String, Collection<String>> params = new HashMap<String, Collection<String>>();
if (null != location) {
ArrayList<String> valueList = new ArrayList<String>();
valueList.add(location);
params.put("location", valueLis... | java | public Map<String, Collection<String>> toMap() {
Map<String, Collection<String>> params = new HashMap<String, Collection<String>>();
if (null != location) {
ArrayList<String> valueList = new ArrayList<String>();
valueList.add(location);
params.put("location", valueLis... | [
"public",
"Map",
"<",
"String",
",",
"Collection",
"<",
"String",
">",
">",
"toMap",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"Collection",
"<",
"String",
">",
">",
"params",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Collection",
"<",
"String",
">... | Returns the session properties as a Map. | [
"Returns",
"the",
"session",
"properties",
"as",
"a",
"Map",
"."
] | d71b7999facc3131c415aebea874ea55776d477f | https://github.com/opentok/Opentok-Java-SDK/blob/d71b7999facc3131c415aebea874ea55776d477f/src/main/java/com/opentok/SessionProperties.java#L164-L181 |
104,097 | davidmoten/rxjava-extras | src/main/java/com/github/davidmoten/rx/Functions.java | Functions.add | public static <T extends Number> Func2<T, T, T> add() {
return new Func2<T, T, T>() {
@SuppressWarnings("unchecked")
@Override
public T call(T a, T b) {
if (a instanceof Integer)
return (T) (Number) (a.intValue() + b.intValue());
... | java | public static <T extends Number> Func2<T, T, T> add() {
return new Func2<T, T, T>() {
@SuppressWarnings("unchecked")
@Override
public T call(T a, T b) {
if (a instanceof Integer)
return (T) (Number) (a.intValue() + b.intValue());
... | [
"public",
"static",
"<",
"T",
"extends",
"Number",
">",
"Func2",
"<",
"T",
",",
"T",
",",
"T",
">",
"add",
"(",
")",
"{",
"return",
"new",
"Func2",
"<",
"T",
",",
"T",
",",
"T",
">",
"(",
")",
"{",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
... | Returns a Func2 that adds numbers. Useful for Observable.reduce but not
particularly performant as it does instanceOf checks.
@param <T>
generic type of Number being added
@return Func2 that adds numbers | [
"Returns",
"a",
"Func2",
"that",
"adds",
"numbers",
".",
"Useful",
"for",
"Observable",
".",
"reduce",
"but",
"not",
"particularly",
"performant",
"as",
"it",
"does",
"instanceOf",
"checks",
"."
] | a91d2ba7d454843250e0b0fce36084f9fb02a551 | https://github.com/davidmoten/rxjava-extras/blob/a91d2ba7d454843250e0b0fce36084f9fb02a551/src/main/java/com/github/davidmoten/rx/Functions.java#L89-L110 |
104,098 | davidmoten/rxjava-extras | src/main/java/com/github/davidmoten/rx/Transformers.java | Transformers.bufferWhile | public static final <T> Transformer<T, List<T>> bufferWhile(
Func1<? super T, Boolean> predicate) {
return bufferWhile(predicate, 10);
} | java | public static final <T> Transformer<T, List<T>> bufferWhile(
Func1<? super T, Boolean> predicate) {
return bufferWhile(predicate, 10);
} | [
"public",
"static",
"final",
"<",
"T",
">",
"Transformer",
"<",
"T",
",",
"List",
"<",
"T",
">",
">",
"bufferWhile",
"(",
"Func1",
"<",
"?",
"super",
"T",
",",
"Boolean",
">",
"predicate",
")",
"{",
"return",
"bufferWhile",
"(",
"predicate",
",",
"10... | Buffers the elements into continuous, non-overlapping Lists where the
boundary is determined by a predicate receiving each item, before or
after being buffered, and returns true to indicate a new buffer should
start.
<p>
The operator won't return an empty first or last buffer.
<dl>
<dt><b>Backpressure Support:</b></d... | [
"Buffers",
"the",
"elements",
"into",
"continuous",
"non",
"-",
"overlapping",
"Lists",
"where",
"the",
"boundary",
"is",
"determined",
"by",
"a",
"predicate",
"receiving",
"each",
"item",
"before",
"or",
"after",
"being",
"buffered",
"and",
"returns",
"true",
... | a91d2ba7d454843250e0b0fce36084f9fb02a551 | https://github.com/davidmoten/rxjava-extras/blob/a91d2ba7d454843250e0b0fce36084f9fb02a551/src/main/java/com/github/davidmoten/rx/Transformers.java#L1180-L1183 |
104,099 | davidmoten/rxjava-extras | src/main/java/com/github/davidmoten/rx/Transformers.java | Transformers.bufferWhile | public static final <T> Transformer<T, List<T>> bufferWhile(Func1<? super T, Boolean> predicate,
int capacityHint) {
return new OperatorBufferPredicateBoundary<T>(predicate, RxRingBuffer.SIZE, capacityHint,
false);
} | java | public static final <T> Transformer<T, List<T>> bufferWhile(Func1<? super T, Boolean> predicate,
int capacityHint) {
return new OperatorBufferPredicateBoundary<T>(predicate, RxRingBuffer.SIZE, capacityHint,
false);
} | [
"public",
"static",
"final",
"<",
"T",
">",
"Transformer",
"<",
"T",
",",
"List",
"<",
"T",
">",
">",
"bufferWhile",
"(",
"Func1",
"<",
"?",
"super",
"T",
",",
"Boolean",
">",
"predicate",
",",
"int",
"capacityHint",
")",
"{",
"return",
"new",
"Opera... | Buffers the elements into continuous, non-overlapping Lists where the
boundary is determined by a predicate receiving each item, before being
buffered, and returns true to indicate a new buffer should start.
<p>
The operator won't return an empty first or last buffer.
<dl>
<dt><b>Backpressure Support:</b></dt>
<dd>Th... | [
"Buffers",
"the",
"elements",
"into",
"continuous",
"non",
"-",
"overlapping",
"Lists",
"where",
"the",
"boundary",
"is",
"determined",
"by",
"a",
"predicate",
"receiving",
"each",
"item",
"before",
"being",
"buffered",
"and",
"returns",
"true",
"to",
"indicate"... | a91d2ba7d454843250e0b0fce36084f9fb02a551 | https://github.com/davidmoten/rxjava-extras/blob/a91d2ba7d454843250e0b0fce36084f9fb02a551/src/main/java/com/github/davidmoten/rx/Transformers.java#L1245-L1249 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.