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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
44,300 | baratine/baratine | framework/src/main/java/com/caucho/v5/vfs/VfsOld.java | VfsOld.openWrite | public static WriteStreamOld openWrite(CharBuffer cb)
{
com.caucho.v5.vfs.VfsStringWriter s = new com.caucho.v5.vfs.VfsStringWriter(cb);
WriteStreamOld os = new WriteStreamOld(s);
try {
os.setEncoding("utf-8");
} catch (Exception e) {
}
return os;
} | java | public static WriteStreamOld openWrite(CharBuffer cb)
{
com.caucho.v5.vfs.VfsStringWriter s = new com.caucho.v5.vfs.VfsStringWriter(cb);
WriteStreamOld os = new WriteStreamOld(s);
try {
os.setEncoding("utf-8");
} catch (Exception e) {
}
return os;
} | [
"public",
"static",
"WriteStreamOld",
"openWrite",
"(",
"CharBuffer",
"cb",
")",
"{",
"com",
".",
"caucho",
".",
"v5",
".",
"vfs",
".",
"VfsStringWriter",
"s",
"=",
"new",
"com",
".",
"caucho",
".",
"v5",
".",
"vfs",
".",
"VfsStringWriter",
"(",
"cb",
... | Creates a write stream to a CharBuffer. This is the standard way
to write to a string. | [
"Creates",
"a",
"write",
"stream",
"to",
"a",
"CharBuffer",
".",
"This",
"is",
"the",
"standard",
"way",
"to",
"write",
"to",
"a",
"string",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/VfsOld.java#L316-L327 |
44,301 | baratine/baratine | framework/src/main/java/com/caucho/v5/vfs/VfsOld.java | VfsOld.initJNI | public static void initJNI()
{
if (_isInitJNI.getAndSet(true)) {
return;
}
// order matters because of static init and license checking
FilesystemPath jniFilePath = JniFilePath.create();
if (jniFilePath != null) {
DEFAULT_SCHEME_MAP.put("file", jniFilePath);
SchemeMap localMap... | java | public static void initJNI()
{
if (_isInitJNI.getAndSet(true)) {
return;
}
// order matters because of static init and license checking
FilesystemPath jniFilePath = JniFilePath.create();
if (jniFilePath != null) {
DEFAULT_SCHEME_MAP.put("file", jniFilePath);
SchemeMap localMap... | [
"public",
"static",
"void",
"initJNI",
"(",
")",
"{",
"if",
"(",
"_isInitJNI",
".",
"getAndSet",
"(",
"true",
")",
")",
"{",
"return",
";",
"}",
"// order matters because of static init and license checking",
"FilesystemPath",
"jniFilePath",
"=",
"JniFilePath",
".",... | Initialize the JNI. | [
"Initialize",
"the",
"JNI",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/VfsOld.java#L416-L439 |
44,302 | baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentServiceImpl.java | SegmentServiceImpl.writeMetaTable | private void writeMetaTable(TableEntry entry)
{
TempBuffer tBuf = TempBuffer.create();
byte []buffer = tBuf.buffer();
int offset = 0;
buffer[offset++] = CODE_TABLE;
offset += BitsUtil.write(buffer, offset, entry.tableKey());
offset += BitsUtil.writeInt16(buffer, offset, entry.rowLength())... | java | private void writeMetaTable(TableEntry entry)
{
TempBuffer tBuf = TempBuffer.create();
byte []buffer = tBuf.buffer();
int offset = 0;
buffer[offset++] = CODE_TABLE;
offset += BitsUtil.write(buffer, offset, entry.tableKey());
offset += BitsUtil.writeInt16(buffer, offset, entry.rowLength())... | [
"private",
"void",
"writeMetaTable",
"(",
"TableEntry",
"entry",
")",
"{",
"TempBuffer",
"tBuf",
"=",
"TempBuffer",
".",
"create",
"(",
")",
";",
"byte",
"[",
"]",
"buffer",
"=",
"tBuf",
".",
"buffer",
"(",
")",
";",
"int",
"offset",
"=",
"0",
";",
"... | Metadata for a table entry. | [
"Metadata",
"for",
"a",
"table",
"entry",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentServiceImpl.java#L475-L509 |
44,303 | baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentServiceImpl.java | SegmentServiceImpl.writeMetaContinuation | private void writeMetaContinuation()
{
TempBuffer tBuf = TempBuffer.create();
byte []buffer = tBuf.buffer();
int metaLength = _segmentMeta[0].size();
SegmentExtent extent = new SegmentExtent(0, _addressTail, metaLength);
_metaExtents.add(extent);
_addressTail += metaLength;... | java | private void writeMetaContinuation()
{
TempBuffer tBuf = TempBuffer.create();
byte []buffer = tBuf.buffer();
int metaLength = _segmentMeta[0].size();
SegmentExtent extent = new SegmentExtent(0, _addressTail, metaLength);
_metaExtents.add(extent);
_addressTail += metaLength;... | [
"private",
"void",
"writeMetaContinuation",
"(",
")",
"{",
"TempBuffer",
"tBuf",
"=",
"TempBuffer",
".",
"create",
"(",
")",
";",
"byte",
"[",
"]",
"buffer",
"=",
"tBuf",
".",
"buffer",
"(",
")",
";",
"int",
"metaLength",
"=",
"_segmentMeta",
"[",
"0",
... | Writes a continuation entry, which points to a new meta-data segment. | [
"Writes",
"a",
"continuation",
"entry",
"which",
"points",
"to",
"a",
"new",
"meta",
"-",
"data",
"segment",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentServiceImpl.java#L547-L584 |
44,304 | baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentServiceImpl.java | SegmentServiceImpl.readMetaData | private boolean readMetaData()
throws IOException
{
SegmentExtent metaExtentInit = new SegmentExtent(0, 0, META_SEGMENT_SIZE);
try (InSegment reader = openRead(metaExtentInit)) {
ReadStream is = reader.in();
if (! readMetaDataHeader(is)) {
return false;
}
... | java | private boolean readMetaData()
throws IOException
{
SegmentExtent metaExtentInit = new SegmentExtent(0, 0, META_SEGMENT_SIZE);
try (InSegment reader = openRead(metaExtentInit)) {
ReadStream is = reader.in();
if (! readMetaDataHeader(is)) {
return false;
}
... | [
"private",
"boolean",
"readMetaData",
"(",
")",
"throws",
"IOException",
"{",
"SegmentExtent",
"metaExtentInit",
"=",
"new",
"SegmentExtent",
"(",
"0",
",",
"0",
",",
"META_SEGMENT_SIZE",
")",
";",
"try",
"(",
"InSegment",
"reader",
"=",
"openRead",
"(",
"meta... | Reads metadata header for entire database. | [
"Reads",
"metadata",
"header",
"for",
"entire",
"database",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentServiceImpl.java#L589-L635 |
44,305 | baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentServiceImpl.java | SegmentServiceImpl.readMetaDataHeader | private boolean readMetaDataHeader(ReadStream is)
throws IOException
{
long magic = BitsUtil.readLong(is);
if (magic != KELP_MAGIC) {
log.info(L.l("Mismatched kelp version {0} {1}\n",
Long.toHexString(magic),
_path));
return false;
}
i... | java | private boolean readMetaDataHeader(ReadStream is)
throws IOException
{
long magic = BitsUtil.readLong(is);
if (magic != KELP_MAGIC) {
log.info(L.l("Mismatched kelp version {0} {1}\n",
Long.toHexString(magic),
_path));
return false;
}
i... | [
"private",
"boolean",
"readMetaDataHeader",
"(",
"ReadStream",
"is",
")",
"throws",
"IOException",
"{",
"long",
"magic",
"=",
"BitsUtil",
".",
"readLong",
"(",
"is",
")",
";",
"if",
"(",
"magic",
"!=",
"KELP_MAGIC",
")",
"{",
"log",
".",
"info",
"(",
"L"... | The first metadata for the store includes the sizes of the segments,
the crc nonce, and optional headers.
<pre><code>
meta-syntax:
i64 - kelp magic
i32 - nonce
i32 - header count
{i32,i32} - headers
i32 - segment-size count
{i32} - segment-size+
i32 - crc32
...
</code></pre> | [
"The",
"first",
"metadata",
"for",
"the",
"store",
"includes",
"the",
"sizes",
"of",
"the",
"segments",
"the",
"crc",
"nonce",
"and",
"optional",
"headers",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentServiceImpl.java#L653-L715 |
44,306 | baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentServiceImpl.java | SegmentServiceImpl.readMetaDataEntry | private boolean readMetaDataEntry(ReadStream is)
throws IOException
{
int crc = _nonce;
int code = is.read();
crc = Crc32Caucho.generate(crc, code);
switch (code) {
case CODE_TABLE:
readMetaTable(is, crc);
break;
case CODE_SEGMENT:
readMetaSegment(is, crc... | java | private boolean readMetaDataEntry(ReadStream is)
throws IOException
{
int crc = _nonce;
int code = is.read();
crc = Crc32Caucho.generate(crc, code);
switch (code) {
case CODE_TABLE:
readMetaTable(is, crc);
break;
case CODE_SEGMENT:
readMetaSegment(is, crc... | [
"private",
"boolean",
"readMetaDataEntry",
"(",
"ReadStream",
"is",
")",
"throws",
"IOException",
"{",
"int",
"crc",
"=",
"_nonce",
";",
"int",
"code",
"=",
"is",
".",
"read",
"(",
")",
";",
"crc",
"=",
"Crc32Caucho",
".",
"generate",
"(",
"crc",
",",
... | Reads meta-data entries.
Each segment and table is stored in the metadata.
<ul>
<li>table - metadata for a table
<li>segment - metadata for a segment
<li>meta - continuation pointer for further meta table data.
</ul> | [
"Reads",
"meta",
"-",
"data",
"entries",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentServiceImpl.java#L729-L757 |
44,307 | baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentServiceImpl.java | SegmentServiceImpl.readMetaTable | private boolean readMetaTable(ReadStream is, int crc)
throws IOException
{
byte []key = new byte[TABLE_KEY_SIZE];
is.read(key, 0, key.length);
crc = Crc32Caucho.generate(crc, key);
int rowLength = BitsUtil.readInt16(is);
crc = Crc32Caucho.generateInt16(crc, rowLength);
int k... | java | private boolean readMetaTable(ReadStream is, int crc)
throws IOException
{
byte []key = new byte[TABLE_KEY_SIZE];
is.read(key, 0, key.length);
crc = Crc32Caucho.generate(crc, key);
int rowLength = BitsUtil.readInt16(is);
crc = Crc32Caucho.generateInt16(crc, rowLength);
int k... | [
"private",
"boolean",
"readMetaTable",
"(",
"ReadStream",
"is",
",",
"int",
"crc",
")",
"throws",
"IOException",
"{",
"byte",
"[",
"]",
"key",
"=",
"new",
"byte",
"[",
"TABLE_KEY_SIZE",
"]",
";",
"is",
".",
"read",
"(",
"key",
",",
"0",
",",
"key",
"... | Read metadata for a table.
<pre><code>
key byte[32]
rowLength int16
keyOffset int16
keyLength int16
crc int32
</code></pre> | [
"Read",
"metadata",
"for",
"a",
"table",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentServiceImpl.java#L770-L811 |
44,308 | baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentServiceImpl.java | SegmentServiceImpl.readMetaSegment | private boolean readMetaSegment(ReadStream is, int crc)
throws IOException
{
long value = BitsUtil.readLong(is);
crc = Crc32Caucho.generate(crc, value);
int crcFile = BitsUtil.readInt(is);
if (crcFile != crc) {
log.fine("meta-segment crc mismatch");
return false;
}
... | java | private boolean readMetaSegment(ReadStream is, int crc)
throws IOException
{
long value = BitsUtil.readLong(is);
crc = Crc32Caucho.generate(crc, value);
int crcFile = BitsUtil.readInt(is);
if (crcFile != crc) {
log.fine("meta-segment crc mismatch");
return false;
}
... | [
"private",
"boolean",
"readMetaSegment",
"(",
"ReadStream",
"is",
",",
"int",
"crc",
")",
"throws",
"IOException",
"{",
"long",
"value",
"=",
"BitsUtil",
".",
"readLong",
"(",
"is",
")",
";",
"crc",
"=",
"Crc32Caucho",
".",
"generate",
"(",
"crc",
",",
"... | metadata for a segment
<pre><code>
address int48
length int16
crc int32
</code></pre> | [
"metadata",
"for",
"a",
"segment"
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentServiceImpl.java#L822-L846 |
44,309 | baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentServiceImpl.java | SegmentServiceImpl.readMetaContinuation | private boolean readMetaContinuation(ReadStream is, int crc)
throws IOException
{
long value = BitsUtil.readLong(is);
crc = Crc32Caucho.generate(crc, value);
int crcFile = BitsUtil.readInt(is);
if (crcFile != crc) {
log.fine("meta-segment crc mismatch");
return false;
}
... | java | private boolean readMetaContinuation(ReadStream is, int crc)
throws IOException
{
long value = BitsUtil.readLong(is);
crc = Crc32Caucho.generate(crc, value);
int crcFile = BitsUtil.readInt(is);
if (crcFile != crc) {
log.fine("meta-segment crc mismatch");
return false;
}
... | [
"private",
"boolean",
"readMetaContinuation",
"(",
"ReadStream",
"is",
",",
"int",
"crc",
")",
"throws",
"IOException",
"{",
"long",
"value",
"=",
"BitsUtil",
".",
"readLong",
"(",
"is",
")",
";",
"crc",
"=",
"Crc32Caucho",
".",
"generate",
"(",
"crc",
","... | Continuation segment for the metadata.
Additional segments when the table/segment metadata doesn't fit. | [
"Continuation",
"segment",
"for",
"the",
"metadata",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentServiceImpl.java#L853-L884 |
44,310 | baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentServiceImpl.java | SegmentServiceImpl.findSegmentMeta | private SegmentMeta findSegmentMeta(int size)
{
for (SegmentMeta segmentMeta : this._segmentMeta) {
if (segmentMeta.size() == size) {
return segmentMeta;
}
}
throw new IllegalStateException(L.l("{0} is an invalid segment size", size));
} | java | private SegmentMeta findSegmentMeta(int size)
{
for (SegmentMeta segmentMeta : this._segmentMeta) {
if (segmentMeta.size() == size) {
return segmentMeta;
}
}
throw new IllegalStateException(L.l("{0} is an invalid segment size", size));
} | [
"private",
"SegmentMeta",
"findSegmentMeta",
"(",
"int",
"size",
")",
"{",
"for",
"(",
"SegmentMeta",
"segmentMeta",
":",
"this",
".",
"_segmentMeta",
")",
"{",
"if",
"(",
"segmentMeta",
".",
"size",
"(",
")",
"==",
"size",
")",
"{",
"return",
"segmentMeta... | Finds the segment group for a given size. | [
"Finds",
"the",
"segment",
"group",
"for",
"a",
"given",
"size",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentServiceImpl.java#L889-L898 |
44,311 | baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentServiceImpl.java | SegmentServiceImpl.createSegment | public SegmentKelp createSegment(int length,
byte []tableKey,
long sequence)
{
SegmentMeta segmentMeta = findSegmentMeta(length);
SegmentKelp segment;
SegmentExtent extent = segmentMeta.allocate();
if (extent == null) {... | java | public SegmentKelp createSegment(int length,
byte []tableKey,
long sequence)
{
SegmentMeta segmentMeta = findSegmentMeta(length);
SegmentKelp segment;
SegmentExtent extent = segmentMeta.allocate();
if (extent == null) {... | [
"public",
"SegmentKelp",
"createSegment",
"(",
"int",
"length",
",",
"byte",
"[",
"]",
"tableKey",
",",
"long",
"sequence",
")",
"{",
"SegmentMeta",
"segmentMeta",
"=",
"findSegmentMeta",
"(",
"length",
")",
";",
"SegmentKelp",
"segment",
";",
"SegmentExtent",
... | Create a new writing sequence with the given sequence id. | [
"Create",
"a",
"new",
"writing",
"sequence",
"with",
"the",
"given",
"sequence",
"id",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentServiceImpl.java#L947-L967 |
44,312 | baratine/baratine | kraken/src/main/java/com/caucho/v5/kraken/query/SelectQuery.java | SelectQuery.findAfterLocal | private void findAfterLocal(Result<Cursor> result,
RowCursor cursor,
Object []args,
Cursor cursorLocal)
{
long version = 0;
if (cursorLocal != null) {
version = cursorLocal.getVersion();
long time = curs... | java | private void findAfterLocal(Result<Cursor> result,
RowCursor cursor,
Object []args,
Cursor cursorLocal)
{
long version = 0;
if (cursorLocal != null) {
version = cursorLocal.getVersion();
long time = curs... | [
"private",
"void",
"findAfterLocal",
"(",
"Result",
"<",
"Cursor",
">",
"result",
",",
"RowCursor",
"cursor",
",",
"Object",
"[",
"]",
"args",
",",
"Cursor",
"cursorLocal",
")",
"{",
"long",
"version",
"=",
"0",
";",
"if",
"(",
"cursorLocal",
"!=",
"null... | After finding the local cursor, if it's expired, check with the cluster
to find the most recent value. | [
"After",
"finding",
"the",
"local",
"cursor",
"if",
"it",
"s",
"expired",
"check",
"with",
"the",
"cluster",
"to",
"find",
"the",
"most",
"recent",
"value",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kraken/query/SelectQuery.java#L284-L308 |
44,313 | baratine/baratine | web/src/main/java/com/caucho/v5/web/webapp/MultiMapImpl.java | MultiMapImpl.containsKey | @Override
public boolean containsKey(Object key)
{
if (key == null) {
return false;
}
K []keys = _keys;
for (int i = _size - 1 ; i >= 0; i--) {
K testKey = keys[i];
if (key.equals(testKey)) {
return true;
}
}
return false;
} | java | @Override
public boolean containsKey(Object key)
{
if (key == null) {
return false;
}
K []keys = _keys;
for (int i = _size - 1 ; i >= 0; i--) {
K testKey = keys[i];
if (key.equals(testKey)) {
return true;
}
}
return false;
} | [
"@",
"Override",
"public",
"boolean",
"containsKey",
"(",
"Object",
"key",
")",
"{",
"if",
"(",
"key",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"K",
"[",
"]",
"keys",
"=",
"_keys",
";",
"for",
"(",
"int",
"i",
"=",
"_size",
"-",
"1",
... | Returns true if the map contains the value. | [
"Returns",
"true",
"if",
"the",
"map",
"contains",
"the",
"value",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/web/webapp/MultiMapImpl.java#L125-L143 |
44,314 | baratine/baratine | web/src/main/java/com/caucho/v5/http/protocol/OutHttpApp.java | OutHttpApp.start | public void start()
{
_state = _state.toStart();
_bufferCapacity = DEFAULT_SIZE;
_tBuf = TempBuffer.create();
_buffer = _tBuf.buffer();
_startOffset = bufferStart();
_offset = _startOffset;
_contentLength = 0;
} | java | public void start()
{
_state = _state.toStart();
_bufferCapacity = DEFAULT_SIZE;
_tBuf = TempBuffer.create();
_buffer = _tBuf.buffer();
_startOffset = bufferStart();
_offset = _startOffset;
_contentLength = 0;
} | [
"public",
"void",
"start",
"(",
")",
"{",
"_state",
"=",
"_state",
".",
"toStart",
"(",
")",
";",
"_bufferCapacity",
"=",
"DEFAULT_SIZE",
";",
"_tBuf",
"=",
"TempBuffer",
".",
"create",
"(",
")",
";",
"_buffer",
"=",
"_tBuf",
".",
"buffer",
"(",
")",
... | Starts the response stream. | [
"Starts",
"the",
"response",
"stream",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/OutHttpApp.java#L132-L145 |
44,315 | baratine/baratine | web/src/main/java/com/caucho/v5/http/protocol/OutHttpApp.java | OutHttpApp.write | @Override
public void write(int ch)
throws IOException
{
if (isClosed() || isHead()) {
return;
}
int offset = _offset;
if (SIZE <= offset) {
flushByteBuffer();
offset = _offset;
}
_buffer[offset++] = (byte) ch;
_offset = offset;
} | java | @Override
public void write(int ch)
throws IOException
{
if (isClosed() || isHead()) {
return;
}
int offset = _offset;
if (SIZE <= offset) {
flushByteBuffer();
offset = _offset;
}
_buffer[offset++] = (byte) ch;
_offset = offset;
} | [
"@",
"Override",
"public",
"void",
"write",
"(",
"int",
"ch",
")",
"throws",
"IOException",
"{",
"if",
"(",
"isClosed",
"(",
")",
"||",
"isHead",
"(",
")",
")",
"{",
"return",
";",
"}",
"int",
"offset",
"=",
"_offset",
";",
"if",
"(",
"SIZE",
"<=",... | Writes a byte to the output. | [
"Writes",
"a",
"byte",
"to",
"the",
"output",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/OutHttpApp.java#L193-L210 |
44,316 | baratine/baratine | web/src/main/java/com/caucho/v5/http/protocol/OutHttpApp.java | OutHttpApp.write | @Override
public void write(byte []buffer, int offset, int length)
{
if (isClosed() || isHead()) {
return;
}
int byteLength = _offset;
while (true) {
int sublen = Math.min(length, SIZE - byteLength);
System.arraycopy(buffer, offset, _buffer, byteLength, sublen);
offset... | java | @Override
public void write(byte []buffer, int offset, int length)
{
if (isClosed() || isHead()) {
return;
}
int byteLength = _offset;
while (true) {
int sublen = Math.min(length, SIZE - byteLength);
System.arraycopy(buffer, offset, _buffer, byteLength, sublen);
offset... | [
"@",
"Override",
"public",
"void",
"write",
"(",
"byte",
"[",
"]",
"buffer",
",",
"int",
"offset",
",",
"int",
"length",
")",
"{",
"if",
"(",
"isClosed",
"(",
")",
"||",
"isHead",
"(",
")",
")",
"{",
"return",
";",
"}",
"int",
"byteLength",
"=",
... | Writes a chunk of bytes to the stream. | [
"Writes",
"a",
"chunk",
"of",
"bytes",
"to",
"the",
"stream",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/OutHttpApp.java#L215-L242 |
44,317 | baratine/baratine | web/src/main/java/com/caucho/v5/http/protocol/OutHttpApp.java | OutHttpApp.nextBuffer | @Override
public byte []nextBuffer(int offset)
throws IOException
{
if (offset < 0 || SIZE < offset) {
throw new IllegalStateException(L.l("Invalid offset: " + offset));
}
if (_bufferCapacity <= SIZE
|| _bufferCapacity <= offset + _bufferSize) {
_offset = offset;
flush... | java | @Override
public byte []nextBuffer(int offset)
throws IOException
{
if (offset < 0 || SIZE < offset) {
throw new IllegalStateException(L.l("Invalid offset: " + offset));
}
if (_bufferCapacity <= SIZE
|| _bufferCapacity <= offset + _bufferSize) {
_offset = offset;
flush... | [
"@",
"Override",
"public",
"byte",
"[",
"]",
"nextBuffer",
"(",
"int",
"offset",
")",
"throws",
"IOException",
"{",
"if",
"(",
"offset",
"<",
"0",
"||",
"SIZE",
"<",
"offset",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"L",
".",
"l",
"(",
... | Returns the next byte buffer. | [
"Returns",
"the",
"next",
"byte",
"buffer",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/OutHttpApp.java#L270-L298 |
44,318 | baratine/baratine | web/src/main/java/com/caucho/v5/http/protocol/OutHttpApp.java | OutHttpApp.close | @Override
public final void close()
throws IOException
{
State state = _state;
if (state.isClosing()) {
return;
}
_state = state.toClosing();
try {
flush(true);
} finally {
try {
_state = _state.toClose();
} catch (RuntimeException e) {
... | java | @Override
public final void close()
throws IOException
{
State state = _state;
if (state.isClosing()) {
return;
}
_state = state.toClosing();
try {
flush(true);
} finally {
try {
_state = _state.toClose();
} catch (RuntimeException e) {
... | [
"@",
"Override",
"public",
"final",
"void",
"close",
"(",
")",
"throws",
"IOException",
"{",
"State",
"state",
"=",
"_state",
";",
"if",
"(",
"state",
".",
"isClosing",
"(",
")",
")",
"{",
"return",
";",
"}",
"_state",
"=",
"state",
".",
"toClosing",
... | Closes the response stream | [
"Closes",
"the",
"response",
"stream"
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/OutHttpApp.java#L348-L369 |
44,319 | baratine/baratine | web/src/main/java/com/caucho/v5/http/protocol/OutHttpApp.java | OutHttpApp.flush | private void flush(boolean isEnd)
{
if (_startOffset == _offset && _bufferSize == 0) {
if (! isCommitted() || isEnd) {
flush(null, isEnd);
_startOffset = bufferStart();
_offset = _startOffset;
}
return;
}
int sublen = _offset - _startOffset;
_tBuf.length(_off... | java | private void flush(boolean isEnd)
{
if (_startOffset == _offset && _bufferSize == 0) {
if (! isCommitted() || isEnd) {
flush(null, isEnd);
_startOffset = bufferStart();
_offset = _startOffset;
}
return;
}
int sublen = _offset - _startOffset;
_tBuf.length(_off... | [
"private",
"void",
"flush",
"(",
"boolean",
"isEnd",
")",
"{",
"if",
"(",
"_startOffset",
"==",
"_offset",
"&&",
"_bufferSize",
"==",
"0",
")",
"{",
"if",
"(",
"!",
"isCommitted",
"(",
")",
"||",
"isEnd",
")",
"{",
"flush",
"(",
"null",
",",
"isEnd",... | Flushes the buffered response to the output stream. | [
"Flushes",
"the",
"buffered",
"response",
"to",
"the",
"output",
"stream",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/OutHttpApp.java#L374-L409 |
44,320 | baratine/baratine | framework/src/main/java/com/caucho/v5/ramp/hamp/InHamp.java | InHamp.readSend | private boolean readSend(InH3 hIn,
OutboxAmp outbox,
HeadersAmp headers)
throws IOException
{
MethodRefHamp methodHamp = null;
try {
methodHamp = readMethod(hIn);
} catch (Throwable e) {
log.log(Level.FINER, e.toString(), e);
... | java | private boolean readSend(InH3 hIn,
OutboxAmp outbox,
HeadersAmp headers)
throws IOException
{
MethodRefHamp methodHamp = null;
try {
methodHamp = readMethod(hIn);
} catch (Throwable e) {
log.log(Level.FINER, e.toString(), e);
... | [
"private",
"boolean",
"readSend",
"(",
"InH3",
"hIn",
",",
"OutboxAmp",
"outbox",
",",
"HeadersAmp",
"headers",
")",
"throws",
"IOException",
"{",
"MethodRefHamp",
"methodHamp",
"=",
"null",
";",
"try",
"{",
"methodHamp",
"=",
"readMethod",
"(",
"hIn",
")",
... | The send message is a on-way call to a service. | [
"The",
"send",
"message",
"is",
"a",
"on",
"-",
"way",
"call",
"to",
"a",
"service",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/ramp/hamp/InHamp.java#L362-L417 |
44,321 | baratine/baratine | framework/src/main/java/com/caucho/v5/ramp/hamp/InHamp.java | InHamp.readQuery | private void readQuery(InH3 hIn,
OutboxAmp outbox,
HeadersAmp headers)
throws IOException
{
GatewayReply from = readFromAddress(hIn);
long qid = hIn.readLong();
long timeout = 120 * 1000L;
/*
AmpQueryRef queryRef
= new Qu... | java | private void readQuery(InH3 hIn,
OutboxAmp outbox,
HeadersAmp headers)
throws IOException
{
GatewayReply from = readFromAddress(hIn);
long qid = hIn.readLong();
long timeout = 120 * 1000L;
/*
AmpQueryRef queryRef
= new Qu... | [
"private",
"void",
"readQuery",
"(",
"InH3",
"hIn",
",",
"OutboxAmp",
"outbox",
",",
"HeadersAmp",
"headers",
")",
"throws",
"IOException",
"{",
"GatewayReply",
"from",
"=",
"readFromAddress",
"(",
"hIn",
")",
";",
"long",
"qid",
"=",
"hIn",
".",
"readLong",... | The query message is a RPC call to a service. | [
"The",
"query",
"message",
"is",
"a",
"RPC",
"call",
"to",
"a",
"service",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/ramp/hamp/InHamp.java#L422-L526 |
44,322 | baratine/baratine | framework/src/main/java/com/caucho/v5/ramp/hamp/InHamp.java | InHamp.readQueryResult | private void readQueryResult(InH3 hIn, HeadersAmp headers)
throws IOException
{
ServiceRefAmp serviceRef = readToAddress(hIn);
long id = hIn.readLong();
QueryRefAmp queryRef = serviceRef.removeQueryRef(id);
if (queryRef != null) {
ClassLoader loader = queryRef.getClassLoader();
... | java | private void readQueryResult(InH3 hIn, HeadersAmp headers)
throws IOException
{
ServiceRefAmp serviceRef = readToAddress(hIn);
long id = hIn.readLong();
QueryRefAmp queryRef = serviceRef.removeQueryRef(id);
if (queryRef != null) {
ClassLoader loader = queryRef.getClassLoader();
... | [
"private",
"void",
"readQueryResult",
"(",
"InH3",
"hIn",
",",
"HeadersAmp",
"headers",
")",
"throws",
"IOException",
"{",
"ServiceRefAmp",
"serviceRef",
"=",
"readToAddress",
"(",
"hIn",
")",
";",
"long",
"id",
"=",
"hIn",
".",
"readLong",
"(",
")",
";",
... | query reply parsing
<pre><code>
["reply", {headers}, "from", qid, value]
</code></pre>
@param hIn the hessian input stream
@param headers the message's headers | [
"query",
"reply",
"parsing"
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/ramp/hamp/InHamp.java#L538-L572 |
44,323 | baratine/baratine | framework/src/main/java/com/caucho/v5/config/types/FileSetType.java | FileSetType.addInclude | public void addInclude(PathPatternType pattern)
{
if (_includeList == null)
_includeList = new ArrayList<PathPatternType>();
_includeList.add(pattern);
} | java | public void addInclude(PathPatternType pattern)
{
if (_includeList == null)
_includeList = new ArrayList<PathPatternType>();
_includeList.add(pattern);
} | [
"public",
"void",
"addInclude",
"(",
"PathPatternType",
"pattern",
")",
"{",
"if",
"(",
"_includeList",
"==",
"null",
")",
"_includeList",
"=",
"new",
"ArrayList",
"<",
"PathPatternType",
">",
"(",
")",
";",
"_includeList",
".",
"add",
"(",
"pattern",
")",
... | Adds an include pattern. | [
"Adds",
"an",
"include",
"pattern",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/config/types/FileSetType.java#L85-L91 |
44,324 | baratine/baratine | framework/src/main/java/com/caucho/v5/config/types/FileSetType.java | FileSetType.setUserPathPrefix | public void setUserPathPrefix(String prefix)
{
if (prefix != null && ! prefix.equals("") && ! prefix.endsWith("/"))
_userPathPrefix = prefix + "/";
else
_userPathPrefix = prefix;
} | java | public void setUserPathPrefix(String prefix)
{
if (prefix != null && ! prefix.equals("") && ! prefix.endsWith("/"))
_userPathPrefix = prefix + "/";
else
_userPathPrefix = prefix;
} | [
"public",
"void",
"setUserPathPrefix",
"(",
"String",
"prefix",
")",
"{",
"if",
"(",
"prefix",
"!=",
"null",
"&&",
"!",
"prefix",
".",
"equals",
"(",
"\"\"",
")",
"&&",
"!",
"prefix",
".",
"endsWith",
"(",
"\"/\"",
")",
")",
"_userPathPrefix",
"=",
"pr... | Sets the user-path prefix for better error reporting. | [
"Sets",
"the",
"user",
"-",
"path",
"prefix",
"for",
"better",
"error",
"reporting",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/config/types/FileSetType.java#L191-L197 |
44,325 | baratine/baratine | kraken/src/main/java/com/caucho/v5/kraken/query/BinaryHashKeyExpr.java | BinaryHashKeyExpr.getKeyExpr | @Override
public ExprKraken getKeyExpr(String name)
{
if (name.equals(_column.getColumn().name())) {
return getRight();
}
else {
return null;
}
} | java | @Override
public ExprKraken getKeyExpr(String name)
{
if (name.equals(_column.getColumn().name())) {
return getRight();
}
else {
return null;
}
} | [
"@",
"Override",
"public",
"ExprKraken",
"getKeyExpr",
"(",
"String",
"name",
")",
"{",
"if",
"(",
"name",
".",
"equals",
"(",
"_column",
".",
"getColumn",
"(",
")",
".",
"name",
"(",
")",
")",
")",
"{",
"return",
"getRight",
"(",
")",
";",
"}",
"e... | Returns the assigned key expression | [
"Returns",
"the",
"assigned",
"key",
"expression"
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kraken/query/BinaryHashKeyExpr.java#L75-L84 |
44,326 | baratine/baratine | web/src/main/java/com/caucho/v5/log/impl/EnvironmentStream.java | EnvironmentStream.write | @Override
public void write(byte []buf, int offset, int length, boolean isEnd)
throws IOException
{
OutputStream stream = getStream();
if (stream == null) {
return;
}
synchronized (stream) {
stream.write(buf, offset, length);
if (isEnd) {
stream.flush();
... | java | @Override
public void write(byte []buf, int offset, int length, boolean isEnd)
throws IOException
{
OutputStream stream = getStream();
if (stream == null) {
return;
}
synchronized (stream) {
stream.write(buf, offset, length);
if (isEnd) {
stream.flush();
... | [
"@",
"Override",
"public",
"void",
"write",
"(",
"byte",
"[",
"]",
"buf",
",",
"int",
"offset",
",",
"int",
"length",
",",
"boolean",
"isEnd",
")",
"throws",
"IOException",
"{",
"OutputStream",
"stream",
"=",
"getStream",
"(",
")",
";",
"if",
"(",
"str... | Write data to the stream. | [
"Write",
"data",
"to",
"the",
"stream",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/impl/EnvironmentStream.java#L145-L162 |
44,327 | baratine/baratine | web/src/main/java/com/caucho/v5/log/impl/EnvironmentStream.java | EnvironmentStream.flush | @Override
public void flush()
throws IOException
{
OutputStream stream = getStream();
if (stream == null) {
return;
}
synchronized (stream) {
stream.flush();
}
} | java | @Override
public void flush()
throws IOException
{
OutputStream stream = getStream();
if (stream == null) {
return;
}
synchronized (stream) {
stream.flush();
}
} | [
"@",
"Override",
"public",
"void",
"flush",
"(",
")",
"throws",
"IOException",
"{",
"OutputStream",
"stream",
"=",
"getStream",
"(",
")",
";",
"if",
"(",
"stream",
"==",
"null",
")",
"{",
"return",
";",
"}",
"synchronized",
"(",
"stream",
")",
"{",
"st... | Flush data to the stream. | [
"Flush",
"data",
"to",
"the",
"stream",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/impl/EnvironmentStream.java#L167-L180 |
44,328 | baratine/baratine | web/src/main/java/com/caucho/v5/log/impl/EnvironmentStream.java | EnvironmentStream.setStdout | public synchronized static void setStdout(OutputStream os)
{
if (_stdoutStream == null) {
initStdout();
}
if (os == _systemErr || os == _systemOut) {
return;
}
if (os instanceof WriteStream) {
WriteStream out = (WriteStream) os;
/*
if (out.getSource() == StdoutStre... | java | public synchronized static void setStdout(OutputStream os)
{
if (_stdoutStream == null) {
initStdout();
}
if (os == _systemErr || os == _systemOut) {
return;
}
if (os instanceof WriteStream) {
WriteStream out = (WriteStream) os;
/*
if (out.getSource() == StdoutStre... | [
"public",
"synchronized",
"static",
"void",
"setStdout",
"(",
"OutputStream",
"os",
")",
"{",
"if",
"(",
"_stdoutStream",
"==",
"null",
")",
"{",
"initStdout",
"(",
")",
";",
"}",
"if",
"(",
"os",
"==",
"_systemErr",
"||",
"os",
"==",
"_systemOut",
")",
... | Sets the backing stream for System.out | [
"Sets",
"the",
"backing",
"stream",
"for",
"System",
".",
"out"
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/impl/EnvironmentStream.java#L203-L225 |
44,329 | baratine/baratine | web/src/main/java/com/caucho/v5/log/impl/EnvironmentStream.java | EnvironmentStream.setStderr | public static synchronized void setStderr(OutputStream os)
{
if (_stderrStream == null) {
initStderr();
}
if (os == _systemErr || os == _systemOut) {
return;
}
if (os instanceof WriteStream) {
WriteStream out = (WriteStream) os;
/*
if (out.getSource() == StdoutStre... | java | public static synchronized void setStderr(OutputStream os)
{
if (_stderrStream == null) {
initStderr();
}
if (os == _systemErr || os == _systemOut) {
return;
}
if (os instanceof WriteStream) {
WriteStream out = (WriteStream) os;
/*
if (out.getSource() == StdoutStre... | [
"public",
"static",
"synchronized",
"void",
"setStderr",
"(",
"OutputStream",
"os",
")",
"{",
"if",
"(",
"_stderrStream",
"==",
"null",
")",
"{",
"initStderr",
"(",
")",
";",
"}",
"if",
"(",
"os",
"==",
"_systemErr",
"||",
"os",
"==",
"_systemOut",
")",
... | Sets path as the backing stream for System.err | [
"Sets",
"path",
"as",
"the",
"backing",
"stream",
"for",
"System",
".",
"err"
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/impl/EnvironmentStream.java#L254-L276 |
44,330 | baratine/baratine | web/src/main/java/com/caucho/v5/subsystem/SubSystemBase.java | SubSystemBase.preCreate | protected static <E extends SubSystemBase> SystemManager
preCreate(Class<E> serviceClass)
{
SystemManager system = SystemManager.getCurrent();
if (system == null)
throw new IllegalStateException(L.l("{0} must be created before {1}",
SystemManager.class.getSi... | java | protected static <E extends SubSystemBase> SystemManager
preCreate(Class<E> serviceClass)
{
SystemManager system = SystemManager.getCurrent();
if (system == null)
throw new IllegalStateException(L.l("{0} must be created before {1}",
SystemManager.class.getSi... | [
"protected",
"static",
"<",
"E",
"extends",
"SubSystemBase",
">",
"SystemManager",
"preCreate",
"(",
"Class",
"<",
"E",
">",
"serviceClass",
")",
"{",
"SystemManager",
"system",
"=",
"SystemManager",
".",
"getCurrent",
"(",
")",
";",
"if",
"(",
"system",
"==... | convenience method for subclass's create methods | [
"convenience",
"method",
"for",
"subclass",
"s",
"create",
"methods"
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/subsystem/SubSystemBase.java#L113-L127 |
44,331 | SeaCloudsEU/SeaCloudsPlatform | planner/aamwriter/src/main/java/eu/seaclouds/platform/planner/aamwriter/modelaam/NodeTemplate.java | NodeTemplate.addConnectionRequirement | public String addConnectionRequirement(NodeTemplate target, String type, String varName) {
Map<String, Object> requirement = new LinkedHashMap();
String requirementName = "endpoint";
Map requirementMap = new LinkedHashMap<String, Object>();
requirement.put(requirementName, ... | java | public String addConnectionRequirement(NodeTemplate target, String type, String varName) {
Map<String, Object> requirement = new LinkedHashMap();
String requirementName = "endpoint";
Map requirementMap = new LinkedHashMap<String, Object>();
requirement.put(requirementName, ... | [
"public",
"String",
"addConnectionRequirement",
"(",
"NodeTemplate",
"target",
",",
"String",
"type",
",",
"String",
"varName",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"requirement",
"=",
"new",
"LinkedHashMap",
"(",
")",
";",
"String",
"requiremen... | Add an endpoint requirement to a NodeTemplate
@return name given to the requirement | [
"Add",
"an",
"endpoint",
"requirement",
"to",
"a",
"NodeTemplate"
] | b199fe6de2c63b808cb248d3aca947d802375df8 | https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/planner/aamwriter/src/main/java/eu/seaclouds/platform/planner/aamwriter/modelaam/NodeTemplate.java#L98-L114 |
44,332 | baratine/baratine | web/src/main/java/com/caucho/v5/network/port/PollTcpManagerNio.java | PollTcpManagerNio.stop | @Override
public boolean stop()
{
if (! _lifecycle.toStopping())
return false;
log.finest(this + " stopping");
closeConnections();
destroy();
return true;
} | java | @Override
public boolean stop()
{
if (! _lifecycle.toStopping())
return false;
log.finest(this + " stopping");
closeConnections();
destroy();
return true;
} | [
"@",
"Override",
"public",
"boolean",
"stop",
"(",
")",
"{",
"if",
"(",
"!",
"_lifecycle",
".",
"toStopping",
"(",
")",
")",
"return",
"false",
";",
"log",
".",
"finest",
"(",
"this",
"+",
"\" stopping\"",
")",
";",
"closeConnections",
"(",
")",
";",
... | Closing the manager. | [
"Closing",
"the",
"manager",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/network/port/PollTcpManagerNio.java#L424-L437 |
44,333 | baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentKelp.java | SegmentKelp.writePageIndex | int writePageIndex(byte []buffer,
int head,
int type,
int pid,
int nextPid,
int entryOffset,
int entryLength)
{
int sublen = 1 + 4 * 4;
if (BLOCK_SIZE - 8 < head + sublen) {
... | java | int writePageIndex(byte []buffer,
int head,
int type,
int pid,
int nextPid,
int entryOffset,
int entryLength)
{
int sublen = 1 + 4 * 4;
if (BLOCK_SIZE - 8 < head + sublen) {
... | [
"int",
"writePageIndex",
"(",
"byte",
"[",
"]",
"buffer",
",",
"int",
"head",
",",
"int",
"type",
",",
"int",
"pid",
",",
"int",
"nextPid",
",",
"int",
"entryOffset",
",",
"int",
"entryLength",
")",
"{",
"int",
"sublen",
"=",
"1",
"+",
"4",
"*",
"4... | Writes a page index. | [
"Writes",
"a",
"page",
"index",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentKelp.java#L181-L211 |
44,334 | baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentKelp.java | SegmentKelp.readEntries | public void readEntries(TableKelp table,
InSegment reader,
SegmentEntryCallback cb)
{
TempBuffer tBuf = TempBuffer.createLarge();
byte []buffer = tBuf.buffer();
InStore sIn = reader.getStoreRead();
byte []tableKey = new byte[TableKelp.TABLE_KEY... | java | public void readEntries(TableKelp table,
InSegment reader,
SegmentEntryCallback cb)
{
TempBuffer tBuf = TempBuffer.createLarge();
byte []buffer = tBuf.buffer();
InStore sIn = reader.getStoreRead();
byte []tableKey = new byte[TableKelp.TABLE_KEY... | [
"public",
"void",
"readEntries",
"(",
"TableKelp",
"table",
",",
"InSegment",
"reader",
",",
"SegmentEntryCallback",
"cb",
")",
"{",
"TempBuffer",
"tBuf",
"=",
"TempBuffer",
".",
"createLarge",
"(",
")",
";",
"byte",
"[",
"]",
"buffer",
"=",
"tBuf",
".",
"... | Reads index entries from the segment.
The index is at the tail of the segment, written backwards in blocks.
The final block has the first entries, and the next to last has the
second set of entries. | [
"Reads",
"index",
"entries",
"from",
"the",
"segment",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentKelp.java#L235-L295 |
44,335 | baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/RowCursor.java | RowCursor.getSize | public int getSize()
{
int size = length();
if (_blobs == null) {
return size;
}
for (BlobOutputStream blob : _blobs) {
if (blob != null) {
size += blob.getSize();
}
}
return size;
} | java | public int getSize()
{
int size = length();
if (_blobs == null) {
return size;
}
for (BlobOutputStream blob : _blobs) {
if (blob != null) {
size += blob.getSize();
}
}
return size;
} | [
"public",
"int",
"getSize",
"(",
")",
"{",
"int",
"size",
"=",
"length",
"(",
")",
";",
"if",
"(",
"_blobs",
"==",
"null",
")",
"{",
"return",
"size",
";",
"}",
"for",
"(",
"BlobOutputStream",
"blob",
":",
"_blobs",
")",
"{",
"if",
"(",
"blob",
"... | The size includes the dynamic size from any blobs | [
"The",
"size",
"includes",
"the",
"dynamic",
"size",
"from",
"any",
"blobs"
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/RowCursor.java#L120-L135 |
44,336 | baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/RowCursor.java | RowCursor.openOutputStream | public final OutputStream openOutputStream(int index)
{
Column column = _row.columns()[index];
return column.openOutputStream(this);
} | java | public final OutputStream openOutputStream(int index)
{
Column column = _row.columns()[index];
return column.openOutputStream(this);
} | [
"public",
"final",
"OutputStream",
"openOutputStream",
"(",
"int",
"index",
")",
"{",
"Column",
"column",
"=",
"_row",
".",
"columns",
"(",
")",
"[",
"index",
"]",
";",
"return",
"column",
".",
"openOutputStream",
"(",
"this",
")",
";",
"}"
] | Set a blob value with an open blob stream. | [
"Set",
"a",
"blob",
"value",
"with",
"an",
"open",
"blob",
"stream",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/RowCursor.java#L326-L331 |
44,337 | baratine/baratine | web/src/main/java/com/caucho/v5/subsystem/RootDirectorySystem.java | RootDirectorySystem.currentDataDirectory | public static Path currentDataDirectory()
{
RootDirectorySystem rootService = getCurrent();
if (rootService == null)
throw new IllegalStateException(L.l("{0} must be active for getCurrentDataDirectory().",
RootDirectorySystem.class.getSimpleName()));
... | java | public static Path currentDataDirectory()
{
RootDirectorySystem rootService = getCurrent();
if (rootService == null)
throw new IllegalStateException(L.l("{0} must be active for getCurrentDataDirectory().",
RootDirectorySystem.class.getSimpleName()));
... | [
"public",
"static",
"Path",
"currentDataDirectory",
"(",
")",
"{",
"RootDirectorySystem",
"rootService",
"=",
"getCurrent",
"(",
")",
";",
"if",
"(",
"rootService",
"==",
"null",
")",
"throw",
"new",
"IllegalStateException",
"(",
"L",
".",
"l",
"(",
"\"{0} mus... | Returns the data directory for current active directory service. | [
"Returns",
"the",
"data",
"directory",
"for",
"current",
"active",
"directory",
"service",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/subsystem/RootDirectorySystem.java#L118-L127 |
44,338 | baratine/baratine | kraken/src/main/java/com/caucho/v5/db/journal/JournalStore.java | JournalStore.create | public static JournalStore create(Path path, boolean isMmap)
throws IOException
{
// RampManager rampManager = Ramp.newManager();
long segmentSize = 4 * 1024 * 1024;
JournalStore.Builder builder = JournalStore.Builder.create(path);
builder.segmentSize(segmentSize);
// builder.ra... | java | public static JournalStore create(Path path, boolean isMmap)
throws IOException
{
// RampManager rampManager = Ramp.newManager();
long segmentSize = 4 * 1024 * 1024;
JournalStore.Builder builder = JournalStore.Builder.create(path);
builder.segmentSize(segmentSize);
// builder.ra... | [
"public",
"static",
"JournalStore",
"create",
"(",
"Path",
"path",
",",
"boolean",
"isMmap",
")",
"throws",
"IOException",
"{",
"// RampManager rampManager = Ramp.newManager();",
"long",
"segmentSize",
"=",
"4",
"*",
"1024",
"*",
"1024",
";",
"JournalStore",
".",
... | Creates an independent store. | [
"Creates",
"an",
"independent",
"store",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/db/journal/JournalStore.java#L153-L169 |
44,339 | baratine/baratine | framework/src/main/java/com/caucho/v5/vfs/Jar.java | Jar.clearJarCache | public static void clearJarCache()
{
LruCache<PathImpl,Jar> jarCache = _jarCache;
if (jarCache == null)
return;
ArrayList<Jar> jars = new ArrayList<Jar>();
synchronized (jarCache) {
Iterator<Jar> iter = jarCache.values();
while (iter.hasNext())
jars.add(iter... | java | public static void clearJarCache()
{
LruCache<PathImpl,Jar> jarCache = _jarCache;
if (jarCache == null)
return;
ArrayList<Jar> jars = new ArrayList<Jar>();
synchronized (jarCache) {
Iterator<Jar> iter = jarCache.values();
while (iter.hasNext())
jars.add(iter... | [
"public",
"static",
"void",
"clearJarCache",
"(",
")",
"{",
"LruCache",
"<",
"PathImpl",
",",
"Jar",
">",
"jarCache",
"=",
"_jarCache",
";",
"if",
"(",
"jarCache",
"==",
"null",
")",
"return",
";",
"ArrayList",
"<",
"Jar",
">",
"jars",
"=",
"new",
"Arr... | Clears all the cached files in the jar. Needed to avoid some
windows NT issues. | [
"Clears",
"all",
"the",
"cached",
"files",
"in",
"the",
"jar",
".",
"Needed",
"to",
"avoid",
"some",
"windows",
"NT",
"issues",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/Jar.java#L519-L541 |
44,340 | baratine/baratine | web/src/main/java/com/caucho/v5/network/ssl/SSLFactoryJsse.java | SSLFactoryJsse.keyStoreFile | private Path keyStoreFile()
{
String fileName = _config.get(_prefix + ".ssl.key-store");
if (fileName == null) {
return null;
}
return Vfs.path(fileName);
} | java | private Path keyStoreFile()
{
String fileName = _config.get(_prefix + ".ssl.key-store");
if (fileName == null) {
return null;
}
return Vfs.path(fileName);
} | [
"private",
"Path",
"keyStoreFile",
"(",
")",
"{",
"String",
"fileName",
"=",
"_config",
".",
"get",
"(",
"_prefix",
"+",
"\".ssl.key-store\"",
")",
";",
"if",
"(",
"fileName",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"Vfs",
".",
"p... | Returns the certificate file. | [
"Returns",
"the",
"certificate",
"file",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/network/ssl/SSLFactoryJsse.java#L134-L143 |
44,341 | baratine/baratine | web/src/main/java/com/caucho/v5/network/ssl/SSLFactoryJsse.java | SSLFactoryJsse.keyStorePassword | private String keyStorePassword()
{
String password = _config.get(_prefix + ".ssl.key-store-password");
if (password != null) {
return password;
}
else {
return _config.get(_prefix + ".ssl.password");
}
} | java | private String keyStorePassword()
{
String password = _config.get(_prefix + ".ssl.key-store-password");
if (password != null) {
return password;
}
else {
return _config.get(_prefix + ".ssl.password");
}
} | [
"private",
"String",
"keyStorePassword",
"(",
")",
"{",
"String",
"password",
"=",
"_config",
".",
"get",
"(",
"_prefix",
"+",
"\".ssl.key-store-password\"",
")",
";",
"if",
"(",
"password",
"!=",
"null",
")",
"{",
"return",
"password",
";",
"}",
"else",
"... | Returns the key-store password | [
"Returns",
"the",
"key",
"-",
"store",
"password"
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/network/ssl/SSLFactoryJsse.java#L156-L166 |
44,342 | baratine/baratine | web/src/main/java/com/caucho/v5/network/ssl/SSLFactoryJsse.java | SSLFactoryJsse.createFactory | private SSLSocketFactory createFactory()
throws Exception
{
SSLSocketFactory ssFactory = null;
String host = "localhost";
int port = 8086;
if (_keyStore == null) {
return createAnonymousFactory(null, port);
}
SSLContext sslContext = SSLContext.getInstance(_sslContext);... | java | private SSLSocketFactory createFactory()
throws Exception
{
SSLSocketFactory ssFactory = null;
String host = "localhost";
int port = 8086;
if (_keyStore == null) {
return createAnonymousFactory(null, port);
}
SSLContext sslContext = SSLContext.getInstance(_sslContext);... | [
"private",
"SSLSocketFactory",
"createFactory",
"(",
")",
"throws",
"Exception",
"{",
"SSLSocketFactory",
"ssFactory",
"=",
"null",
";",
"String",
"host",
"=",
"\"localhost\"",
";",
"int",
"port",
"=",
"8086",
";",
"if",
"(",
"_keyStore",
"==",
"null",
")",
... | Creates the SSLSocketFactory | [
"Creates",
"the",
"SSLSocketFactory"
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/network/ssl/SSLFactoryJsse.java#L373-L408 |
44,343 | baratine/baratine | core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java | InjectorImpl.current | public static InjectorImpl current(ClassLoader loader)
{
if (loader instanceof DynamicClassLoader) {
return _localManager.getLevel(loader);
}
else {
SoftReference<InjectorImpl> injectRef = _loaderManagerMap.get(loader);
if (injectRef != null) {
return injectRef.get();
}
... | java | public static InjectorImpl current(ClassLoader loader)
{
if (loader instanceof DynamicClassLoader) {
return _localManager.getLevel(loader);
}
else {
SoftReference<InjectorImpl> injectRef = _loaderManagerMap.get(loader);
if (injectRef != null) {
return injectRef.get();
}
... | [
"public",
"static",
"InjectorImpl",
"current",
"(",
"ClassLoader",
"loader",
")",
"{",
"if",
"(",
"loader",
"instanceof",
"DynamicClassLoader",
")",
"{",
"return",
"_localManager",
".",
"getLevel",
"(",
"loader",
")",
";",
"}",
"else",
"{",
"SoftReference",
"<... | Returns the current inject manager. | [
"Returns",
"the",
"current",
"inject",
"manager",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L167-L182 |
44,344 | baratine/baratine | core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java | InjectorImpl.instance | @Override
public <T> T instance(Class<T> type)
{
Key<T> key = Key.of(type);
return instance(key);
} | java | @Override
public <T> T instance(Class<T> type)
{
Key<T> key = Key.of(type);
return instance(key);
} | [
"@",
"Override",
"public",
"<",
"T",
">",
"T",
"instance",
"(",
"Class",
"<",
"T",
">",
"type",
")",
"{",
"Key",
"<",
"T",
">",
"key",
"=",
"Key",
".",
"of",
"(",
"type",
")",
";",
"return",
"instance",
"(",
"key",
")",
";",
"}"
] | Creates a new instance for a given type. | [
"Creates",
"a",
"new",
"instance",
"for",
"a",
"given",
"type",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L277-L283 |
44,345 | baratine/baratine | core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java | InjectorImpl.instance | @Override
public <T> T instance(Key<T> key)
{
Objects.requireNonNull(key);
Class<T> type = (Class) key.rawClass();
if (type.equals(Provider.class)) {
TypeRef typeRef = TypeRef.of(key.type());
TypeRef param = typeRef.param(0);
return (T) provider(Key.of(param.type()));
}
Pro... | java | @Override
public <T> T instance(Key<T> key)
{
Objects.requireNonNull(key);
Class<T> type = (Class) key.rawClass();
if (type.equals(Provider.class)) {
TypeRef typeRef = TypeRef.of(key.type());
TypeRef param = typeRef.param(0);
return (T) provider(Key.of(param.type()));
}
Pro... | [
"@",
"Override",
"public",
"<",
"T",
">",
"T",
"instance",
"(",
"Key",
"<",
"T",
">",
"key",
")",
"{",
"Objects",
".",
"requireNonNull",
"(",
"key",
")",
";",
"Class",
"<",
"T",
">",
"type",
"=",
"(",
"Class",
")",
"key",
".",
"rawClass",
"(",
... | Creates a new instance for a given key. | [
"Creates",
"a",
"new",
"instance",
"for",
"a",
"given",
"key",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L288-L310 |
44,346 | baratine/baratine | core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java | InjectorImpl.instance | @Override
public <T> T instance(InjectionPoint<T> ip)
{
Objects.requireNonNull(ip);
Provider<T> provider = provider(ip);
if (provider != null) {
return provider.get();
}
else {
return null;
}
} | java | @Override
public <T> T instance(InjectionPoint<T> ip)
{
Objects.requireNonNull(ip);
Provider<T> provider = provider(ip);
if (provider != null) {
return provider.get();
}
else {
return null;
}
} | [
"@",
"Override",
"public",
"<",
"T",
">",
"T",
"instance",
"(",
"InjectionPoint",
"<",
"T",
">",
"ip",
")",
"{",
"Objects",
".",
"requireNonNull",
"(",
"ip",
")",
";",
"Provider",
"<",
"T",
">",
"provider",
"=",
"provider",
"(",
"ip",
")",
";",
"if... | Creates a new bean instance for a given InjectionPoint, such as a
method or field. | [
"Creates",
"a",
"new",
"bean",
"instance",
"for",
"a",
"given",
"InjectionPoint",
"such",
"as",
"a",
"method",
"or",
"field",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L316-L329 |
44,347 | baratine/baratine | core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java | InjectorImpl.provider | @Override
public <T> Provider<T> provider(InjectionPoint<T> ip)
{
Objects.requireNonNull(ip);
Provider<T> provider = lookupProvider(ip);
if (provider != null) {
return provider;
}
provider = autoProvider(ip);
if (provider != null) {
return provider;
}
return new Prov... | java | @Override
public <T> Provider<T> provider(InjectionPoint<T> ip)
{
Objects.requireNonNull(ip);
Provider<T> provider = lookupProvider(ip);
if (provider != null) {
return provider;
}
provider = autoProvider(ip);
if (provider != null) {
return provider;
}
return new Prov... | [
"@",
"Override",
"public",
"<",
"T",
">",
"Provider",
"<",
"T",
">",
"provider",
"(",
"InjectionPoint",
"<",
"T",
">",
"ip",
")",
"{",
"Objects",
".",
"requireNonNull",
"(",
"ip",
")",
";",
"Provider",
"<",
"T",
">",
"provider",
"=",
"lookupProvider",
... | Creates an instance provider for a given InjectionPoint, such as a
method or field. | [
"Creates",
"an",
"instance",
"provider",
"for",
"a",
"given",
"InjectionPoint",
"such",
"as",
"a",
"method",
"or",
"field",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L336-L354 |
44,348 | baratine/baratine | core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java | InjectorImpl.provider | @Override
public <T> Provider<T> provider(Key<T> key)
{
Objects.requireNonNull(key);
Provider<T> provider = (Provider) _providerMap.get(key);
if (provider == null) {
provider = lookupProvider(key);
if (provider == null) {
provider = autoProvider(key);
}
_providerMap.p... | java | @Override
public <T> Provider<T> provider(Key<T> key)
{
Objects.requireNonNull(key);
Provider<T> provider = (Provider) _providerMap.get(key);
if (provider == null) {
provider = lookupProvider(key);
if (provider == null) {
provider = autoProvider(key);
}
_providerMap.p... | [
"@",
"Override",
"public",
"<",
"T",
">",
"Provider",
"<",
"T",
">",
"provider",
"(",
"Key",
"<",
"T",
">",
"key",
")",
"{",
"Objects",
".",
"requireNonNull",
"(",
"key",
")",
";",
"Provider",
"<",
"T",
">",
"provider",
"=",
"(",
"Provider",
")",
... | Returns a bean instance provider for a key. | [
"Returns",
"a",
"bean",
"instance",
"provider",
"for",
"a",
"key",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L359-L379 |
44,349 | baratine/baratine | core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java | InjectorImpl.lookupProvider | private <T> Provider<T> lookupProvider(Key<T> key)
{
BindingInject<T> bean = findBean(key);
if (bean != null) {
return bean.provider();
}
BindingAmp<T> binding = findBinding(key);
if (binding != null) {
return binding.provider();
}
binding = findObjectBinding(key);
if ... | java | private <T> Provider<T> lookupProvider(Key<T> key)
{
BindingInject<T> bean = findBean(key);
if (bean != null) {
return bean.provider();
}
BindingAmp<T> binding = findBinding(key);
if (binding != null) {
return binding.provider();
}
binding = findObjectBinding(key);
if ... | [
"private",
"<",
"T",
">",
"Provider",
"<",
"T",
">",
"lookupProvider",
"(",
"Key",
"<",
"T",
">",
"key",
")",
"{",
"BindingInject",
"<",
"T",
">",
"bean",
"=",
"findBean",
"(",
"key",
")",
";",
"if",
"(",
"bean",
"!=",
"null",
")",
"{",
"return",... | Search for a matching provider for a key. | [
"Search",
"for",
"a",
"matching",
"provider",
"for",
"a",
"key",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L384-L406 |
44,350 | baratine/baratine | core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java | InjectorImpl.lookupProvider | private <T> Provider<T> lookupProvider(InjectionPoint<T> ip)
{
Key<T> key = ip.key();
BindingInject<T> bean = findBean(key);
if (bean != null) {
return bean.provider(ip);
}
BindingAmp<T> provider = findBinding(key);
if (provider != null) {
return provider.provider(ip);
}
... | java | private <T> Provider<T> lookupProvider(InjectionPoint<T> ip)
{
Key<T> key = ip.key();
BindingInject<T> bean = findBean(key);
if (bean != null) {
return bean.provider(ip);
}
BindingAmp<T> provider = findBinding(key);
if (provider != null) {
return provider.provider(ip);
}
... | [
"private",
"<",
"T",
">",
"Provider",
"<",
"T",
">",
"lookupProvider",
"(",
"InjectionPoint",
"<",
"T",
">",
"ip",
")",
"{",
"Key",
"<",
"T",
">",
"key",
"=",
"ip",
".",
"key",
"(",
")",
";",
"BindingInject",
"<",
"T",
">",
"bean",
"=",
"findBean... | Create a provider for an injection point. | [
"Create",
"a",
"provider",
"for",
"an",
"injection",
"point",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L411-L435 |
44,351 | baratine/baratine | core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java | InjectorImpl.findScope | private <T> InjectScope<T> findScope(AnnotatedElement annElement)
{
for (Annotation ann : annElement.getAnnotations()) {
Class<? extends Annotation> annType = ann.annotationType();
if (annType.isAnnotationPresent(Scope.class)) {
Supplier<InjectScope<T>> scopeGen = (Supplier) _scopeMap.get(ann... | java | private <T> InjectScope<T> findScope(AnnotatedElement annElement)
{
for (Annotation ann : annElement.getAnnotations()) {
Class<? extends Annotation> annType = ann.annotationType();
if (annType.isAnnotationPresent(Scope.class)) {
Supplier<InjectScope<T>> scopeGen = (Supplier) _scopeMap.get(ann... | [
"private",
"<",
"T",
">",
"InjectScope",
"<",
"T",
">",
"findScope",
"(",
"AnnotatedElement",
"annElement",
")",
"{",
"for",
"(",
"Annotation",
"ann",
":",
"annElement",
".",
"getAnnotations",
"(",
")",
")",
"{",
"Class",
"<",
"?",
"extends",
"Annotation",... | Finds the scope for a bean producing declaration, either a method or
a type. | [
"Finds",
"the",
"scope",
"for",
"a",
"bean",
"producing",
"declaration",
"either",
"a",
"method",
"or",
"a",
"type",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L528-L546 |
44,352 | baratine/baratine | core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java | InjectorImpl.bindings | @Override
public <T> Iterable<Binding<T>> bindings(Class<T> type)
{
BindingSet<T> set = (BindingSet) _bindingSetMap.get(type);
if (set != null) {
return (Iterable) set;
}
else {
return Collections.EMPTY_LIST;
}
} | java | @Override
public <T> Iterable<Binding<T>> bindings(Class<T> type)
{
BindingSet<T> set = (BindingSet) _bindingSetMap.get(type);
if (set != null) {
return (Iterable) set;
}
else {
return Collections.EMPTY_LIST;
}
} | [
"@",
"Override",
"public",
"<",
"T",
">",
"Iterable",
"<",
"Binding",
"<",
"T",
">",
">",
"bindings",
"(",
"Class",
"<",
"T",
">",
"type",
")",
"{",
"BindingSet",
"<",
"T",
">",
"set",
"=",
"(",
"BindingSet",
")",
"_bindingSetMap",
".",
"get",
"(",... | Returns all bindings matching a type. | [
"Returns",
"all",
"bindings",
"matching",
"a",
"type",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L551-L562 |
44,353 | baratine/baratine | core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java | InjectorImpl.bindings | @Override
public <T> List<Binding<T>> bindings(Key<T> key)
{
BindingSet<T> set = (BindingSet) _bindingSetMap.get(key.rawClass());
if (set != null) {
return set.bindings(key);
}
else {
return Collections.EMPTY_LIST;
}
} | java | @Override
public <T> List<Binding<T>> bindings(Key<T> key)
{
BindingSet<T> set = (BindingSet) _bindingSetMap.get(key.rawClass());
if (set != null) {
return set.bindings(key);
}
else {
return Collections.EMPTY_LIST;
}
} | [
"@",
"Override",
"public",
"<",
"T",
">",
"List",
"<",
"Binding",
"<",
"T",
">",
">",
"bindings",
"(",
"Key",
"<",
"T",
">",
"key",
")",
"{",
"BindingSet",
"<",
"T",
">",
"set",
"=",
"(",
"BindingSet",
")",
"_bindingSetMap",
".",
"get",
"(",
"key... | Returns all bindings matching a key. | [
"Returns",
"all",
"bindings",
"matching",
"a",
"key",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L567-L578 |
44,354 | baratine/baratine | core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java | InjectorImpl.scope | <T> InjectScope<T> scope(Class<? extends Annotation> scopeType)
{
Supplier<InjectScope<T>> scopeGen = (Supplier) _scopeMap.get(scopeType);
if (scopeGen == null) {
throw error("{0} is an unknown scope",
scopeType.getSimpleName());
}
return scopeGen.get();
} | java | <T> InjectScope<T> scope(Class<? extends Annotation> scopeType)
{
Supplier<InjectScope<T>> scopeGen = (Supplier) _scopeMap.get(scopeType);
if (scopeGen == null) {
throw error("{0} is an unknown scope",
scopeType.getSimpleName());
}
return scopeGen.get();
} | [
"<",
"T",
">",
"InjectScope",
"<",
"T",
">",
"scope",
"(",
"Class",
"<",
"?",
"extends",
"Annotation",
">",
"scopeType",
")",
"{",
"Supplier",
"<",
"InjectScope",
"<",
"T",
">>",
"scopeGen",
"=",
"(",
"Supplier",
")",
"_scopeMap",
".",
"get",
"(",
"s... | Returns the scope given a scope annotation. | [
"Returns",
"the",
"scope",
"given",
"a",
"scope",
"annotation",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L583-L593 |
44,355 | baratine/baratine | core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java | InjectorImpl.injector | @Override
public <T> Consumer<T> injector(Class<T> type)
{
ArrayList<InjectProgram> injectList = new ArrayList<>();
introspectInject(injectList, type);
introspectInit(injectList, type);
return new InjectProgramImpl<T>(injectList);
} | java | @Override
public <T> Consumer<T> injector(Class<T> type)
{
ArrayList<InjectProgram> injectList = new ArrayList<>();
introspectInject(injectList, type);
introspectInit(injectList, type);
return new InjectProgramImpl<T>(injectList);
} | [
"@",
"Override",
"public",
"<",
"T",
">",
"Consumer",
"<",
"T",
">",
"injector",
"(",
"Class",
"<",
"T",
">",
"type",
")",
"{",
"ArrayList",
"<",
"InjectProgram",
">",
"injectList",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"introspectInject",
"(",... | Create an injector for a bean type. The consumer will inject the
bean's fields. | [
"Create",
"an",
"injector",
"for",
"a",
"bean",
"type",
".",
"The",
"consumer",
"will",
"inject",
"the",
"bean",
"s",
"fields",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L599-L609 |
44,356 | baratine/baratine | core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java | InjectorImpl.program | @Override
public Provider<?> []program(Parameter []params)
{
Provider<?> []program = new Provider<?>[params.length];
for (int i = 0; i < program.length; i++) {
//Key<?> key = Key.of(params[i]);
program[i] = provider(InjectionPoint.of(params[i]));
}
return program;
} | java | @Override
public Provider<?> []program(Parameter []params)
{
Provider<?> []program = new Provider<?>[params.length];
for (int i = 0; i < program.length; i++) {
//Key<?> key = Key.of(params[i]);
program[i] = provider(InjectionPoint.of(params[i]));
}
return program;
} | [
"@",
"Override",
"public",
"Provider",
"<",
"?",
">",
"[",
"]",
"program",
"(",
"Parameter",
"[",
"]",
"params",
")",
"{",
"Provider",
"<",
"?",
">",
"[",
"]",
"program",
"=",
"new",
"Provider",
"<",
"?",
">",
"[",
"params",
".",
"length",
"]",
"... | Create a program for method arguments. | [
"Create",
"a",
"program",
"for",
"method",
"arguments",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L614-L626 |
44,357 | baratine/baratine | core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java | InjectorImpl.findBean | private <T> BindingInject<T> findBean(Key<T> key)
{
for (InjectProvider provider : _providerList) {
BindingInject<T> bean = (BindingInject) provider.lookup(key.rawClass());
if (bean != null) {
return bean;
}
}
return null;
} | java | private <T> BindingInject<T> findBean(Key<T> key)
{
for (InjectProvider provider : _providerList) {
BindingInject<T> bean = (BindingInject) provider.lookup(key.rawClass());
if (bean != null) {
return bean;
}
}
return null;
} | [
"private",
"<",
"T",
">",
"BindingInject",
"<",
"T",
">",
"findBean",
"(",
"Key",
"<",
"T",
">",
"key",
")",
"{",
"for",
"(",
"InjectProvider",
"provider",
":",
"_providerList",
")",
"{",
"BindingInject",
"<",
"T",
">",
"bean",
"=",
"(",
"BindingInject... | Find a binding by the key. | [
"Find",
"a",
"binding",
"by",
"the",
"key",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L631-L642 |
44,358 | baratine/baratine | core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java | InjectorImpl.findObjectBinding | private <T> BindingAmp<T> findObjectBinding(Key<T> key)
{
Objects.requireNonNull(key);
if (key.qualifiers().length != 1) {
throw new IllegalArgumentException();
}
return (BindingAmp) findBinding(Key.of(Object.class,
key.qualifiers()[0]));
} | java | private <T> BindingAmp<T> findObjectBinding(Key<T> key)
{
Objects.requireNonNull(key);
if (key.qualifiers().length != 1) {
throw new IllegalArgumentException();
}
return (BindingAmp) findBinding(Key.of(Object.class,
key.qualifiers()[0]));
} | [
"private",
"<",
"T",
">",
"BindingAmp",
"<",
"T",
">",
"findObjectBinding",
"(",
"Key",
"<",
"T",
">",
"key",
")",
"{",
"Objects",
".",
"requireNonNull",
"(",
"key",
")",
";",
"if",
"(",
"key",
".",
"qualifiers",
"(",
")",
".",
"length",
"!=",
"1",... | Returns an object producer. | [
"Returns",
"an",
"object",
"producer",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L771-L781 |
44,359 | baratine/baratine | core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java | InjectorImpl.findBinding | private <T> BindingAmp<T> findBinding(Key<T> key)
{
BindingSet<T> set = (BindingSet) _bindingSetMap.get(key.rawClass());
if (set != null) {
BindingAmp<T> binding = set.find(key);
if (binding != null) {
return binding;
}
}
return null;
} | java | private <T> BindingAmp<T> findBinding(Key<T> key)
{
BindingSet<T> set = (BindingSet) _bindingSetMap.get(key.rawClass());
if (set != null) {
BindingAmp<T> binding = set.find(key);
if (binding != null) {
return binding;
}
}
return null;
} | [
"private",
"<",
"T",
">",
"BindingAmp",
"<",
"T",
">",
"findBinding",
"(",
"Key",
"<",
"T",
">",
"key",
")",
"{",
"BindingSet",
"<",
"T",
">",
"set",
"=",
"(",
"BindingSet",
")",
"_bindingSetMap",
".",
"get",
"(",
"key",
".",
"rawClass",
"(",
")",
... | Finds a producer for the given target type. | [
"Finds",
"a",
"producer",
"for",
"the",
"given",
"target",
"type",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L786-L799 |
44,360 | baratine/baratine | core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java | Lifecycle.setLevel | public void setLevel(Level level)
{
_level = level;
if (level.intValue() < _lowLevel.intValue())
_lowLevel = level;
} | java | public void setLevel(Level level)
{
_level = level;
if (level.intValue() < _lowLevel.intValue())
_lowLevel = level;
} | [
"public",
"void",
"setLevel",
"(",
"Level",
"level",
")",
"{",
"_level",
"=",
"level",
";",
"if",
"(",
"level",
".",
"intValue",
"(",
")",
"<",
"_lowLevel",
".",
"intValue",
"(",
")",
")",
"_lowLevel",
"=",
"level",
";",
"}"
] | Sets the lifecycle logging level. | [
"Sets",
"the",
"lifecycle",
"logging",
"level",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java#L133-L139 |
44,361 | baratine/baratine | core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java | Lifecycle.waitForActive | public boolean waitForActive(long timeout)
{
LifecycleState state = getState();
if (state.isActive()) {
return true;
}
else if (state.isAfterActive()) {
return false;
}
// server/1d2j
long waitEnd = CurrentTime.getCurrentTimeActual() + timeout;
synchronized (this) {
... | java | public boolean waitForActive(long timeout)
{
LifecycleState state = getState();
if (state.isActive()) {
return true;
}
else if (state.isAfterActive()) {
return false;
}
// server/1d2j
long waitEnd = CurrentTime.getCurrentTimeActual() + timeout;
synchronized (this) {
... | [
"public",
"boolean",
"waitForActive",
"(",
"long",
"timeout",
")",
"{",
"LifecycleState",
"state",
"=",
"getState",
"(",
")",
";",
"if",
"(",
"state",
".",
"isActive",
"(",
")",
")",
"{",
"return",
"true",
";",
"}",
"else",
"if",
"(",
"state",
".",
"... | Wait for a period of time until the service starts. | [
"Wait",
"for",
"a",
"period",
"of",
"time",
"until",
"the",
"service",
"starts",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java#L315-L351 |
44,362 | baratine/baratine | core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java | Lifecycle.toPostInit | public boolean toPostInit()
{
synchronized (this) {
if (_state == STOPPED) {
_state = INIT;
_lastChangeTime = CurrentTime.currentTime();
notifyListeners(STOPPED, INIT);
return true;
}
else {
return _state.isInit();
}
}
} | java | public boolean toPostInit()
{
synchronized (this) {
if (_state == STOPPED) {
_state = INIT;
_lastChangeTime = CurrentTime.currentTime();
notifyListeners(STOPPED, INIT);
return true;
}
else {
return _state.isInit();
}
}
} | [
"public",
"boolean",
"toPostInit",
"(",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"_state",
"==",
"STOPPED",
")",
"{",
"_state",
"=",
"INIT",
";",
"_lastChangeTime",
"=",
"CurrentTime",
".",
"currentTime",
"(",
")",
";",
"notifyListeners"... | Changes to the init from the stopped state.
@return true if the transition is allowed | [
"Changes",
"to",
"the",
"init",
"from",
"the",
"stopped",
"state",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java#L463-L479 |
44,363 | baratine/baratine | core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java | Lifecycle.toStarting | public boolean toStarting()
{
LifecycleState state;
synchronized (this) {
state = _state;
if (state.isAfterStarting() && ! state.isStopped()) {
return false;
}
_state = STARTING;
_lastChangeTime = CurrentTime.currentTime();
if (_log != null && _log.is... | java | public boolean toStarting()
{
LifecycleState state;
synchronized (this) {
state = _state;
if (state.isAfterStarting() && ! state.isStopped()) {
return false;
}
_state = STARTING;
_lastChangeTime = CurrentTime.currentTime();
if (_log != null && _log.is... | [
"public",
"boolean",
"toStarting",
"(",
")",
"{",
"LifecycleState",
"state",
";",
"synchronized",
"(",
"this",
")",
"{",
"state",
"=",
"_state",
";",
"if",
"(",
"state",
".",
"isAfterStarting",
"(",
")",
"&&",
"!",
"state",
".",
"isStopped",
"(",
")",
... | Changes to the starting state.
@return true if the transition is allowed | [
"Changes",
"to",
"the",
"starting",
"state",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java#L486-L509 |
44,364 | baratine/baratine | core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java | Lifecycle.toActive | public boolean toActive()
{
LifecycleState state;
synchronized (this) {
state = _state;
if (state.isAfterActive() && ! state.isStopped()) {
return false;
}
_state = ACTIVE;
_lastChangeTime = CurrentTime.currentTime();
}
if (_log != null && _log.isLo... | java | public boolean toActive()
{
LifecycleState state;
synchronized (this) {
state = _state;
if (state.isAfterActive() && ! state.isStopped()) {
return false;
}
_state = ACTIVE;
_lastChangeTime = CurrentTime.currentTime();
}
if (_log != null && _log.isLo... | [
"public",
"boolean",
"toActive",
"(",
")",
"{",
"LifecycleState",
"state",
";",
"synchronized",
"(",
"this",
")",
"{",
"state",
"=",
"_state",
";",
"if",
"(",
"state",
".",
"isAfterActive",
"(",
")",
"&&",
"!",
"state",
".",
"isStopped",
"(",
")",
")",... | Changes to the active state.
@return true if the transition is allowed | [
"Changes",
"to",
"the",
"active",
"state",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java#L516-L538 |
44,365 | baratine/baratine | core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java | Lifecycle.toFail | public boolean toFail()
{
LifecycleState state;
synchronized (this) {
state = _state;
if (state.isAfterDestroying()) {
return false;
}
_state = FAILED;
_lastChangeTime = CurrentTime.currentTime();
}
if (_log != null && _log.isLoggable(_level))
... | java | public boolean toFail()
{
LifecycleState state;
synchronized (this) {
state = _state;
if (state.isAfterDestroying()) {
return false;
}
_state = FAILED;
_lastChangeTime = CurrentTime.currentTime();
}
if (_log != null && _log.isLoggable(_level))
... | [
"public",
"boolean",
"toFail",
"(",
")",
"{",
"LifecycleState",
"state",
";",
"synchronized",
"(",
"this",
")",
"{",
"state",
"=",
"_state",
";",
"if",
"(",
"state",
".",
"isAfterDestroying",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"_state",
"... | Changes to the failed state.
@return true if the transition is allowed | [
"Changes",
"to",
"the",
"failed",
"state",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java#L562-L586 |
44,366 | baratine/baratine | core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java | Lifecycle.toStopping | public boolean toStopping()
{
LifecycleState state;
synchronized (this) {
state = _state;
if (state.isAfterStopping() || state.isStarting()) {
return false;
}
_state = STOPPING;
_lastChangeTime = CurrentTime.currentTime();
}
if (_log != null &... | java | public boolean toStopping()
{
LifecycleState state;
synchronized (this) {
state = _state;
if (state.isAfterStopping() || state.isStarting()) {
return false;
}
_state = STOPPING;
_lastChangeTime = CurrentTime.currentTime();
}
if (_log != null &... | [
"public",
"boolean",
"toStopping",
"(",
")",
"{",
"LifecycleState",
"state",
";",
"synchronized",
"(",
"this",
")",
"{",
"state",
"=",
"_state",
";",
"if",
"(",
"state",
".",
"isAfterStopping",
"(",
")",
"||",
"state",
".",
"isStarting",
"(",
")",
")",
... | Changes to the stopping state.
@return true if the transition is allowed | [
"Changes",
"to",
"the",
"stopping",
"state",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java#L593-L616 |
44,367 | baratine/baratine | core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java | Lifecycle.addListener | public void addListener(LifecycleListener listener)
{
synchronized (this) {
if (isDestroyed()) {
IllegalStateException e = new IllegalStateException("attempted to add listener to a destroyed lifecyle " + this);
if (_log != null)
_log.log(Level.WARNING, e.toString(), e);
el... | java | public void addListener(LifecycleListener listener)
{
synchronized (this) {
if (isDestroyed()) {
IllegalStateException e = new IllegalStateException("attempted to add listener to a destroyed lifecyle " + this);
if (_log != null)
_log.log(Level.WARNING, e.toString(), e);
el... | [
"public",
"void",
"addListener",
"(",
"LifecycleListener",
"listener",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"isDestroyed",
"(",
")",
")",
"{",
"IllegalStateException",
"e",
"=",
"new",
"IllegalStateException",
"(",
"\"attempted to add listen... | Adds a listener to detect lifecycle changes. | [
"Adds",
"a",
"listener",
"to",
"detect",
"lifecycle",
"changes",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java#L720-L748 |
44,368 | optimaize/anythingworks | common/src/main/java/com/optimaize/anythingworks/common/rest/JacksonJsonMarshaller.java | JacksonJsonMarshaller.serialize | @Override
public String serialize(Object obj) throws JsonMarshallingException {
try {
return serializeChecked(obj);
} catch (Exception e) {
throw new JsonMarshallingException(e);
}
} | java | @Override
public String serialize(Object obj) throws JsonMarshallingException {
try {
return serializeChecked(obj);
} catch (Exception e) {
throw new JsonMarshallingException(e);
}
} | [
"@",
"Override",
"public",
"String",
"serialize",
"(",
"Object",
"obj",
")",
"throws",
"JsonMarshallingException",
"{",
"try",
"{",
"return",
"serializeChecked",
"(",
"obj",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"throw",
"new",
"JsonMarsha... | Serialize the given Java object into JSON string. | [
"Serialize",
"the",
"given",
"Java",
"object",
"into",
"JSON",
"string",
"."
] | 23e5f1c63cd56d935afaac4ad033c7996b32a1f2 | https://github.com/optimaize/anythingworks/blob/23e5f1c63cd56d935afaac4ad033c7996b32a1f2/common/src/main/java/com/optimaize/anythingworks/common/rest/JacksonJsonMarshaller.java#L29-L36 |
44,369 | baratine/baratine | core/src/main/java/com/caucho/v5/amp/thread/ThreadPool.java | ThreadPool.setExecutorTaskMax | public void setExecutorTaskMax(int max)
{
if (getThreadMax() < max)
throw new ConfigException(L.l("<thread-executor-max> ({0}) must be less than <thread-max> ({1})",
max, getThreadMax()));
if (max == 0)
throw new ConfigException(L.l("<thread-executor-max> must ... | java | public void setExecutorTaskMax(int max)
{
if (getThreadMax() < max)
throw new ConfigException(L.l("<thread-executor-max> ({0}) must be less than <thread-max> ({1})",
max, getThreadMax()));
if (max == 0)
throw new ConfigException(L.l("<thread-executor-max> must ... | [
"public",
"void",
"setExecutorTaskMax",
"(",
"int",
"max",
")",
"{",
"if",
"(",
"getThreadMax",
"(",
")",
"<",
"max",
")",
"throw",
"new",
"ConfigException",
"(",
"L",
".",
"l",
"(",
"\"<thread-executor-max> ({0}) must be less than <thread-max> ({1})\"",
",",
"max... | Sets the maximum number of executor threads. | [
"Sets",
"the",
"maximum",
"number",
"of",
"executor",
"threads",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/amp/thread/ThreadPool.java#L132-L142 |
44,370 | baratine/baratine | core/src/main/java/com/caucho/v5/amp/thread/ThreadPool.java | ThreadPool.scheduleExecutorTask | public boolean scheduleExecutorTask(Runnable task)
{
ClassLoader loader = Thread.currentThread().getContextClassLoader();
synchronized (_executorLock) {
_executorTaskCount++;
if (_executorTaskCount <= _executorTaskMax || _executorTaskMax < 0) {
boolean isPriority = false;
boolean... | java | public boolean scheduleExecutorTask(Runnable task)
{
ClassLoader loader = Thread.currentThread().getContextClassLoader();
synchronized (_executorLock) {
_executorTaskCount++;
if (_executorTaskCount <= _executorTaskMax || _executorTaskMax < 0) {
boolean isPriority = false;
boolean... | [
"public",
"boolean",
"scheduleExecutorTask",
"(",
"Runnable",
"task",
")",
"{",
"ClassLoader",
"loader",
"=",
"Thread",
".",
"currentThread",
"(",
")",
".",
"getContextClassLoader",
"(",
")",
";",
"synchronized",
"(",
"_executorLock",
")",
"{",
"_executorTaskCount... | Schedules an executor task. | [
"Schedules",
"an",
"executor",
"task",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/amp/thread/ThreadPool.java#L155-L182 |
44,371 | baratine/baratine | core/src/main/java/com/caucho/v5/amp/thread/ThreadPool.java | ThreadPool.completeExecutorTask | public void completeExecutorTask()
{
ExecutorQueueItem item = null;
synchronized (_executorLock) {
_executorTaskCount--;
assert(_executorTaskCount >= 0);
if (_executorQueueHead != null) {
item = _executorQueueHead;
_executorQueueHead = item._next;
if (_executorQu... | java | public void completeExecutorTask()
{
ExecutorQueueItem item = null;
synchronized (_executorLock) {
_executorTaskCount--;
assert(_executorTaskCount >= 0);
if (_executorQueueHead != null) {
item = _executorQueueHead;
_executorQueueHead = item._next;
if (_executorQu... | [
"public",
"void",
"completeExecutorTask",
"(",
")",
"{",
"ExecutorQueueItem",
"item",
"=",
"null",
";",
"synchronized",
"(",
"_executorLock",
")",
"{",
"_executorTaskCount",
"--",
";",
"assert",
"(",
"_executorTaskCount",
">=",
"0",
")",
";",
"if",
"(",
"_exec... | Called when an executor task completes | [
"Called",
"when",
"an",
"executor",
"task",
"completes"
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/amp/thread/ThreadPool.java#L187-L216 |
44,372 | SeaCloudsEU/SeaCloudsPlatform | discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/OfferingManager.java | OfferingManager.getOffering | public Offering getOffering(String offeringName) {
BasicDBObject query = new BasicDBObject("offering_name", offeringName);
FindIterable<Document> cursor = this.offeringsCollection.find(query);
return Offering.fromDB(cursor.first());
} | java | public Offering getOffering(String offeringName) {
BasicDBObject query = new BasicDBObject("offering_name", offeringName);
FindIterable<Document> cursor = this.offeringsCollection.find(query);
return Offering.fromDB(cursor.first());
} | [
"public",
"Offering",
"getOffering",
"(",
"String",
"offeringName",
")",
"{",
"BasicDBObject",
"query",
"=",
"new",
"BasicDBObject",
"(",
"\"offering_name\"",
",",
"offeringName",
")",
";",
"FindIterable",
"<",
"Document",
">",
"cursor",
"=",
"this",
".",
"offer... | Get an offering
@param offeringName the name of the offering
@return the offering identified by offeringId | [
"Get",
"an",
"offering"
] | b199fe6de2c63b808cb248d3aca947d802375df8 | https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/OfferingManager.java#L53-L58 |
44,373 | SeaCloudsEU/SeaCloudsPlatform | discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/OfferingManager.java | OfferingManager.addOffering | public String addOffering(Offering offering) {
this.offeringsCollection.insertOne(offering.toDBObject());
this.offeringNames.add(offering.getName());
return offering.getName();
} | java | public String addOffering(Offering offering) {
this.offeringsCollection.insertOne(offering.toDBObject());
this.offeringNames.add(offering.getName());
return offering.getName();
} | [
"public",
"String",
"addOffering",
"(",
"Offering",
"offering",
")",
"{",
"this",
".",
"offeringsCollection",
".",
"insertOne",
"(",
"offering",
".",
"toDBObject",
"(",
")",
")",
";",
"this",
".",
"offeringNames",
".",
"add",
"(",
"offering",
".",
"getName",... | Add a new offering in the repository
@param offering the Offering to add
@return the id of the added Offering | [
"Add",
"a",
"new",
"offering",
"in",
"the",
"repository"
] | b199fe6de2c63b808cb248d3aca947d802375df8 | https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/OfferingManager.java#L66-L70 |
44,374 | SeaCloudsEU/SeaCloudsPlatform | discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/OfferingManager.java | OfferingManager.removeOffering | public boolean removeOffering(String offeringName) {
if(offeringName == null)
throw new NullPointerException("The parameter \"cloudOfferingId\" cannot be null.");
BasicDBObject query = new BasicDBObject("offering_name", offeringName);
Document removedOffering = this.offeringsCollect... | java | public boolean removeOffering(String offeringName) {
if(offeringName == null)
throw new NullPointerException("The parameter \"cloudOfferingId\" cannot be null.");
BasicDBObject query = new BasicDBObject("offering_name", offeringName);
Document removedOffering = this.offeringsCollect... | [
"public",
"boolean",
"removeOffering",
"(",
"String",
"offeringName",
")",
"{",
"if",
"(",
"offeringName",
"==",
"null",
")",
"throw",
"new",
"NullPointerException",
"(",
"\"The parameter \\\"cloudOfferingId\\\" cannot be null.\"",
")",
";",
"BasicDBObject",
"query",
"=... | Remove an offering
@param offeringName the name of the offering to remove
@return | [
"Remove",
"an",
"offering"
] | b199fe6de2c63b808cb248d3aca947d802375df8 | https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/OfferingManager.java#L78-L86 |
44,375 | SeaCloudsEU/SeaCloudsPlatform | discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/OfferingManager.java | OfferingManager.initializeOfferings | public void initializeOfferings() {
FindIterable<Document> offerings = this.offeringsCollection.find();
for (Document d : offerings) {
offeringNames.add((String) d.get("offering_name"));
}
} | java | public void initializeOfferings() {
FindIterable<Document> offerings = this.offeringsCollection.find();
for (Document d : offerings) {
offeringNames.add((String) d.get("offering_name"));
}
} | [
"public",
"void",
"initializeOfferings",
"(",
")",
"{",
"FindIterable",
"<",
"Document",
">",
"offerings",
"=",
"this",
".",
"offeringsCollection",
".",
"find",
"(",
")",
";",
"for",
"(",
"Document",
"d",
":",
"offerings",
")",
"{",
"offeringNames",
".",
"... | Initialize the list of offerings known by the discoverer | [
"Initialize",
"the",
"list",
"of",
"offerings",
"known",
"by",
"the",
"discoverer"
] | b199fe6de2c63b808cb248d3aca947d802375df8 | https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/OfferingManager.java#L92-L98 |
44,376 | SeaCloudsEU/SeaCloudsPlatform | discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/OfferingManager.java | OfferingManager.generateSingleOffering | public void generateSingleOffering(String offeringNodeTemplates) {
this.removeOffering("0");
Offering singleOffering = new Offering("all");
singleOffering.toscaString = offeringNodeTemplates;
this.addOffering(singleOffering);
} | java | public void generateSingleOffering(String offeringNodeTemplates) {
this.removeOffering("0");
Offering singleOffering = new Offering("all");
singleOffering.toscaString = offeringNodeTemplates;
this.addOffering(singleOffering);
} | [
"public",
"void",
"generateSingleOffering",
"(",
"String",
"offeringNodeTemplates",
")",
"{",
"this",
".",
"removeOffering",
"(",
"\"0\"",
")",
";",
"Offering",
"singleOffering",
"=",
"new",
"Offering",
"(",
"\"all\"",
")",
";",
"singleOffering",
".",
"toscaString... | Generates a single offering file containing all node templates fetched
@param offeringNodeTemplates node templates to write on file | [
"Generates",
"a",
"single",
"offering",
"file",
"containing",
"all",
"node",
"templates",
"fetched"
] | b199fe6de2c63b808cb248d3aca947d802375df8 | https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/OfferingManager.java#L105-L110 |
44,377 | baratine/baratine | core/src/main/java/com/caucho/v5/bytecode/JavaClass.java | JavaClass.getSuperClass | public JClass getSuperClass()
{
lazyLoad();
if (_superClass == null)
return null;
else
return getClassLoader().forName(_superClass.replace('/', '.'));
} | java | public JClass getSuperClass()
{
lazyLoad();
if (_superClass == null)
return null;
else
return getClassLoader().forName(_superClass.replace('/', '.'));
} | [
"public",
"JClass",
"getSuperClass",
"(",
")",
"{",
"lazyLoad",
"(",
")",
";",
"if",
"(",
"_superClass",
"==",
"null",
")",
"return",
"null",
";",
"else",
"return",
"getClassLoader",
"(",
")",
".",
"forName",
"(",
"_superClass",
".",
"replace",
"(",
"'",... | Gets the super class name. | [
"Gets",
"the",
"super",
"class",
"name",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaClass.java#L224-L232 |
44,378 | baratine/baratine | core/src/main/java/com/caucho/v5/bytecode/JavaClass.java | JavaClass.addInterface | public void addInterface(String className)
{
_interfaces.add(className);
if (_isWrite)
getConstantPool().addClass(className);
} | java | public void addInterface(String className)
{
_interfaces.add(className);
if (_isWrite)
getConstantPool().addClass(className);
} | [
"public",
"void",
"addInterface",
"(",
"String",
"className",
")",
"{",
"_interfaces",
".",
"add",
"(",
"className",
")",
";",
"if",
"(",
"_isWrite",
")",
"getConstantPool",
"(",
")",
".",
"addClass",
"(",
"className",
")",
";",
"}"
] | Adds an interface. | [
"Adds",
"an",
"interface",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaClass.java#L274-L280 |
44,379 | baratine/baratine | core/src/main/java/com/caucho/v5/bytecode/JavaClass.java | JavaClass.getInterfaces | public JClass []getInterfaces()
{
lazyLoad();
JClass []interfaces = new JClass[_interfaces.size()];
for (int i = 0; i < _interfaces.size(); i++) {
String name = _interfaces.get(i);
name = name.replace('/', '.');
interfaces[i] = getClassLoader().forName(name);
}
... | java | public JClass []getInterfaces()
{
lazyLoad();
JClass []interfaces = new JClass[_interfaces.size()];
for (int i = 0; i < _interfaces.size(); i++) {
String name = _interfaces.get(i);
name = name.replace('/', '.');
interfaces[i] = getClassLoader().forName(name);
}
... | [
"public",
"JClass",
"[",
"]",
"getInterfaces",
"(",
")",
"{",
"lazyLoad",
"(",
")",
";",
"JClass",
"[",
"]",
"interfaces",
"=",
"new",
"JClass",
"[",
"_interfaces",
".",
"size",
"(",
")",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",... | Gets the interfaces. | [
"Gets",
"the",
"interfaces",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaClass.java#L293-L307 |
44,380 | baratine/baratine | core/src/main/java/com/caucho/v5/bytecode/JavaClass.java | JavaClass.getField | public JavaField getField(String name)
{
ArrayList<JavaField> fieldList = getFieldList();
for (int i = 0; i < fieldList.size(); i++) {
JavaField field = fieldList.get(i);
if (field.getName().equals(name))
return field;
}
return null;
} | java | public JavaField getField(String name)
{
ArrayList<JavaField> fieldList = getFieldList();
for (int i = 0; i < fieldList.size(); i++) {
JavaField field = fieldList.get(i);
if (field.getName().equals(name))
return field;
}
return null;
} | [
"public",
"JavaField",
"getField",
"(",
"String",
"name",
")",
"{",
"ArrayList",
"<",
"JavaField",
">",
"fieldList",
"=",
"getFieldList",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"fieldList",
".",
"size",
"(",
")",
";",
"i",
... | Returns a fields. | [
"Returns",
"a",
"fields",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaClass.java#L352-L364 |
44,381 | baratine/baratine | core/src/main/java/com/caucho/v5/bytecode/JavaClass.java | JavaClass.getMethod | public JavaMethod getMethod(String name)
{
ArrayList<JavaMethod> methodList = getMethodList();
for (int i = 0; i < methodList.size(); i++) {
JavaMethod method = methodList.get(i);
if (method.getName().equals(name))
return method;
}
return null;
} | java | public JavaMethod getMethod(String name)
{
ArrayList<JavaMethod> methodList = getMethodList();
for (int i = 0; i < methodList.size(); i++) {
JavaMethod method = methodList.get(i);
if (method.getName().equals(name))
return method;
}
return null;
} | [
"public",
"JavaMethod",
"getMethod",
"(",
"String",
"name",
")",
"{",
"ArrayList",
"<",
"JavaMethod",
">",
"methodList",
"=",
"getMethodList",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"methodList",
".",
"size",
"(",
")",
";",
"... | Returns a method. | [
"Returns",
"a",
"method",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaClass.java#L427-L439 |
44,382 | baratine/baratine | core/src/main/java/com/caucho/v5/bytecode/JavaClass.java | JavaClass.findMethod | public JavaMethod findMethod(String name, String descriptor)
{
ArrayList<JavaMethod> methodList = getMethodList();
for (int i = 0; i < methodList.size(); i++) {
JavaMethod method = methodList.get(i);
if (method.getName().equals(name) &&
method.getDescriptor().equals(descriptor))
... | java | public JavaMethod findMethod(String name, String descriptor)
{
ArrayList<JavaMethod> methodList = getMethodList();
for (int i = 0; i < methodList.size(); i++) {
JavaMethod method = methodList.get(i);
if (method.getName().equals(name) &&
method.getDescriptor().equals(descriptor))
... | [
"public",
"JavaMethod",
"findMethod",
"(",
"String",
"name",
",",
"String",
"descriptor",
")",
"{",
"ArrayList",
"<",
"JavaMethod",
">",
"methodList",
"=",
"getMethodList",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"methodList",
"."... | Finds a method. | [
"Finds",
"a",
"method",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaClass.java#L444-L457 |
44,383 | baratine/baratine | core/src/main/java/com/caucho/v5/bytecode/JavaClass.java | JavaClass.getDeclaredFields | public JField []getDeclaredFields()
{
ArrayList<JavaField> fieldList = getFieldList();
JField[] fields = new JField[fieldList.size()];
fieldList.toArray(fields);
return fields;
} | java | public JField []getDeclaredFields()
{
ArrayList<JavaField> fieldList = getFieldList();
JField[] fields = new JField[fieldList.size()];
fieldList.toArray(fields);
return fields;
} | [
"public",
"JField",
"[",
"]",
"getDeclaredFields",
"(",
")",
"{",
"ArrayList",
"<",
"JavaField",
">",
"fieldList",
"=",
"getFieldList",
"(",
")",
";",
"JField",
"[",
"]",
"fields",
"=",
"new",
"JField",
"[",
"fieldList",
".",
"size",
"(",
")",
"]",
";"... | Returns the array of declared fields. | [
"Returns",
"the",
"array",
"of",
"declared",
"fields",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaClass.java#L683-L692 |
44,384 | baratine/baratine | core/src/main/java/com/caucho/v5/bytecode/JavaClass.java | JavaClass.getFields | public JField []getFields()
{
ArrayList<JField> fieldList = new ArrayList<JField>();
getFields(fieldList);
JField []fields = new JField[fieldList.size()];
fieldList.toArray(fields);
return fields;
} | java | public JField []getFields()
{
ArrayList<JField> fieldList = new ArrayList<JField>();
getFields(fieldList);
JField []fields = new JField[fieldList.size()];
fieldList.toArray(fields);
return fields;
} | [
"public",
"JField",
"[",
"]",
"getFields",
"(",
")",
"{",
"ArrayList",
"<",
"JField",
">",
"fieldList",
"=",
"new",
"ArrayList",
"<",
"JField",
">",
"(",
")",
";",
"getFields",
"(",
"fieldList",
")",
";",
"JField",
"[",
"]",
"fields",
"=",
"new",
"JF... | Returns the array of fields. | [
"Returns",
"the",
"array",
"of",
"fields",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaClass.java#L697-L707 |
44,385 | baratine/baratine | core/src/main/java/com/caucho/v5/bytecode/JavaClass.java | JavaClass.getFields | private void getFields(ArrayList<JField> fieldList)
{
for (JField field : getDeclaredFields()) {
if (! fieldList.contains(field))
fieldList.add(field);
}
if (getSuperClass() != null) {
for (JField field : getSuperClass().getFields()) {
if (! fieldList.contains(field))
... | java | private void getFields(ArrayList<JField> fieldList)
{
for (JField field : getDeclaredFields()) {
if (! fieldList.contains(field))
fieldList.add(field);
}
if (getSuperClass() != null) {
for (JField field : getSuperClass().getFields()) {
if (! fieldList.contains(field))
... | [
"private",
"void",
"getFields",
"(",
"ArrayList",
"<",
"JField",
">",
"fieldList",
")",
"{",
"for",
"(",
"JField",
"field",
":",
"getDeclaredFields",
"(",
")",
")",
"{",
"if",
"(",
"!",
"fieldList",
".",
"contains",
"(",
"field",
")",
")",
"fieldList",
... | Returns all the fields | [
"Returns",
"all",
"the",
"fields"
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaClass.java#L712-L725 |
44,386 | baratine/baratine | core/src/main/java/com/caucho/v5/bytecode/JavaClass.java | JavaClass.lazyLoad | private void lazyLoad()
{
if (_major > 0)
return;
try {
if (_url == null)
throw new IllegalStateException();
try (InputStream is = _url.openStream()) {
//ReadStream rs = VfsOld.openRead(is);
_major = 1;
ByteCodeParser parser = new ByteCodeParser();
... | java | private void lazyLoad()
{
if (_major > 0)
return;
try {
if (_url == null)
throw new IllegalStateException();
try (InputStream is = _url.openStream()) {
//ReadStream rs = VfsOld.openRead(is);
_major = 1;
ByteCodeParser parser = new ByteCodeParser();
... | [
"private",
"void",
"lazyLoad",
"(",
")",
"{",
"if",
"(",
"_major",
">",
"0",
")",
"return",
";",
"try",
"{",
"if",
"(",
"_url",
"==",
"null",
")",
"throw",
"new",
"IllegalStateException",
"(",
")",
";",
"try",
"(",
"InputStream",
"is",
"=",
"_url",
... | Lazily load the class. | [
"Lazily",
"load",
"the",
"class",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaClass.java#L776-L800 |
44,387 | baratine/baratine | core/src/main/java/com/caucho/v5/bytecode/JavaClass.java | JavaClass.write | public void write(OutputStream os)
throws IOException
{
ByteCodeWriter out = new ByteCodeWriter(os, this);
out.writeInt(MAGIC);
out.writeShort(_minor);
out.writeShort(_major);
_constantPool.write(out);
out.writeShort(_accessFlags);
out.writeClass(_thisClass);
out.writeClass(_sup... | java | public void write(OutputStream os)
throws IOException
{
ByteCodeWriter out = new ByteCodeWriter(os, this);
out.writeInt(MAGIC);
out.writeShort(_minor);
out.writeShort(_major);
_constantPool.write(out);
out.writeShort(_accessFlags);
out.writeClass(_thisClass);
out.writeClass(_sup... | [
"public",
"void",
"write",
"(",
"OutputStream",
"os",
")",
"throws",
"IOException",
"{",
"ByteCodeWriter",
"out",
"=",
"new",
"ByteCodeWriter",
"(",
"os",
",",
"this",
")",
";",
"out",
".",
"writeInt",
"(",
"MAGIC",
")",
";",
"out",
".",
"writeShort",
"(... | Writes the class to the output. | [
"Writes",
"the",
"class",
"to",
"the",
"output",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaClass.java#L805-L847 |
44,388 | baratine/baratine | web/src/main/java/com/caucho/v5/http/dispatch/InvocationManager.java | InvocationManager.getInvocation | public final I getInvocation(Object protocolKey)
{
I invocation = null;
// XXX: see if can remove this
LruCache<Object,I> invocationCache = _invocationCache;
if (invocationCache != null) {
invocation = invocationCache.get(protocolKey);
}
if (invocation == null) {
return null;
... | java | public final I getInvocation(Object protocolKey)
{
I invocation = null;
// XXX: see if can remove this
LruCache<Object,I> invocationCache = _invocationCache;
if (invocationCache != null) {
invocation = invocationCache.get(protocolKey);
}
if (invocation == null) {
return null;
... | [
"public",
"final",
"I",
"getInvocation",
"(",
"Object",
"protocolKey",
")",
"{",
"I",
"invocation",
"=",
"null",
";",
"// XXX: see if can remove this",
"LruCache",
"<",
"Object",
",",
"I",
">",
"invocationCache",
"=",
"_invocationCache",
";",
"if",
"(",
"invocat... | Returns the cached invocation. | [
"Returns",
"the",
"cached",
"invocation",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/dispatch/InvocationManager.java#L121-L141 |
44,389 | baratine/baratine | web/src/main/java/com/caucho/v5/http/dispatch/InvocationManager.java | InvocationManager.buildInvocation | public I buildInvocation(Object protocolKey, I invocation)
throws ConfigException
{
Objects.requireNonNull(invocation);
invocation = buildInvocation(invocation);
// XXX: see if can remove this, and rely on the invocation cache existing
LruCache<Object,I> invocationCache = _invocationCache;
... | java | public I buildInvocation(Object protocolKey, I invocation)
throws ConfigException
{
Objects.requireNonNull(invocation);
invocation = buildInvocation(invocation);
// XXX: see if can remove this, and rely on the invocation cache existing
LruCache<Object,I> invocationCache = _invocationCache;
... | [
"public",
"I",
"buildInvocation",
"(",
"Object",
"protocolKey",
",",
"I",
"invocation",
")",
"throws",
"ConfigException",
"{",
"Objects",
".",
"requireNonNull",
"(",
"invocation",
")",
";",
"invocation",
"=",
"buildInvocation",
"(",
"invocation",
")",
";",
"// X... | Builds the invocation, saving its value keyed by the protocol key.
@param protocolKey protocol-specific key to save the invocation in
@param invocation the invocation to build. | [
"Builds",
"the",
"invocation",
"saving",
"its",
"value",
"keyed",
"by",
"the",
"protocol",
"key",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/dispatch/InvocationManager.java#L157-L182 |
44,390 | baratine/baratine | web/src/main/java/com/caucho/v5/http/dispatch/InvocationManager.java | InvocationManager.clearCache | public void clearCache()
{
// XXX: see if can remove this, and rely on the invocation cache existing
LruCache<Object,I> invocationCache = _invocationCache;
if (invocationCache != null) {
invocationCache.clear();
}
} | java | public void clearCache()
{
// XXX: see if can remove this, and rely on the invocation cache existing
LruCache<Object,I> invocationCache = _invocationCache;
if (invocationCache != null) {
invocationCache.clear();
}
} | [
"public",
"void",
"clearCache",
"(",
")",
"{",
"// XXX: see if can remove this, and rely on the invocation cache existing",
"LruCache",
"<",
"Object",
",",
"I",
">",
"invocationCache",
"=",
"_invocationCache",
";",
"if",
"(",
"invocationCache",
"!=",
"null",
")",
"{",
... | Clears the invocation cache. | [
"Clears",
"the",
"invocation",
"cache",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/dispatch/InvocationManager.java#L196-L204 |
44,391 | baratine/baratine | web/src/main/java/com/caucho/v5/http/dispatch/InvocationManager.java | InvocationManager.getInvocations | public ArrayList<I> getInvocations()
{
LruCache<Object,I> invocationCache = _invocationCache;
ArrayList<I> invocationList = new ArrayList<>();
synchronized (invocationCache) {
Iterator<I> iter;
iter = invocationCache.values();
while (iter.hasNext()) {
invocationList.add(... | java | public ArrayList<I> getInvocations()
{
LruCache<Object,I> invocationCache = _invocationCache;
ArrayList<I> invocationList = new ArrayList<>();
synchronized (invocationCache) {
Iterator<I> iter;
iter = invocationCache.values();
while (iter.hasNext()) {
invocationList.add(... | [
"public",
"ArrayList",
"<",
"I",
">",
"getInvocations",
"(",
")",
"{",
"LruCache",
"<",
"Object",
",",
"I",
">",
"invocationCache",
"=",
"_invocationCache",
";",
"ArrayList",
"<",
"I",
">",
"invocationList",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
... | Returns the invocations. | [
"Returns",
"the",
"invocations",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/dispatch/InvocationManager.java#L209-L225 |
44,392 | baratine/baratine | framework/src/main/java/com/caucho/v5/loader/JarEntry.java | JarEntry.loadManifest | private void loadManifest()
{
if (_isManifestRead)
return;
synchronized (this) {
if (_isManifestRead)
return;
try {
_manifest = _jarPath.getManifest();
if (_manifest == null)
return;
Attributes attr = _manifest.getMainAttributes();
if ... | java | private void loadManifest()
{
if (_isManifestRead)
return;
synchronized (this) {
if (_isManifestRead)
return;
try {
_manifest = _jarPath.getManifest();
if (_manifest == null)
return;
Attributes attr = _manifest.getMainAttributes();
if ... | [
"private",
"void",
"loadManifest",
"(",
")",
"{",
"if",
"(",
"_isManifestRead",
")",
"return",
";",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"_isManifestRead",
")",
"return",
";",
"try",
"{",
"_manifest",
"=",
"_jarPath",
".",
"getManifest",
"(",
... | Reads the jar's manifest. | [
"Reads",
"the",
"jar",
"s",
"manifest",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/loader/JarEntry.java#L87-L122 |
44,393 | baratine/baratine | framework/src/main/java/com/caucho/v5/loader/JarEntry.java | JarEntry.addManifestPackage | private void addManifestPackage(String name, Attributes attr)
{
// only add packages
if (! name.endsWith("/") && ! name.equals(""))
return;
String specTitle = attr.getValue("Specification-Title");
String specVersion = attr.getValue("Specification-Version");
String specVendor = attr.getValue... | java | private void addManifestPackage(String name, Attributes attr)
{
// only add packages
if (! name.endsWith("/") && ! name.equals(""))
return;
String specTitle = attr.getValue("Specification-Title");
String specVersion = attr.getValue("Specification-Version");
String specVendor = attr.getValue... | [
"private",
"void",
"addManifestPackage",
"(",
"String",
"name",
",",
"Attributes",
"attr",
")",
"{",
"// only add packages",
"if",
"(",
"!",
"name",
".",
"endsWith",
"(",
"\"/\"",
")",
"&&",
"!",
"name",
".",
"equals",
"(",
"\"\"",
")",
")",
"return",
";... | Adds package information from the manifest. | [
"Adds",
"package",
"information",
"from",
"the",
"manifest",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/loader/JarEntry.java#L127-L154 |
44,394 | baratine/baratine | framework/src/main/java/com/caucho/v5/loader/JarEntry.java | JarEntry.validate | public void validate()
throws ConfigException
{
loadManifest();
if (_manifest != null)
validateManifest(_jarPath.getContainer().getURL(), _manifest);
} | java | public void validate()
throws ConfigException
{
loadManifest();
if (_manifest != null)
validateManifest(_jarPath.getContainer().getURL(), _manifest);
} | [
"public",
"void",
"validate",
"(",
")",
"throws",
"ConfigException",
"{",
"loadManifest",
"(",
")",
";",
"if",
"(",
"_manifest",
"!=",
"null",
")",
"validateManifest",
"(",
"_jarPath",
".",
"getContainer",
"(",
")",
".",
"getURL",
"(",
")",
",",
"_manifest... | Validates the jar. | [
"Validates",
"the",
"jar",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/loader/JarEntry.java#L159-L166 |
44,395 | baratine/baratine | framework/src/main/java/com/caucho/v5/loader/JarEntry.java | JarEntry.validateManifest | public static void validateManifest(String manifestName, Manifest manifest)
throws ConfigException
{
Attributes attr = manifest.getMainAttributes();
if (attr == null)
return;
String extList = attr.getValue("Extension-List");
if (extList == null)
return;
Pattern pattern = Pattern.... | java | public static void validateManifest(String manifestName, Manifest manifest)
throws ConfigException
{
Attributes attr = manifest.getMainAttributes();
if (attr == null)
return;
String extList = attr.getValue("Extension-List");
if (extList == null)
return;
Pattern pattern = Pattern.... | [
"public",
"static",
"void",
"validateManifest",
"(",
"String",
"manifestName",
",",
"Manifest",
"manifest",
")",
"throws",
"ConfigException",
"{",
"Attributes",
"attr",
"=",
"manifest",
".",
"getMainAttributes",
"(",
")",
";",
"if",
"(",
"attr",
"==",
"null",
... | Validates the manifest. | [
"Validates",
"the",
"manifest",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/loader/JarEntry.java#L171-L215 |
44,396 | baratine/baratine | framework/src/main/java/com/caucho/v5/loader/JarEntry.java | JarEntry.getCodeSource | public CodeSource getCodeSource(String path)
{
try {
PathImpl jarPath = _jarPath.lookup(path);
Certificate []certificates = jarPath.getCertificates();
URL url = new URL(_jarPath.getContainer().getURL());
return new CodeSource(url, certificates);
} catch (Exception e) {
... | java | public CodeSource getCodeSource(String path)
{
try {
PathImpl jarPath = _jarPath.lookup(path);
Certificate []certificates = jarPath.getCertificates();
URL url = new URL(_jarPath.getContainer().getURL());
return new CodeSource(url, certificates);
} catch (Exception e) {
... | [
"public",
"CodeSource",
"getCodeSource",
"(",
"String",
"path",
")",
"{",
"try",
"{",
"PathImpl",
"jarPath",
"=",
"_jarPath",
".",
"lookup",
"(",
"path",
")",
";",
"Certificate",
"[",
"]",
"certificates",
"=",
"jarPath",
".",
"getCertificates",
"(",
")",
"... | Returns the code source. | [
"Returns",
"the",
"code",
"source",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/loader/JarEntry.java#L246-L261 |
44,397 | SeaCloudsEU/SeaCloudsPlatform | sla/sla-core/sla-enforcement/src/main/java/eu/atos/sla/evaluation/guarantee/GuaranteeTermEvaluator.java | GuaranteeTermEvaluator.evaluate | public GuaranteeTermEvaluationResult evaluate(
IAgreement agreement, IGuaranteeTerm term, List<IMonitoringMetric> metrics, Date now) {
/*
* throws NullPointerException if not property initialized
*/
checkInitialized();
logger.debug("evaluate(a... | java | public GuaranteeTermEvaluationResult evaluate(
IAgreement agreement, IGuaranteeTerm term, List<IMonitoringMetric> metrics, Date now) {
/*
* throws NullPointerException if not property initialized
*/
checkInitialized();
logger.debug("evaluate(a... | [
"public",
"GuaranteeTermEvaluationResult",
"evaluate",
"(",
"IAgreement",
"agreement",
",",
"IGuaranteeTerm",
"term",
",",
"List",
"<",
"IMonitoringMetric",
">",
"metrics",
",",
"Date",
"now",
")",
"{",
"/*\n * throws NullPointerException if not property initialized \... | Evaluate violations and penalties for a given guarantee term and a list of metrics.
@param agreement that contains the term to evaluate
@param term guarantee term to evaluate
@param metrics list of metrics to evaluated if fulfill the service level of the term.
@param now the evaluation period ends at <code>now</code>. | [
"Evaluate",
"violations",
"and",
"penalties",
"for",
"a",
"given",
"guarantee",
"term",
"and",
"a",
"list",
"of",
"metrics",
"."
] | b199fe6de2c63b808cb248d3aca947d802375df8 | https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/sla/sla-core/sla-enforcement/src/main/java/eu/atos/sla/evaluation/guarantee/GuaranteeTermEvaluator.java#L88-L107 |
44,398 | baratine/baratine | web/src/main/java/com/caucho/v5/http/protocol/InChunked.java | InChunked.read | @Override
public int read(byte []buf, int offset, int len) throws IOException
{
int available = _available;
// The chunk still has more data left
if (available > 0) {
len = Math.min(len, available);
len = _next.read(buf, offset, len);
if (len > 0) {
_available -= len;
... | java | @Override
public int read(byte []buf, int offset, int len) throws IOException
{
int available = _available;
// The chunk still has more data left
if (available > 0) {
len = Math.min(len, available);
len = _next.read(buf, offset, len);
if (len > 0) {
_available -= len;
... | [
"@",
"Override",
"public",
"int",
"read",
"(",
"byte",
"[",
"]",
"buf",
",",
"int",
"offset",
",",
"int",
"len",
")",
"throws",
"IOException",
"{",
"int",
"available",
"=",
"_available",
";",
"// The chunk still has more data left",
"if",
"(",
"available",
"... | Reads more data from the input stream. | [
"Reads",
"more",
"data",
"from",
"the",
"input",
"stream",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/InChunked.java#L90-L129 |
44,399 | baratine/baratine | web/src/main/java/com/caucho/v5/http/protocol/InChunked.java | InChunked.readChunkLength | private int readChunkLength()
throws IOException
{
int length = 0;
int ch;
ReadStream is = _next;
// skip whitespace
for (ch = is.read();
ch == ' ' || ch == '\t' || ch == '\r' || ch == '\n';
ch = is.read()) {
}
// XXX: This doesn't properly handle the case when whe... | java | private int readChunkLength()
throws IOException
{
int length = 0;
int ch;
ReadStream is = _next;
// skip whitespace
for (ch = is.read();
ch == ' ' || ch == '\t' || ch == '\r' || ch == '\n';
ch = is.read()) {
}
// XXX: This doesn't properly handle the case when whe... | [
"private",
"int",
"readChunkLength",
"(",
")",
"throws",
"IOException",
"{",
"int",
"length",
"=",
"0",
";",
"int",
"ch",
";",
"ReadStream",
"is",
"=",
"_next",
";",
"// skip whitespace",
"for",
"(",
"ch",
"=",
"is",
".",
"read",
"(",
")",
";",
"ch",
... | Reads the next chunk length from the input stream. | [
"Reads",
"the",
"next",
"chunk",
"length",
"from",
"the",
"input",
"stream",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/InChunked.java#L134-L182 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.