repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
baratine/baratine | framework/src/main/java/com/caucho/v5/vfs/MergePath.java | MergePath.addMergePath | public void addMergePath(PathImpl path)
{
if (! (path instanceof MergePath)) {
// Need to normalize so directory paths ends with a "./"
// XXX:
//if (path.isDirectory())
// path = path.lookup("./");
ArrayList<PathImpl> pathList = ((MergePath) _root)._pathList;
if (! pathList... | java | public void addMergePath(PathImpl path)
{
if (! (path instanceof MergePath)) {
// Need to normalize so directory paths ends with a "./"
// XXX:
//if (path.isDirectory())
// path = path.lookup("./");
ArrayList<PathImpl> pathList = ((MergePath) _root)._pathList;
if (! pathList... | [
"public",
"void",
"addMergePath",
"(",
"PathImpl",
"path",
")",
"{",
"if",
"(",
"!",
"(",
"path",
"instanceof",
"MergePath",
")",
")",
"{",
"// Need to normalize so directory paths ends with a \"./\"",
"// XXX:",
"//if (path.isDirectory())",
"// path = path.lookup(\"./\");... | Adds a new path to the end of the merge path.
@param path the new path to search | [
"Adds",
"a",
"new",
"path",
"to",
"the",
"end",
"of",
"the",
"merge",
"path",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/MergePath.java#L194-L220 | train |
baratine/baratine | framework/src/main/java/com/caucho/v5/vfs/MergePath.java | MergePath.fsWalk | public PathImpl fsWalk(String userPath,
Map<String,Object> attributes,
String path)
{
ArrayList<PathImpl> pathList = getMergePaths();
if (! userPath.startsWith("/") || pathList.size() == 0)
return new MergePath((MergePath) _root, userPath, attributes, path);
... | java | public PathImpl fsWalk(String userPath,
Map<String,Object> attributes,
String path)
{
ArrayList<PathImpl> pathList = getMergePaths();
if (! userPath.startsWith("/") || pathList.size() == 0)
return new MergePath((MergePath) _root, userPath, attributes, path);
... | [
"public",
"PathImpl",
"fsWalk",
"(",
"String",
"userPath",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"attributes",
",",
"String",
"path",
")",
"{",
"ArrayList",
"<",
"PathImpl",
">",
"pathList",
"=",
"getMergePaths",
"(",
")",
";",
"if",
"(",
"!",
... | Walking down the path just extends the path. It won't be evaluated
until opening. | [
"Walking",
"down",
"the",
"path",
"just",
"extends",
"the",
"path",
".",
"It",
"won",
"t",
"be",
"evaluated",
"until",
"opening",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/MergePath.java#L333-L362 | train |
baratine/baratine | framework/src/main/java/com/caucho/v5/vfs/MergePath.java | MergePath.getResources | public ArrayList<PathImpl> getResources(String pathName)
{
ArrayList<PathImpl> list = new ArrayList<PathImpl>();
String pathname = _pathname;
// XXX: why was this here?
if (pathname.startsWith("/"))
pathname = "." + pathname;
ArrayList<PathImpl> pathList = ((MergePath) _root)._pathList;
... | java | public ArrayList<PathImpl> getResources(String pathName)
{
ArrayList<PathImpl> list = new ArrayList<PathImpl>();
String pathname = _pathname;
// XXX: why was this here?
if (pathname.startsWith("/"))
pathname = "." + pathname;
ArrayList<PathImpl> pathList = ((MergePath) _root)._pathList;
... | [
"public",
"ArrayList",
"<",
"PathImpl",
">",
"getResources",
"(",
"String",
"pathName",
")",
"{",
"ArrayList",
"<",
"PathImpl",
">",
"list",
"=",
"new",
"ArrayList",
"<",
"PathImpl",
">",
"(",
")",
";",
"String",
"pathname",
"=",
"_pathname",
";",
"// XXX:... | Returns all the resources matching the path. | [
"Returns",
"all",
"the",
"resources",
"matching",
"the",
"path",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/MergePath.java#L505-L530 | train |
baratine/baratine | framework/src/main/java/com/caucho/v5/vfs/MergePath.java | MergePath.list | public String []list() throws IOException
{
ArrayList<String> list = new ArrayList<String>();
String pathname = _pathname;
// XXX:??
if (pathname.startsWith("/"))
pathname = "." + pathname;
ArrayList<PathImpl> pathList = ((MergePath) _root)._pathList;
for (int i = 0; i < pathList.size(... | java | public String []list() throws IOException
{
ArrayList<String> list = new ArrayList<String>();
String pathname = _pathname;
// XXX:??
if (pathname.startsWith("/"))
pathname = "." + pathname;
ArrayList<PathImpl> pathList = ((MergePath) _root)._pathList;
for (int i = 0; i < pathList.size(... | [
"public",
"String",
"[",
"]",
"list",
"(",
")",
"throws",
"IOException",
"{",
"ArrayList",
"<",
"String",
">",
"list",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"String",
"pathname",
"=",
"_pathname",
";",
"// XXX:??",
"if",
"(",
"pat... | List the merged directories. | [
"List",
"the",
"merged",
"directories",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/MergePath.java#L565-L591 | train |
baratine/baratine | framework/src/main/java/com/caucho/v5/vfs/MergePath.java | MergePath.createDepend | @Override
public PersistentDependency createDepend()
{
ArrayList<PathImpl> pathList = ((MergePath) _root)._pathList;
if (pathList.size() == 1)
return (PersistentDependency) pathList.get(0).createDepend();
DependencyList dependList = new DependencyList();
for (int i = 0; i < pathList.size();... | java | @Override
public PersistentDependency createDepend()
{
ArrayList<PathImpl> pathList = ((MergePath) _root)._pathList;
if (pathList.size() == 1)
return (PersistentDependency) pathList.get(0).createDepend();
DependencyList dependList = new DependencyList();
for (int i = 0; i < pathList.size();... | [
"@",
"Override",
"public",
"PersistentDependency",
"createDepend",
"(",
")",
"{",
"ArrayList",
"<",
"PathImpl",
">",
"pathList",
"=",
"(",
"(",
"MergePath",
")",
"_root",
")",
".",
"_pathList",
";",
"if",
"(",
"pathList",
".",
"size",
"(",
")",
"==",
"1"... | Creates a dependency. | [
"Creates",
"a",
"dependency",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/MergePath.java#L707-L726 | train |
baratine/baratine | core/src/main/java/com/caucho/v5/bytecode/JavaField.java | JavaField.getGenericType | public JType getGenericType()
{
SignatureAttribute sigAttr = (SignatureAttribute) getAttribute("Signature");
if (sigAttr != null) {
return getClassLoader().parseParameterizedType(sigAttr.getSignature());
}
return getType();
} | java | public JType getGenericType()
{
SignatureAttribute sigAttr = (SignatureAttribute) getAttribute("Signature");
if (sigAttr != null) {
return getClassLoader().parseParameterizedType(sigAttr.getSignature());
}
return getType();
} | [
"public",
"JType",
"getGenericType",
"(",
")",
"{",
"SignatureAttribute",
"sigAttr",
"=",
"(",
"SignatureAttribute",
")",
"getAttribute",
"(",
"\"Signature\"",
")",
";",
"if",
"(",
"sigAttr",
"!=",
"null",
")",
"{",
"return",
"getClassLoader",
"(",
")",
".",
... | Gets the typename. | [
"Gets",
"the",
"typename",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaField.java#L179-L188 | train |
baratine/baratine | core/src/main/java/com/caucho/v5/bytecode/JavaField.java | JavaField.getDeclaredAnnotations | public JAnnotation []getDeclaredAnnotations()
{
if (_annotations == null) {
Attribute attr = getAttribute("RuntimeVisibleAnnotations");
if (attr instanceof OpaqueAttribute) {
byte []buffer = ((OpaqueAttribute) attr).getValue();
try {
ByteArrayInputStream is = new ByteArrayI... | java | public JAnnotation []getDeclaredAnnotations()
{
if (_annotations == null) {
Attribute attr = getAttribute("RuntimeVisibleAnnotations");
if (attr instanceof OpaqueAttribute) {
byte []buffer = ((OpaqueAttribute) attr).getValue();
try {
ByteArrayInputStream is = new ByteArrayI... | [
"public",
"JAnnotation",
"[",
"]",
"getDeclaredAnnotations",
"(",
")",
"{",
"if",
"(",
"_annotations",
"==",
"null",
")",
"{",
"Attribute",
"attr",
"=",
"getAttribute",
"(",
"\"RuntimeVisibleAnnotations\"",
")",
";",
"if",
"(",
"attr",
"instanceof",
"OpaqueAttri... | Returns the declared annotations. | [
"Returns",
"the",
"declared",
"annotations",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaField.java#L216-L242 | train |
baratine/baratine | core/src/main/java/com/caucho/v5/bytecode/JavaField.java | JavaField.export | public JavaField export(JavaClass cl, JavaClass target)
{
JavaField field = new JavaField();
field.setName(_name);
field.setDescriptor(_descriptor);
field.setAccessFlags(_accessFlags);
target.getConstantPool().addUTF8(_name);
target.getConstantPool().addUTF8(_descriptor);
for (int i = 0;... | java | public JavaField export(JavaClass cl, JavaClass target)
{
JavaField field = new JavaField();
field.setName(_name);
field.setDescriptor(_descriptor);
field.setAccessFlags(_accessFlags);
target.getConstantPool().addUTF8(_name);
target.getConstantPool().addUTF8(_descriptor);
for (int i = 0;... | [
"public",
"JavaField",
"export",
"(",
"JavaClass",
"cl",
",",
"JavaClass",
"target",
")",
"{",
"JavaField",
"field",
"=",
"new",
"JavaField",
"(",
")",
";",
"field",
".",
"setName",
"(",
"_name",
")",
";",
"field",
".",
"setDescriptor",
"(",
"_descriptor",... | exports the field | [
"exports",
"the",
"field"
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaField.java#L265-L282 | train |
baratine/baratine | web/src/main/java/com/caucho/v5/io/SocketChannelStream.java | SocketChannelStream.write | @Override
public void write(Buffer buffer, boolean isEnd)
throws IOException
{
if (_s == null) {
buffer.free();
return;
}
try {
_needsFlush = true;
if (buffer.isDirect()) {
_totalWriteBytes += buffer.length();
_s.write(buffer.direct());
re... | java | @Override
public void write(Buffer buffer, boolean isEnd)
throws IOException
{
if (_s == null) {
buffer.free();
return;
}
try {
_needsFlush = true;
if (buffer.isDirect()) {
_totalWriteBytes += buffer.length();
_s.write(buffer.direct());
re... | [
"@",
"Override",
"public",
"void",
"write",
"(",
"Buffer",
"buffer",
",",
"boolean",
"isEnd",
")",
"throws",
"IOException",
"{",
"if",
"(",
"_s",
"==",
"null",
")",
"{",
"buffer",
".",
"free",
"(",
")",
";",
"return",
";",
"}",
"try",
"{",
"_needsFlu... | Writes an nio buffer to the socket. | [
"Writes",
"an",
"nio",
"buffer",
"to",
"the",
"socket",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/io/SocketChannelStream.java#L375-L415 | train |
baratine/baratine | web/src/main/java/com/caucho/v5/network/port/AcceptTcp.java | AcceptTcp.accept | private boolean accept(SocketBar socket)
{
PortTcp port = port();
try {
while (! port().isClosed()) {
// Thread.interrupted();
if (_serverSocket.accept(socket)) {
if (port.isClosed()) {
socket.close();
return false;
}
else if (i... | java | private boolean accept(SocketBar socket)
{
PortTcp port = port();
try {
while (! port().isClosed()) {
// Thread.interrupted();
if (_serverSocket.accept(socket)) {
if (port.isClosed()) {
socket.close();
return false;
}
else if (i... | [
"private",
"boolean",
"accept",
"(",
"SocketBar",
"socket",
")",
"{",
"PortTcp",
"port",
"=",
"port",
"(",
")",
";",
"try",
"{",
"while",
"(",
"!",
"port",
"(",
")",
".",
"isClosed",
"(",
")",
")",
"{",
"// Thread.interrupted();",
"if",
"(",
"_serverSo... | Accepts a new connection. | [
"Accepts",
"a",
"new",
"connection",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/network/port/AcceptTcp.java#L103-L131 | train |
baratine/baratine | web/src/main/java/com/caucho/v5/web/webapp/WriterUtf8.java | WriterUtf8.writeShort | private int writeShort(String value, int offset, int end)
throws IOException
{
int ch;
OutputStreamWithBuffer os = _os;
byte []buffer = os.buffer();
int bOffset = os.offset();
end = Math.min(end, offset + buffer.length - bOffset);
for (; offset < end && (ch = value.charAt(offset... | java | private int writeShort(String value, int offset, int end)
throws IOException
{
int ch;
OutputStreamWithBuffer os = _os;
byte []buffer = os.buffer();
int bOffset = os.offset();
end = Math.min(end, offset + buffer.length - bOffset);
for (; offset < end && (ch = value.charAt(offset... | [
"private",
"int",
"writeShort",
"(",
"String",
"value",
",",
"int",
"offset",
",",
"int",
"end",
")",
"throws",
"IOException",
"{",
"int",
"ch",
";",
"OutputStreamWithBuffer",
"os",
"=",
"_os",
";",
"byte",
"[",
"]",
"buffer",
"=",
"os",
".",
"buffer",
... | Writes a short string. | [
"Writes",
"a",
"short",
"string",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/web/webapp/WriterUtf8.java#L188-L206 | train |
baratine/baratine | web/src/main/java/com/caucho/v5/io/StreamImpl.java | StreamImpl.write | public boolean write(byte []buf1, int off1, int len1,
byte []buf2, int off2, int len2,
boolean isEnd)
throws IOException
{
if (len1 == 0) {
write(buf2, off2, len2, isEnd);
return true;
}
else
return false;
} | java | public boolean write(byte []buf1, int off1, int len1,
byte []buf2, int off2, int len2,
boolean isEnd)
throws IOException
{
if (len1 == 0) {
write(buf2, off2, len2, isEnd);
return true;
}
else
return false;
} | [
"public",
"boolean",
"write",
"(",
"byte",
"[",
"]",
"buf1",
",",
"int",
"off1",
",",
"int",
"len1",
",",
"byte",
"[",
"]",
"buf2",
",",
"int",
"off2",
",",
"int",
"len2",
",",
"boolean",
"isEnd",
")",
"throws",
"IOException",
"{",
"if",
"(",
"len1... | Writes a pair of buffer to the underlying stream.
@param buf1 the byte array to write.
@param off1 the offset into the byte array.
@param len1 the number of bytes to write.
@param buf2 the byte array to write.
@param off2 the offset into the byte array.
@param len2 the number of bytes to write.
@param isEnd true when ... | [
"Writes",
"a",
"pair",
"of",
"buffer",
"to",
"the",
"underlying",
"stream",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/io/StreamImpl.java#L225-L237 | train |
SeaCloudsEU/SeaCloudsPlatform | dashboard/src/main/java/eu/seaclouds/platform/dashboard/proxy/SlaProxy.java | SlaProxy.removeAgreement | public String removeAgreement(String agreementId) {
Invocation invocation = getJerseyClient().target(getEndpoint() + "/agreements/" + agreementId).request()
.header("Accept", MediaType.APPLICATION_JSON)
.header("Content-Type", MediaType.APPLICATION_JSON)
.buildDel... | java | public String removeAgreement(String agreementId) {
Invocation invocation = getJerseyClient().target(getEndpoint() + "/agreements/" + agreementId).request()
.header("Accept", MediaType.APPLICATION_JSON)
.header("Content-Type", MediaType.APPLICATION_JSON)
.buildDel... | [
"public",
"String",
"removeAgreement",
"(",
"String",
"agreementId",
")",
"{",
"Invocation",
"invocation",
"=",
"getJerseyClient",
"(",
")",
".",
"target",
"(",
"getEndpoint",
"(",
")",
"+",
"\"/agreements/\"",
"+",
"agreementId",
")",
".",
"request",
"(",
")"... | Creates proxied HTTP DELETE request to SeaClouds SLA core which removes the SLA from the SLA Core
@param agreementId of the SLA Agreement to be removed. This ID may differ from SeaClouds Application ID
@return String representing that the Agreement was removed properly | [
"Creates",
"proxied",
"HTTP",
"DELETE",
"request",
"to",
"SeaClouds",
"SLA",
"core",
"which",
"removes",
"the",
"SLA",
"from",
"the",
"SLA",
"Core"
] | b199fe6de2c63b808cb248d3aca947d802375df8 | https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/dashboard/src/main/java/eu/seaclouds/platform/dashboard/proxy/SlaProxy.java#L71-L79 | train |
SeaCloudsEU/SeaCloudsPlatform | dashboard/src/main/java/eu/seaclouds/platform/dashboard/proxy/SlaProxy.java | SlaProxy.notifyRulesReady | public String notifyRulesReady(Agreement slaAgreement) {
Entity content = Entity.entity("", MediaType.TEXT_PLAIN);
Invocation invocation = getJerseyClient().target(getEndpoint() + "/seaclouds/commands/rulesready?agreementId=" + slaAgreement.getAgreementId()).request()
.header("Accept", M... | java | public String notifyRulesReady(Agreement slaAgreement) {
Entity content = Entity.entity("", MediaType.TEXT_PLAIN);
Invocation invocation = getJerseyClient().target(getEndpoint() + "/seaclouds/commands/rulesready?agreementId=" + slaAgreement.getAgreementId()).request()
.header("Accept", M... | [
"public",
"String",
"notifyRulesReady",
"(",
"Agreement",
"slaAgreement",
")",
"{",
"Entity",
"content",
"=",
"Entity",
".",
"entity",
"(",
"\"\"",
",",
"MediaType",
".",
"TEXT_PLAIN",
")",
";",
"Invocation",
"invocation",
"=",
"getJerseyClient",
"(",
")",
"."... | Creates proxied HTTP POST request to SeaClouds SLA core which notifies that the Monitoring Rules were installed
in Tower4Clouds. @see Issue #56
@return String representing that the SLA was notified properly | [
"Creates",
"proxied",
"HTTP",
"POST",
"request",
"to",
"SeaClouds",
"SLA",
"core",
"which",
"notifies",
"that",
"the",
"Monitoring",
"Rules",
"were",
"installed",
"in",
"Tower4Clouds",
"."
] | b199fe6de2c63b808cb248d3aca947d802375df8 | https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/dashboard/src/main/java/eu/seaclouds/platform/dashboard/proxy/SlaProxy.java#L86-L95 | train |
SeaCloudsEU/SeaCloudsPlatform | dashboard/src/main/java/eu/seaclouds/platform/dashboard/proxy/SlaProxy.java | SlaProxy.getAgreement | public Agreement getAgreement(String agreementId) {
return getJerseyClient().target(getEndpoint() + "/agreements/" + agreementId).request()
.header("Accept", MediaType.APPLICATION_JSON)
.header("Content-Type", MediaType.APPLICATION_JSON)
.buildGet().invoke().readE... | java | public Agreement getAgreement(String agreementId) {
return getJerseyClient().target(getEndpoint() + "/agreements/" + agreementId).request()
.header("Accept", MediaType.APPLICATION_JSON)
.header("Content-Type", MediaType.APPLICATION_JSON)
.buildGet().invoke().readE... | [
"public",
"Agreement",
"getAgreement",
"(",
"String",
"agreementId",
")",
"{",
"return",
"getJerseyClient",
"(",
")",
".",
"target",
"(",
"getEndpoint",
"(",
")",
"+",
"\"/agreements/\"",
"+",
"agreementId",
")",
".",
"request",
"(",
")",
".",
"header",
"(",... | Creates proxied HTTP GET request to SeaClouds SLA core which retrieves the Agreement details
@param agreementId of the desired agreement. This ID may differ from SeaClouds Application ID
@return the Agreement | [
"Creates",
"proxied",
"HTTP",
"GET",
"request",
"to",
"SeaClouds",
"SLA",
"core",
"which",
"retrieves",
"the",
"Agreement",
"details"
] | b199fe6de2c63b808cb248d3aca947d802375df8 | https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/dashboard/src/main/java/eu/seaclouds/platform/dashboard/proxy/SlaProxy.java#L102-L107 | train |
SeaCloudsEU/SeaCloudsPlatform | dashboard/src/main/java/eu/seaclouds/platform/dashboard/proxy/SlaProxy.java | SlaProxy.getAgreementByTemplateId | public Agreement getAgreementByTemplateId(String slaAgreementTemplateId) {
return getJerseyClient().target(getEndpoint() + "/seaclouds/commands/fromtemplate?templateId=" + slaAgreementTemplateId).request()
.header("Accept", MediaType.APPLICATION_JSON)
.header("Content-Type", Medi... | java | public Agreement getAgreementByTemplateId(String slaAgreementTemplateId) {
return getJerseyClient().target(getEndpoint() + "/seaclouds/commands/fromtemplate?templateId=" + slaAgreementTemplateId).request()
.header("Accept", MediaType.APPLICATION_JSON)
.header("Content-Type", Medi... | [
"public",
"Agreement",
"getAgreementByTemplateId",
"(",
"String",
"slaAgreementTemplateId",
")",
"{",
"return",
"getJerseyClient",
"(",
")",
".",
"target",
"(",
"getEndpoint",
"(",
")",
"+",
"\"/seaclouds/commands/fromtemplate?templateId=\"",
"+",
"slaAgreementTemplateId",
... | Creates proxied HTTP GET request to SeaClouds SLA which returns the Agreement according to the template id
@param slaAgreementTemplateId SLA Agreement template ID
@return the Agreement | [
"Creates",
"proxied",
"HTTP",
"GET",
"request",
"to",
"SeaClouds",
"SLA",
"which",
"returns",
"the",
"Agreement",
"according",
"to",
"the",
"template",
"id"
] | b199fe6de2c63b808cb248d3aca947d802375df8 | https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/dashboard/src/main/java/eu/seaclouds/platform/dashboard/proxy/SlaProxy.java#L115-L120 | train |
SeaCloudsEU/SeaCloudsPlatform | dashboard/src/main/java/eu/seaclouds/platform/dashboard/proxy/SlaProxy.java | SlaProxy.getAgreementStatus | public GuaranteeTermsStatus getAgreementStatus(String agreementId) {
return getJerseyClient().target(getEndpoint() + "/agreements/" + agreementId + "/guaranteestatus").request()
.header("Accept", MediaType.APPLICATION_JSON)
.header("Content-Type", MediaType.APPLICATION_JSON)
... | java | public GuaranteeTermsStatus getAgreementStatus(String agreementId) {
return getJerseyClient().target(getEndpoint() + "/agreements/" + agreementId + "/guaranteestatus").request()
.header("Accept", MediaType.APPLICATION_JSON)
.header("Content-Type", MediaType.APPLICATION_JSON)
... | [
"public",
"GuaranteeTermsStatus",
"getAgreementStatus",
"(",
"String",
"agreementId",
")",
"{",
"return",
"getJerseyClient",
"(",
")",
".",
"target",
"(",
"getEndpoint",
"(",
")",
"+",
"\"/agreements/\"",
"+",
"agreementId",
"+",
"\"/guaranteestatus\"",
")",
".",
... | Creates proxied HTTP GET request to SeaClouds SLA core which retrieves the Agreement Status
@param agreementId to fetch the status
@return the GuaranteeTermsStatus | [
"Creates",
"proxied",
"HTTP",
"GET",
"request",
"to",
"SeaClouds",
"SLA",
"core",
"which",
"retrieves",
"the",
"Agreement",
"Status"
] | b199fe6de2c63b808cb248d3aca947d802375df8 | https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/dashboard/src/main/java/eu/seaclouds/platform/dashboard/proxy/SlaProxy.java#L137-L142 | train |
SeaCloudsEU/SeaCloudsPlatform | dashboard/src/main/java/eu/seaclouds/platform/dashboard/proxy/SlaProxy.java | SlaProxy.getGuaranteeTermViolations | public List<Violation> getGuaranteeTermViolations(Agreement agreement, GuaranteeTerm guaranteeTerm) {
String json = getJerseyClient().target(getEndpoint() + "/violations?agreementId=" + agreement.getAgreementId() + "&guaranteeTerm=" + guaranteeTerm.getName()).request()
.header("Accept", MediaTyp... | java | public List<Violation> getGuaranteeTermViolations(Agreement agreement, GuaranteeTerm guaranteeTerm) {
String json = getJerseyClient().target(getEndpoint() + "/violations?agreementId=" + agreement.getAgreementId() + "&guaranteeTerm=" + guaranteeTerm.getName()).request()
.header("Accept", MediaTyp... | [
"public",
"List",
"<",
"Violation",
">",
"getGuaranteeTermViolations",
"(",
"Agreement",
"agreement",
",",
"GuaranteeTerm",
"guaranteeTerm",
")",
"{",
"String",
"json",
"=",
"getJerseyClient",
"(",
")",
".",
"target",
"(",
"getEndpoint",
"(",
")",
"+",
"\"/viola... | Creates proxied HTTP GET request to SeaClouds SLA core which retrieves the Agreement Term Violations
@param agreement which contains the guaranteeTerm to fetch
@param guaranteeTerm to check violations
@return the list of Violations for this <Agreement, GuaranteeTerm> pair | [
"Creates",
"proxied",
"HTTP",
"GET",
"request",
"to",
"SeaClouds",
"SLA",
"core",
"which",
"retrieves",
"the",
"Agreement",
"Term",
"Violations"
] | b199fe6de2c63b808cb248d3aca947d802375df8 | https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/dashboard/src/main/java/eu/seaclouds/platform/dashboard/proxy/SlaProxy.java#L150-L163 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/h3/ser/SerializerH3Java.java | SerializerH3Java.readObject | @Override
public T readObject(InRawH3 is, InH3Amp in)
{
T bean = newInstance();
in.ref(bean);
FieldSerBase[] fields = _fields;
int size = fields.length;
for (int i = 0; i < size; i++) {
fields[i].read(bean, is, in);
}
return bean;
} | java | @Override
public T readObject(InRawH3 is, InH3Amp in)
{
T bean = newInstance();
in.ref(bean);
FieldSerBase[] fields = _fields;
int size = fields.length;
for (int i = 0; i < size; i++) {
fields[i].read(bean, is, in);
}
return bean;
} | [
"@",
"Override",
"public",
"T",
"readObject",
"(",
"InRawH3",
"is",
",",
"InH3Amp",
"in",
")",
"{",
"T",
"bean",
"=",
"newInstance",
"(",
")",
";",
"in",
".",
"ref",
"(",
"bean",
")",
";",
"FieldSerBase",
"[",
"]",
"fields",
"=",
"_fields",
";",
"i... | Reads the bean from the stream. | [
"Reads",
"the",
"bean",
"from",
"the",
"stream",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/h3/ser/SerializerH3Java.java#L206-L221 | train |
baratine/baratine | web/src/main/java/com/caucho/v5/web/webapp/WebAppBuilder.java | WebAppBuilder.buildRouter | public InvocationRouter<InvocationBaratine> buildRouter(WebApp webApp)
{
// find views
InjectorAmp inject = webApp.inject();
buildViews(inject);
ArrayList<RouteMap> mapList = new ArrayList<>();
ServicesAmp manager = webApp.services();
ServiceRefAmp serviceRef = manager.newService(new Rout... | java | public InvocationRouter<InvocationBaratine> buildRouter(WebApp webApp)
{
// find views
InjectorAmp inject = webApp.inject();
buildViews(inject);
ArrayList<RouteMap> mapList = new ArrayList<>();
ServicesAmp manager = webApp.services();
ServiceRefAmp serviceRef = manager.newService(new Rout... | [
"public",
"InvocationRouter",
"<",
"InvocationBaratine",
">",
"buildRouter",
"(",
"WebApp",
"webApp",
")",
"{",
"// find views",
"InjectorAmp",
"inject",
"=",
"webApp",
".",
"inject",
"(",
")",
";",
"buildViews",
"(",
"inject",
")",
";",
"ArrayList",
"<",
"Rou... | Builds the web-app's router | [
"Builds",
"the",
"web",
"-",
"app",
"s",
"router"
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/web/webapp/WebAppBuilder.java#L392-L428 | train |
baratine/baratine | web/src/main/java/com/caucho/v5/http/dispatch/InvocationDecoder.java | InvocationDecoder.splitQueryAndUnescape | public void splitQueryAndUnescape(I invocation,
byte []rawURIBytes,
int uriLength)
throws IOException
{
for (int i = 0; i < uriLength; i++) {
if (rawURIBytes[i] == '?') {
i++;
// XXX: should be the host encoding?
... | java | public void splitQueryAndUnescape(I invocation,
byte []rawURIBytes,
int uriLength)
throws IOException
{
for (int i = 0; i < uriLength; i++) {
if (rawURIBytes[i] == '?') {
i++;
// XXX: should be the host encoding?
... | [
"public",
"void",
"splitQueryAndUnescape",
"(",
"I",
"invocation",
",",
"byte",
"[",
"]",
"rawURIBytes",
",",
"int",
"uriLength",
")",
"throws",
"IOException",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"uriLength",
";",
"i",
"++",
")",
"{",... | Splits out the query string and unescape the value. | [
"Splits",
"out",
"the",
"query",
"string",
"and",
"unescape",
"the",
"value",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/dispatch/InvocationDecoder.java#L103-L132 | train |
baratine/baratine | web/src/main/java/com/caucho/v5/http/dispatch/InvocationDecoder.java | InvocationDecoder.splitQuery | public void splitQuery(I invocation, String rawURI)
throws IOException
{
int p = rawURI.indexOf('?');
if (p > 0) {
invocation.setQueryString(rawURI.substring(p + 1));
rawURI = rawURI.substring(0, p);
}
invocation.setRawURI(rawURI);
String uri = normalizeUri(rawURI);
... | java | public void splitQuery(I invocation, String rawURI)
throws IOException
{
int p = rawURI.indexOf('?');
if (p > 0) {
invocation.setQueryString(rawURI.substring(p + 1));
rawURI = rawURI.substring(0, p);
}
invocation.setRawURI(rawURI);
String uri = normalizeUri(rawURI);
... | [
"public",
"void",
"splitQuery",
"(",
"I",
"invocation",
",",
"String",
"rawURI",
")",
"throws",
"IOException",
"{",
"int",
"p",
"=",
"rawURI",
".",
"indexOf",
"(",
"'",
"'",
")",
";",
"if",
"(",
"p",
">",
"0",
")",
"{",
"invocation",
".",
"setQuerySt... | Splits out the query string, and normalizes the URI, assuming nothing
needs unescaping. | [
"Splits",
"out",
"the",
"query",
"string",
"and",
"normalizes",
"the",
"URI",
"assuming",
"nothing",
"needs",
"unescaping",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/dispatch/InvocationDecoder.java#L143-L158 | train |
baratine/baratine | web/src/main/java/com/caucho/v5/http/dispatch/InvocationDecoder.java | InvocationDecoder.normalizeURI | public void normalizeURI(I invocation, String rawURI)
throws IOException
{
invocation.setRawURI(rawURI);
String uri = normalizeUri(rawURI);
invocation.setURI(uri);
} | java | public void normalizeURI(I invocation, String rawURI)
throws IOException
{
invocation.setRawURI(rawURI);
String uri = normalizeUri(rawURI);
invocation.setURI(uri);
} | [
"public",
"void",
"normalizeURI",
"(",
"I",
"invocation",
",",
"String",
"rawURI",
")",
"throws",
"IOException",
"{",
"invocation",
".",
"setRawURI",
"(",
"rawURI",
")",
";",
"String",
"uri",
"=",
"normalizeUri",
"(",
"rawURI",
")",
";",
"invocation",
".",
... | Just normalize the URI. | [
"Just",
"normalize",
"the",
"URI",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/dispatch/InvocationDecoder.java#L163-L171 | train |
baratine/baratine | web/src/main/java/com/caucho/v5/http/dispatch/InvocationDecoder.java | InvocationDecoder.normalizeUriEscape | private static String normalizeUriEscape(byte []rawUri, int i, int len,
String encoding)
throws IOException
{
ByteToChar converter = allocateConverter();
// XXX: make this configurable
if (encoding == null) {
encoding = "utf-8";
}
try {
... | java | private static String normalizeUriEscape(byte []rawUri, int i, int len,
String encoding)
throws IOException
{
ByteToChar converter = allocateConverter();
// XXX: make this configurable
if (encoding == null) {
encoding = "utf-8";
}
try {
... | [
"private",
"static",
"String",
"normalizeUriEscape",
"(",
"byte",
"[",
"]",
"rawUri",
",",
"int",
"i",
",",
"int",
"len",
",",
"String",
"encoding",
")",
"throws",
"IOException",
"{",
"ByteToChar",
"converter",
"=",
"allocateConverter",
"(",
")",
";",
"// XX... | Converts the escaped URI to a string.
@param rawUri the escaped URI
@param i index into the URI
@param len the length of the uri
@param encoding the character encoding to handle %xx
@return the converted URI | [
"Converts",
"the",
"escaped",
"URI",
"to",
"a",
"string",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/dispatch/InvocationDecoder.java#L310-L345 | train |
baratine/baratine | web/src/main/java/com/caucho/v5/http/dispatch/InvocationDecoder.java | InvocationDecoder.scanUriEscape | private static int scanUriEscape(ByteToChar converter,
byte []rawUri, int i, int len)
throws IOException
{
int ch1 = i < len ? (rawUri[i++] & 0xff) : -1;
if (ch1 == 'u') {
ch1 = i < len ? (rawUri[i++] & 0xff) : -1;
int ch2 = i < len ? (rawUri[i++] & 0xff) : ... | java | private static int scanUriEscape(ByteToChar converter,
byte []rawUri, int i, int len)
throws IOException
{
int ch1 = i < len ? (rawUri[i++] & 0xff) : -1;
if (ch1 == 'u') {
ch1 = i < len ? (rawUri[i++] & 0xff) : -1;
int ch2 = i < len ? (rawUri[i++] & 0xff) : ... | [
"private",
"static",
"int",
"scanUriEscape",
"(",
"ByteToChar",
"converter",
",",
"byte",
"[",
"]",
"rawUri",
",",
"int",
"i",
",",
"int",
"len",
")",
"throws",
"IOException",
"{",
"int",
"ch1",
"=",
"i",
"<",
"len",
"?",
"(",
"rawUri",
"[",
"i",
"++... | Scans the next character from URI, adding it to the converter.
@param converter the byte-to-character converter
@param rawUri the raw URI
@param i index into the URI
@param len the raw URI length
@return next index into the URI | [
"Scans",
"the",
"next",
"character",
"from",
"URI",
"adding",
"it",
"to",
"the",
"converter",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/dispatch/InvocationDecoder.java#L357-L383 | train |
baratine/baratine | web/src/main/java/com/caucho/v5/http/dispatch/InvocationDecoder.java | InvocationDecoder.toHex | private static int toHex(int ch)
{
if (ch >= '0' && ch <= '9')
return ch - '0';
else if (ch >= 'a' && ch <= 'f')
return ch - 'a' + 10;
else if (ch >= 'A' && ch <= 'F')
return ch - 'A' + 10;
else
return -1;
} | java | private static int toHex(int ch)
{
if (ch >= '0' && ch <= '9')
return ch - '0';
else if (ch >= 'a' && ch <= 'f')
return ch - 'a' + 10;
else if (ch >= 'A' && ch <= 'F')
return ch - 'A' + 10;
else
return -1;
} | [
"private",
"static",
"int",
"toHex",
"(",
"int",
"ch",
")",
"{",
"if",
"(",
"ch",
">=",
"'",
"'",
"&&",
"ch",
"<=",
"'",
"'",
")",
"return",
"ch",
"-",
"'",
"'",
";",
"else",
"if",
"(",
"ch",
">=",
"'",
"'",
"&&",
"ch",
"<=",
"'",
"'",
")... | Convert a character to hex | [
"Convert",
"a",
"character",
"to",
"hex"
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/dispatch/InvocationDecoder.java#L388-L398 | train |
baratine/baratine | framework/src/main/java/com/caucho/v5/javac/WorkDir.java | WorkDir.getLocalWorkDir | public static PathImpl getLocalWorkDir(ClassLoader loader)
{
PathImpl path = _localWorkDir.get(loader);
if (path != null)
return path;
path = getTmpWorkDir();
_localWorkDir.setGlobal(path);
try {
path.mkdirs();
} catch (java.io.IOException e) {
}
return path;
... | java | public static PathImpl getLocalWorkDir(ClassLoader loader)
{
PathImpl path = _localWorkDir.get(loader);
if (path != null)
return path;
path = getTmpWorkDir();
_localWorkDir.setGlobal(path);
try {
path.mkdirs();
} catch (java.io.IOException e) {
}
return path;
... | [
"public",
"static",
"PathImpl",
"getLocalWorkDir",
"(",
"ClassLoader",
"loader",
")",
"{",
"PathImpl",
"path",
"=",
"_localWorkDir",
".",
"get",
"(",
"loader",
")",
";",
"if",
"(",
"path",
"!=",
"null",
")",
"return",
"path",
";",
"path",
"=",
"getTmpWorkD... | Returns the local work directory. | [
"Returns",
"the",
"local",
"work",
"directory",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/javac/WorkDir.java#L63-L80 | train |
baratine/baratine | framework/src/main/java/com/caucho/v5/javac/WorkDir.java | WorkDir.setLocalWorkDir | public static void setLocalWorkDir(PathImpl path, ClassLoader loader)
{
try {
if (path instanceof MergePath)
path = ((MergePath) path).getWritePath();
if (path instanceof MemoryPath) {
String pathName = path.getPath();
path = WorkDir.getTmpWorkDir().lookup("qa/" + pathName);
... | java | public static void setLocalWorkDir(PathImpl path, ClassLoader loader)
{
try {
if (path instanceof MergePath)
path = ((MergePath) path).getWritePath();
if (path instanceof MemoryPath) {
String pathName = path.getPath();
path = WorkDir.getTmpWorkDir().lookup("qa/" + pathName);
... | [
"public",
"static",
"void",
"setLocalWorkDir",
"(",
"PathImpl",
"path",
",",
"ClassLoader",
"loader",
")",
"{",
"try",
"{",
"if",
"(",
"path",
"instanceof",
"MergePath",
")",
"path",
"=",
"(",
"(",
"MergePath",
")",
"path",
")",
".",
"getWritePath",
"(",
... | Sets the work dir. | [
"Sets",
"the",
"work",
"dir",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/javac/WorkDir.java#L111-L129 | train |
baratine/baratine | core/src/main/java/com/caucho/v5/convert/ConvertManagerInject.java | ConvertManagerInject.converter | @Override
public <S, T> Convert<S, T> converter(Class<S> source, Class<T> target)
{
ConvertFrom<S> convertType = getOrCreate(source);
return convertType.converter(target);
} | java | @Override
public <S, T> Convert<S, T> converter(Class<S> source, Class<T> target)
{
ConvertFrom<S> convertType = getOrCreate(source);
return convertType.converter(target);
} | [
"@",
"Override",
"public",
"<",
"S",
",",
"T",
">",
"Convert",
"<",
"S",
",",
"T",
">",
"converter",
"(",
"Class",
"<",
"S",
">",
"source",
",",
"Class",
"<",
"T",
">",
"target",
")",
"{",
"ConvertFrom",
"<",
"S",
">",
"convertType",
"=",
"getOrC... | Returns the converter for a given source type and target type. | [
"Returns",
"the",
"converter",
"for",
"a",
"given",
"source",
"type",
"and",
"target",
"type",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/convert/ConvertManagerInject.java#L117-L123 | train |
baratine/baratine | core/src/main/java/com/caucho/v5/convert/ConvertManagerInject.java | ConvertManagerInject.getOrCreate | private <S> ConvertManagerTypeImpl<S> getOrCreate(Class<S> sourceType)
{
ConvertManagerTypeImpl<S> convertType
= (ConvertManagerTypeImpl<S>) _convertMap.get(sourceType);
if (convertType != null) {
return convertType;
}
convertType = new ConvertManagerTypeImpl<>(sourceType);
... | java | private <S> ConvertManagerTypeImpl<S> getOrCreate(Class<S> sourceType)
{
ConvertManagerTypeImpl<S> convertType
= (ConvertManagerTypeImpl<S>) _convertMap.get(sourceType);
if (convertType != null) {
return convertType;
}
convertType = new ConvertManagerTypeImpl<>(sourceType);
... | [
"private",
"<",
"S",
">",
"ConvertManagerTypeImpl",
"<",
"S",
">",
"getOrCreate",
"(",
"Class",
"<",
"S",
">",
"sourceType",
")",
"{",
"ConvertManagerTypeImpl",
"<",
"S",
">",
"convertType",
"=",
"(",
"ConvertManagerTypeImpl",
"<",
"S",
">",
")",
"_convertMa... | Returns the ConvertManagerTypeImpl for a given source type. | [
"Returns",
"the",
"ConvertManagerTypeImpl",
"for",
"a",
"given",
"source",
"type",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/convert/ConvertManagerInject.java#L134-L148 | train |
baratine/baratine | core/src/main/java/com/caucho/v5/bytecode/CodeVisitor.java | CodeVisitor.nextOffset | protected int nextOffset()
{
int opcode = getCode()[_offset] & 0xff;
int length = OP_LEN[opcode];
switch (opcode) {
case GOTO:
case GOTO_W:
case RET:
case IRETURN:
case LRETURN:
case FRETURN:
case DRETURN:
case ARETURN:
case RETURN:
case ATHROW:
return -... | java | protected int nextOffset()
{
int opcode = getCode()[_offset] & 0xff;
int length = OP_LEN[opcode];
switch (opcode) {
case GOTO:
case GOTO_W:
case RET:
case IRETURN:
case LRETURN:
case FRETURN:
case DRETURN:
case ARETURN:
case RETURN:
case ATHROW:
return -... | [
"protected",
"int",
"nextOffset",
"(",
")",
"{",
"int",
"opcode",
"=",
"getCode",
"(",
")",
"[",
"_offset",
"]",
"&",
"0xff",
";",
"int",
"length",
"=",
"OP_LEN",
"[",
"opcode",
"]",
";",
"switch",
"(",
"opcode",
")",
"{",
"case",
"GOTO",
":",
"cas... | Goes to the next opcode. | [
"Goes",
"to",
"the",
"next",
"opcode",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/CodeVisitor.java#L141-L205 | train |
baratine/baratine | core/src/main/java/com/caucho/v5/bytecode/CodeVisitor.java | CodeVisitor.isBranch | public boolean isBranch()
{
switch (getOpcode()) {
case IFNULL:
case IFNONNULL:
case IFNE:
case IFEQ:
case IFLT:
case IFGE:
case IFGT:
case IFLE:
case IF_ICMPEQ:
case IF_ICMPNE:
case IF_ICMPLT:
case IF_ICMPGE:
case IF_ICMPGT:
case IF_ICMPLE:
case IF_ACMP... | java | public boolean isBranch()
{
switch (getOpcode()) {
case IFNULL:
case IFNONNULL:
case IFNE:
case IFEQ:
case IFLT:
case IFGE:
case IFGT:
case IFLE:
case IF_ICMPEQ:
case IF_ICMPNE:
case IF_ICMPLT:
case IF_ICMPGE:
case IF_ICMPGT:
case IF_ICMPLE:
case IF_ACMP... | [
"public",
"boolean",
"isBranch",
"(",
")",
"{",
"switch",
"(",
"getOpcode",
"(",
")",
")",
"{",
"case",
"IFNULL",
":",
"case",
"IFNONNULL",
":",
"case",
"IFNE",
":",
"case",
"IFEQ",
":",
"case",
"IFLT",
":",
"case",
"IFGE",
":",
"case",
"IFGT",
":",
... | Returns true for a simple branch, i.e. a branch with a simple target. | [
"Returns",
"true",
"for",
"a",
"simple",
"branch",
"i",
".",
"e",
".",
"a",
"branch",
"with",
"a",
"simple",
"target",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/CodeVisitor.java#L210-L237 | train |
baratine/baratine | core/src/main/java/com/caucho/v5/bytecode/CodeVisitor.java | CodeVisitor.getConstantArg | public ConstantPoolEntry getConstantArg()
{
switch (getOpcode()) {
case LDC:
return _javaClass.getConstantPool().getEntry(getByteArg());
case LDC_W:
return _javaClass.getConstantPool().getEntry(getShortArg());
default:
throw new UnsupportedOperationException();
}
} | java | public ConstantPoolEntry getConstantArg()
{
switch (getOpcode()) {
case LDC:
return _javaClass.getConstantPool().getEntry(getByteArg());
case LDC_W:
return _javaClass.getConstantPool().getEntry(getShortArg());
default:
throw new UnsupportedOperationException();
}
} | [
"public",
"ConstantPoolEntry",
"getConstantArg",
"(",
")",
"{",
"switch",
"(",
"getOpcode",
"(",
")",
")",
"{",
"case",
"LDC",
":",
"return",
"_javaClass",
".",
"getConstantPool",
"(",
")",
".",
"getEntry",
"(",
"getByteArg",
"(",
")",
")",
";",
"case",
... | Returns a constant pool item. | [
"Returns",
"a",
"constant",
"pool",
"item",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/CodeVisitor.java#L339-L351 | train |
baratine/baratine | core/src/main/java/com/caucho/v5/bytecode/CodeVisitor.java | CodeVisitor.getShort | public int getShort(int offset)
{
int b0 = getCode()[offset + 0] & 0xff;
int b1 = getCode()[offset + 1] & 0xff;
return (short) ((b0 << 8) + b1);
} | java | public int getShort(int offset)
{
int b0 = getCode()[offset + 0] & 0xff;
int b1 = getCode()[offset + 1] & 0xff;
return (short) ((b0 << 8) + b1);
} | [
"public",
"int",
"getShort",
"(",
"int",
"offset",
")",
"{",
"int",
"b0",
"=",
"getCode",
"(",
")",
"[",
"offset",
"+",
"0",
"]",
"&",
"0xff",
";",
"int",
"b1",
"=",
"getCode",
"(",
")",
"[",
"offset",
"+",
"1",
"]",
"&",
"0xff",
";",
"return",... | Reads a short value. | [
"Reads",
"a",
"short",
"value",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/CodeVisitor.java#L444-L450 | train |
baratine/baratine | core/src/main/java/com/caucho/v5/bytecode/CodeVisitor.java | CodeVisitor.getInt | public int getInt(int offset)
{
byte []code = getCode();
int b0 = code[offset + 0] & 0xff;
int b1 = code[offset + 1] & 0xff;
int b2 = code[offset + 2] & 0xff;
int b3 = code[offset + 3] & 0xff;
return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3;
} | java | public int getInt(int offset)
{
byte []code = getCode();
int b0 = code[offset + 0] & 0xff;
int b1 = code[offset + 1] & 0xff;
int b2 = code[offset + 2] & 0xff;
int b3 = code[offset + 3] & 0xff;
return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3;
} | [
"public",
"int",
"getInt",
"(",
"int",
"offset",
")",
"{",
"byte",
"[",
"]",
"code",
"=",
"getCode",
"(",
")",
";",
"int",
"b0",
"=",
"code",
"[",
"offset",
"+",
"0",
"]",
"&",
"0xff",
";",
"int",
"b1",
"=",
"code",
"[",
"offset",
"+",
"1",
"... | Reads an int argument. | [
"Reads",
"an",
"int",
"argument",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/CodeVisitor.java#L455-L465 | train |
baratine/baratine | core/src/main/java/com/caucho/v5/bytecode/CodeVisitor.java | CodeVisitor.analyze | private void analyze(Analyzer analyzer,
boolean allowFlow,
IntArray pendingTargets,
IntArray completedTargets)
throws Exception
{
pending:
while (pendingTargets.size() > 0) {
int pc = pendingTargets.pop();
if (allowFlow) {
... | java | private void analyze(Analyzer analyzer,
boolean allowFlow,
IntArray pendingTargets,
IntArray completedTargets)
throws Exception
{
pending:
while (pendingTargets.size() > 0) {
int pc = pendingTargets.pop();
if (allowFlow) {
... | [
"private",
"void",
"analyze",
"(",
"Analyzer",
"analyzer",
",",
"boolean",
"allowFlow",
",",
"IntArray",
"pendingTargets",
",",
"IntArray",
"completedTargets",
")",
"throws",
"Exception",
"{",
"pending",
":",
"while",
"(",
"pendingTargets",
".",
"size",
"(",
")"... | Analyzes the code for a basic block. | [
"Analyzes",
"the",
"code",
"for",
"a",
"basic",
"block",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/CodeVisitor.java#L512-L563 | train |
baratine/baratine | web/src/main/java/com/caucho/v5/network/NetworkSystem.java | NetworkSystem.currentSelfServer | public static ServerBartender currentSelfServer()
{
NetworkSystem clusterService = current();
if (clusterService == null)
throw new IllegalStateException(L.l("{0} is not available in this context",
NetworkSystem.class.getSimpleName()));
return clus... | java | public static ServerBartender currentSelfServer()
{
NetworkSystem clusterService = current();
if (clusterService == null)
throw new IllegalStateException(L.l("{0} is not available in this context",
NetworkSystem.class.getSimpleName()));
return clus... | [
"public",
"static",
"ServerBartender",
"currentSelfServer",
"(",
")",
"{",
"NetworkSystem",
"clusterService",
"=",
"current",
"(",
")",
";",
"if",
"(",
"clusterService",
"==",
"null",
")",
"throw",
"new",
"IllegalStateException",
"(",
"L",
".",
"l",
"(",
"\"{0... | Returns the current network service. | [
"Returns",
"the",
"current",
"network",
"service",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/network/NetworkSystem.java#L135-L144 | train |
baratine/baratine | web/src/main/java/com/caucho/v5/network/NetworkSystem.java | NetworkSystem.findConnectionByThreadId | public ConnectionTcp findConnectionByThreadId(long threadId)
{
for (PortTcp listener : getPorts()) {
ConnectionTcp conn = listener.findConnectionByThreadId(threadId);
if (conn != null)
return conn;
}
return null;
} | java | public ConnectionTcp findConnectionByThreadId(long threadId)
{
for (PortTcp listener : getPorts()) {
ConnectionTcp conn = listener.findConnectionByThreadId(threadId);
if (conn != null)
return conn;
}
return null;
} | [
"public",
"ConnectionTcp",
"findConnectionByThreadId",
"(",
"long",
"threadId",
")",
"{",
"for",
"(",
"PortTcp",
"listener",
":",
"getPorts",
"(",
")",
")",
"{",
"ConnectionTcp",
"conn",
"=",
"listener",
".",
"findConnectionByThreadId",
"(",
"threadId",
")",
";"... | Finds the TcpConnection given the threadId | [
"Finds",
"the",
"TcpConnection",
"given",
"the",
"threadId"
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/network/NetworkSystem.java#L325-L335 | train |
baratine/baratine | framework/src/main/java/com/caucho/v5/bartender/pod/PodHeartbeatImpl.java | PodHeartbeatImpl.updateClusterRoot | private void updateClusterRoot()
{
ArrayList<ServerHeartbeat> serverList = new ArrayList<>();
for (ServerHeartbeat server : _serverSelf.getCluster().getServers()) {
serverList.add(server);
}
Collections.sort(serverList, (x,y)->compareClusterRoot(x,y));
UpdatePodBuilder builder... | java | private void updateClusterRoot()
{
ArrayList<ServerHeartbeat> serverList = new ArrayList<>();
for (ServerHeartbeat server : _serverSelf.getCluster().getServers()) {
serverList.add(server);
}
Collections.sort(serverList, (x,y)->compareClusterRoot(x,y));
UpdatePodBuilder builder... | [
"private",
"void",
"updateClusterRoot",
"(",
")",
"{",
"ArrayList",
"<",
"ServerHeartbeat",
">",
"serverList",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"ServerHeartbeat",
"server",
":",
"_serverSelf",
".",
"getCluster",
"(",
")",
".",
"getSe... | Compare and merge the cluster_root with an update.
cluster_root is a special case because the root cluster decides on
the owning server for the entire cluster. | [
"Compare",
"and",
"merge",
"the",
"cluster_root",
"with",
"an",
"update",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/bartender/pod/PodHeartbeatImpl.java#L447-L476 | train |
baratine/baratine | framework/src/main/java/com/caucho/v5/bartender/pod/PodHeartbeatImpl.java | PodHeartbeatImpl.onJoinStart | void onJoinStart()
{
//long now = CurrentTime.getCurrentTime();
ArrayList<UpdatePod> updatePods = new ArrayList<>();
updateClusterRoot();
/*
for (UpdatePod updatePod : _podUpdateMap.values()) {
if (updatePod.getSequence() == 0) {
updatePods.add(new UpdatePod(updatePod, now));
... | java | void onJoinStart()
{
//long now = CurrentTime.getCurrentTime();
ArrayList<UpdatePod> updatePods = new ArrayList<>();
updateClusterRoot();
/*
for (UpdatePod updatePod : _podUpdateMap.values()) {
if (updatePod.getSequence() == 0) {
updatePods.add(new UpdatePod(updatePod, now));
... | [
"void",
"onJoinStart",
"(",
")",
"{",
"//long now = CurrentTime.getCurrentTime();",
"ArrayList",
"<",
"UpdatePod",
">",
"updatePods",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"updateClusterRoot",
"(",
")",
";",
"/*\n for (UpdatePod updatePod : _podUpdateMap.values... | Update the sequence for all init pods after the join has completed. | [
"Update",
"the",
"sequence",
"for",
"all",
"init",
"pods",
"after",
"the",
"join",
"has",
"completed",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/bartender/pod/PodHeartbeatImpl.java#L538-L566 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/Row.java | Row.keyColumnStart | private int keyColumnStart()
{
int offset = 0;
for (int i = 0; i < _columns.length; i++) {
if (offset == _keyStart) {
return i;
}
offset += _columns[i].length();
}
throw new IllegalStateException();
} | java | private int keyColumnStart()
{
int offset = 0;
for (int i = 0; i < _columns.length; i++) {
if (offset == _keyStart) {
return i;
}
offset += _columns[i].length();
}
throw new IllegalStateException();
} | [
"private",
"int",
"keyColumnStart",
"(",
")",
"{",
"int",
"offset",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"_columns",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"offset",
"==",
"_keyStart",
")",
"{",
"return",
... | First key column index. | [
"First",
"key",
"column",
"index",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/Row.java#L255-L268 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/Row.java | Row.keyColumnEnd | private int keyColumnEnd()
{
int offset = 0;
for (int i = 0; i < _columns.length; i++) {
if (offset == _keyStart + _keyLength) {
return i;
}
offset += _columns[i].length();
}
if (offset == _keyStart + _keyLength) {
return _columns.length;
}
... | java | private int keyColumnEnd()
{
int offset = 0;
for (int i = 0; i < _columns.length; i++) {
if (offset == _keyStart + _keyLength) {
return i;
}
offset += _columns[i].length();
}
if (offset == _keyStart + _keyLength) {
return _columns.length;
}
... | [
"private",
"int",
"keyColumnEnd",
"(",
")",
"{",
"int",
"offset",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"_columns",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"offset",
"==",
"_keyStart",
"+",
"_keyLength",
")",... | End key column index, the index after the final key. | [
"End",
"key",
"column",
"index",
"the",
"index",
"after",
"the",
"final",
"key",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/Row.java#L273-L290 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/Row.java | Row.autoFill | public void autoFill(RowCursor cursor)
{
for (Column col : columns()) {
col.autoFill(cursor.buffer(), 0);
}
} | java | public void autoFill(RowCursor cursor)
{
for (Column col : columns()) {
col.autoFill(cursor.buffer(), 0);
}
} | [
"public",
"void",
"autoFill",
"(",
"RowCursor",
"cursor",
")",
"{",
"for",
"(",
"Column",
"col",
":",
"columns",
"(",
")",
")",
"{",
"col",
".",
"autoFill",
"(",
"cursor",
".",
"buffer",
"(",
")",
",",
"0",
")",
";",
"}",
"}"
] | autofill generated values | [
"autofill",
"generated",
"values"
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/Row.java#L327-L332 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/Row.java | Row.readStream | void readStream(InputStream is,
byte[] buffer, int offset,
RowCursor cursor)
throws IOException
{
for (Column column : columns()) {
column.readStream(is, buffer, offset, cursor);
}
for (Column column : blobs()) {
column.readStreamBlob(is, buffer, o... | java | void readStream(InputStream is,
byte[] buffer, int offset,
RowCursor cursor)
throws IOException
{
for (Column column : columns()) {
column.readStream(is, buffer, offset, cursor);
}
for (Column column : blobs()) {
column.readStreamBlob(is, buffer, o... | [
"void",
"readStream",
"(",
"InputStream",
"is",
",",
"byte",
"[",
"]",
"buffer",
",",
"int",
"offset",
",",
"RowCursor",
"cursor",
")",
"throws",
"IOException",
"{",
"for",
"(",
"Column",
"column",
":",
"columns",
"(",
")",
")",
"{",
"column",
".",
"re... | Fills a cursor given an input stream
@param is stream containing the serialized row
@param buffer the cursor's data buffer for the fixed part of the stream
@param offset the cursor's offset for the fixed part of the stream
@param cursor the cursor itself for holding the blob
@throws IOException | [
"Fills",
"a",
"cursor",
"given",
"an",
"input",
"stream"
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/Row.java#L432-L444 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/Row.java | Row.readCheckpoint | int readCheckpoint(ReadStream is,
byte[] blockBuffer,
int rowOffset,
int blobTail)
throws IOException
{
int rowLength = length();
if (rowOffset < blobTail) {
return -1;
}
for (Column column : columns()) {
blobTai... | java | int readCheckpoint(ReadStream is,
byte[] blockBuffer,
int rowOffset,
int blobTail)
throws IOException
{
int rowLength = length();
if (rowOffset < blobTail) {
return -1;
}
for (Column column : columns()) {
blobTai... | [
"int",
"readCheckpoint",
"(",
"ReadStream",
"is",
",",
"byte",
"[",
"]",
"blockBuffer",
",",
"int",
"rowOffset",
",",
"int",
"blobTail",
")",
"throws",
"IOException",
"{",
"int",
"rowLength",
"=",
"length",
"(",
")",
";",
"if",
"(",
"rowOffset",
"<",
"bl... | Reads column-specific data like blobs from the checkpoint.
Returns -1 if the data does not fit into the current block. | [
"Reads",
"column",
"-",
"specific",
"data",
"like",
"blobs",
"from",
"the",
"checkpoint",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/Row.java#L494-L514 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/Row.java | Row.validate | public void validate(byte[] buffer, int rowOffset, int rowHead, int blobTail)
{
for (Column column : columns()) {
column.validate(buffer, rowOffset, rowHead, blobTail);
}
} | java | public void validate(byte[] buffer, int rowOffset, int rowHead, int blobTail)
{
for (Column column : columns()) {
column.validate(buffer, rowOffset, rowHead, blobTail);
}
} | [
"public",
"void",
"validate",
"(",
"byte",
"[",
"]",
"buffer",
",",
"int",
"rowOffset",
",",
"int",
"rowHead",
",",
"int",
"blobTail",
")",
"{",
"for",
"(",
"Column",
"column",
":",
"columns",
"(",
")",
")",
"{",
"column",
".",
"validate",
"(",
"buff... | Validates the row, checking for corruption. | [
"Validates",
"the",
"row",
"checking",
"for",
"corruption",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/Row.java#L519-L524 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/Row.java | Row.incrementKey | static void incrementKey(byte[] key)
{
for (int i = key.length - 1; i >= 0; i--) {
int v = key[i] & 0xff;
if (v < 0xff) {
key[i] = (byte) (v + 1);
return;
}
key[i] = 0;
}
} | java | static void incrementKey(byte[] key)
{
for (int i = key.length - 1; i >= 0; i--) {
int v = key[i] & 0xff;
if (v < 0xff) {
key[i] = (byte) (v + 1);
return;
}
key[i] = 0;
}
} | [
"static",
"void",
"incrementKey",
"(",
"byte",
"[",
"]",
"key",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"key",
".",
"length",
"-",
"1",
";",
"i",
">=",
"0",
";",
"i",
"--",
")",
"{",
"int",
"v",
"=",
"key",
"[",
"i",
"]",
"&",
"0xff",
";",
... | Increment a key. | [
"Increment",
"a",
"key",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/Row.java#L545-L557 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/Row.java | Row.decrementKey | static void decrementKey(byte[] key)
{
for (int i = key.length - 1; i >= 0; i--) {
int v = key[i] & 0xff;
if (v > 0) {
key[i] = (byte) (v - 1);
return;
}
key[i] = (byte) 0xff;
}
} | java | static void decrementKey(byte[] key)
{
for (int i = key.length - 1; i >= 0; i--) {
int v = key[i] & 0xff;
if (v > 0) {
key[i] = (byte) (v - 1);
return;
}
key[i] = (byte) 0xff;
}
} | [
"static",
"void",
"decrementKey",
"(",
"byte",
"[",
"]",
"key",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"key",
".",
"length",
"-",
"1",
";",
"i",
">=",
"0",
";",
"i",
"--",
")",
"{",
"int",
"v",
"=",
"key",
"[",
"i",
"]",
"&",
"0xff",
";",
... | Decrement a key. | [
"Decrement",
"a",
"key",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/Row.java#L562-L574 | train |
baratine/baratine | core/src/main/java/com/caucho/v5/amp/thread/ThreadLauncherBase.java | ThreadLauncherBase.setThreadMax | public void setThreadMax(int max)
{
if (max == _threadMax) {
// avoid update() overhead if unchanged
return;
}
if (max <= 0) {
max = DEFAULT_THREAD_MAX;
}
if (max < _idleMin)
throw new ConfigException(L.l("IdleMin ({0}) must be less than ThreadMax ({1})", _idleMin... | java | public void setThreadMax(int max)
{
if (max == _threadMax) {
// avoid update() overhead if unchanged
return;
}
if (max <= 0) {
max = DEFAULT_THREAD_MAX;
}
if (max < _idleMin)
throw new ConfigException(L.l("IdleMin ({0}) must be less than ThreadMax ({1})", _idleMin... | [
"public",
"void",
"setThreadMax",
"(",
"int",
"max",
")",
"{",
"if",
"(",
"max",
"==",
"_threadMax",
")",
"{",
"// avoid update() overhead if unchanged",
"return",
";",
"}",
"if",
"(",
"max",
"<=",
"0",
")",
"{",
"max",
"=",
"DEFAULT_THREAD_MAX",
";",
"}",... | Sets the maximum number of threads. | [
"Sets",
"the",
"maximum",
"number",
"of",
"threads",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/amp/thread/ThreadLauncherBase.java#L122-L143 | train |
baratine/baratine | core/src/main/java/com/caucho/v5/amp/thread/ThreadLauncherBase.java | ThreadLauncherBase.setIdleMax | public void setIdleMax(int max)
{
if (max == _idleMax) {
// avoid update() overhead if unchanged
return;
}
if (max <= 0) {
max = DEFAULT_IDLE_MAX;
}
if (_threadMax < max)
throw new ConfigException(L.l("IdleMax ({0}) must be less than ThreadMax ({1})", max, _threadM... | java | public void setIdleMax(int max)
{
if (max == _idleMax) {
// avoid update() overhead if unchanged
return;
}
if (max <= 0) {
max = DEFAULT_IDLE_MAX;
}
if (_threadMax < max)
throw new ConfigException(L.l("IdleMax ({0}) must be less than ThreadMax ({1})", max, _threadM... | [
"public",
"void",
"setIdleMax",
"(",
"int",
"max",
")",
"{",
"if",
"(",
"max",
"==",
"_idleMax",
")",
"{",
"// avoid update() overhead if unchanged",
"return",
";",
"}",
"if",
"(",
"max",
"<=",
"0",
")",
"{",
"max",
"=",
"DEFAULT_IDLE_MAX",
";",
"}",
"if... | Sets the maximum number of idle threads. | [
"Sets",
"the",
"maximum",
"number",
"of",
"idle",
"threads",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/amp/thread/ThreadLauncherBase.java#L188-L206 | train |
baratine/baratine | core/src/main/java/com/caucho/v5/amp/thread/ThreadLauncherBase.java | ThreadLauncherBase.isIdleExpire | public boolean isIdleExpire()
{
if (! _lifecycle.isActive())
return true;
long now = currentTimeActual();
long idleExpire = _threadIdleExpireTime.get();
int idleCount = _idleCount.get();
// if idle queue is full and the expire is set, return and exit
if (_idleMin < idleCo... | java | public boolean isIdleExpire()
{
if (! _lifecycle.isActive())
return true;
long now = currentTimeActual();
long idleExpire = _threadIdleExpireTime.get();
int idleCount = _idleCount.get();
// if idle queue is full and the expire is set, return and exit
if (_idleMin < idleCo... | [
"public",
"boolean",
"isIdleExpire",
"(",
")",
"{",
"if",
"(",
"!",
"_lifecycle",
".",
"isActive",
"(",
")",
")",
"return",
"true",
";",
"long",
"now",
"=",
"currentTimeActual",
"(",
")",
";",
"long",
"idleExpire",
"=",
"_threadIdleExpireTime",
".",
"get",... | Returns true if the thread should expire instead of going to the idle state. | [
"Returns",
"true",
"if",
"the",
"thread",
"should",
"expire",
"instead",
"of",
"going",
"to",
"the",
"idle",
"state",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/amp/thread/ThreadLauncherBase.java#L374-L406 | train |
baratine/baratine | framework/src/main/java/com/caucho/v5/vfs/VfsStringReader.java | VfsStringReader.open | public static ReadStreamOld open(String string)
{
VfsStringReader ss = new VfsStringReader(string);
ReadStreamOld rs = new ReadStreamOld(ss);
try {
rs.setEncoding("UTF-8");
} catch (Exception e) {
}
//rs.setPath(new NullPath("string"));
return rs;
} | java | public static ReadStreamOld open(String string)
{
VfsStringReader ss = new VfsStringReader(string);
ReadStreamOld rs = new ReadStreamOld(ss);
try {
rs.setEncoding("UTF-8");
} catch (Exception e) {
}
//rs.setPath(new NullPath("string"));
return rs;
} | [
"public",
"static",
"ReadStreamOld",
"open",
"(",
"String",
"string",
")",
"{",
"VfsStringReader",
"ss",
"=",
"new",
"VfsStringReader",
"(",
"string",
")",
";",
"ReadStreamOld",
"rs",
"=",
"new",
"ReadStreamOld",
"(",
"ss",
")",
";",
"try",
"{",
"rs",
".",... | Creates a new ReadStream reading bytes from the given string.
@param string the source string.
@return a ReadStream reading from the string. | [
"Creates",
"a",
"new",
"ReadStream",
"reading",
"bytes",
"from",
"the",
"given",
"string",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/VfsStringReader.java#L59-L69 | train |
baratine/baratine | core/src/main/java/com/caucho/v5/io/TempBuffers.java | TempBuffers.clearFreeLists | public static void clearFreeLists()
{
while (_freeStandard.allocate() != null) {
}
while (_freeSmall.allocate() != null) {
}
while (_freeLarge.allocate() != null) {
}
} | java | public static void clearFreeLists()
{
while (_freeStandard.allocate() != null) {
}
while (_freeSmall.allocate() != null) {
}
while (_freeLarge.allocate() != null) {
}
} | [
"public",
"static",
"void",
"clearFreeLists",
"(",
")",
"{",
"while",
"(",
"_freeStandard",
".",
"allocate",
"(",
")",
"!=",
"null",
")",
"{",
"}",
"while",
"(",
"_freeSmall",
".",
"allocate",
"(",
")",
"!=",
"null",
")",
"{",
"}",
"while",
"(",
"_fr... | Free data for OOM. | [
"Free",
"data",
"for",
"OOM",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/io/TempBuffers.java#L111-L121 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/PageLeafImpl.java | PageLeafImpl.writeImpl | @Override
@InService(PageServiceImpl.class)
void writeImpl(TableKelp table,
PageServiceImpl pageServiceImpl,
TableWriterService readWrite,
SegmentStream sOut,
long oldSequence,
int saveLength,
int saveTail)
{
... | java | @Override
@InService(PageServiceImpl.class)
void writeImpl(TableKelp table,
PageServiceImpl pageServiceImpl,
TableWriterService readWrite,
SegmentStream sOut,
long oldSequence,
int saveLength,
int saveTail)
{
... | [
"@",
"Override",
"@",
"InService",
"(",
"PageServiceImpl",
".",
"class",
")",
"void",
"writeImpl",
"(",
"TableKelp",
"table",
",",
"PageServiceImpl",
"pageServiceImpl",
",",
"TableWriterService",
"readWrite",
",",
"SegmentStream",
"sOut",
",",
"long",
"oldSequence",... | Sends a write-request to the sequence writer for the page.
Called in the TableServerImpl thread. | [
"Sends",
"a",
"write",
"-",
"request",
"to",
"the",
"sequence",
"writer",
"for",
"the",
"page",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/PageLeafImpl.java#L715-L774 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/PageLeafImpl.java | PageLeafImpl.writeCheckpoint | @Override
@InService(TableWriterService.class)
public Page writeCheckpoint(TableKelp table,
OutSegment sOut,
long oldSequence,
int saveLength,
int saveTail,
int saveS... | java | @Override
@InService(TableWriterService.class)
public Page writeCheckpoint(TableKelp table,
OutSegment sOut,
long oldSequence,
int saveLength,
int saveTail,
int saveS... | [
"@",
"Override",
"@",
"InService",
"(",
"TableWriterService",
".",
"class",
")",
"public",
"Page",
"writeCheckpoint",
"(",
"TableKelp",
"table",
",",
"OutSegment",
"sOut",
",",
"long",
"oldSequence",
",",
"int",
"saveLength",
",",
"int",
"saveTail",
",",
"int"... | Callback from the writer and gc to write the page. | [
"Callback",
"from",
"the",
"writer",
"and",
"gc",
"to",
"write",
"the",
"page",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/PageLeafImpl.java#L829-L904 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/PageLeafImpl.java | PageLeafImpl.compact | private PageLeafImpl compact(TableKelp table)
{
long now = CurrentTime.currentTime() / 1000;
Set<PageLeafEntry> entries = fillEntries(table);
ArrayList<BlockLeaf> blocks = new ArrayList<>();
BlockLeaf block = new BlockLeaf(getId());
blocks.add(block);
Row row = table.row();... | java | private PageLeafImpl compact(TableKelp table)
{
long now = CurrentTime.currentTime() / 1000;
Set<PageLeafEntry> entries = fillEntries(table);
ArrayList<BlockLeaf> blocks = new ArrayList<>();
BlockLeaf block = new BlockLeaf(getId());
blocks.add(block);
Row row = table.row();... | [
"private",
"PageLeafImpl",
"compact",
"(",
"TableKelp",
"table",
")",
"{",
"long",
"now",
"=",
"CurrentTime",
".",
"currentTime",
"(",
")",
"/",
"1000",
";",
"Set",
"<",
"PageLeafEntry",
">",
"entries",
"=",
"fillEntries",
"(",
"table",
")",
";",
"ArrayLis... | Compacts the leaf by rebuilding the delta entries and discarding obsolete
removed entries. | [
"Compacts",
"the",
"leaf",
"by",
"rebuilding",
"the",
"delta",
"entries",
"and",
"discarding",
"obsolete",
"removed",
"entries",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/PageLeafImpl.java#L923-L967 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/PageLeafImpl.java | PageLeafImpl.writeCheckpointFull | @InService(SegmentServiceImpl.class)
private Type writeCheckpointFull(TableKelp table,
OutputStream os,
int saveTail)
throws IOException
{
os.write(getMinKey());
os.write(getMaxKey());
/* db/2310
if (Arrays.equals(getMinK... | java | @InService(SegmentServiceImpl.class)
private Type writeCheckpointFull(TableKelp table,
OutputStream os,
int saveTail)
throws IOException
{
os.write(getMinKey());
os.write(getMaxKey());
/* db/2310
if (Arrays.equals(getMinK... | [
"@",
"InService",
"(",
"SegmentServiceImpl",
".",
"class",
")",
"private",
"Type",
"writeCheckpointFull",
"(",
"TableKelp",
"table",
",",
"OutputStream",
"os",
",",
"int",
"saveTail",
")",
"throws",
"IOException",
"{",
"os",
".",
"write",
"(",
"getMinKey",
"("... | Writes the page to the output stream as a full checkpoint.
The checkpoint for a leaf page is the full page blocks (row and inline blob),
with the free-space gap removed. A checkpoint restore restores the blocks
exactly. | [
"Writes",
"the",
"page",
"to",
"the",
"output",
"stream",
"as",
"a",
"full",
"checkpoint",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/PageLeafImpl.java#L976-L1009 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/PageLeafImpl.java | PageLeafImpl.readCheckpointFull | @InService(PageServiceImpl.class)
static PageLeafImpl readCheckpointFull(TableKelp table,
PageServiceImpl pageActor,
InputStream is,
int pid,
int nextPid... | java | @InService(PageServiceImpl.class)
static PageLeafImpl readCheckpointFull(TableKelp table,
PageServiceImpl pageActor,
InputStream is,
int pid,
int nextPid... | [
"@",
"InService",
"(",
"PageServiceImpl",
".",
"class",
")",
"static",
"PageLeafImpl",
"readCheckpointFull",
"(",
"TableKelp",
"table",
",",
"PageServiceImpl",
"pageActor",
",",
"InputStream",
"is",
",",
"int",
"pid",
",",
"int",
"nextPid",
",",
"long",
"sequenc... | Reads a full checkpoint entry into the page. | [
"Reads",
"a",
"full",
"checkpoint",
"entry",
"into",
"the",
"page",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/PageLeafImpl.java#L1014-L1055 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/PageLeafImpl.java | PageLeafImpl.readCheckpointDelta | void readCheckpointDelta(TableKelp table,
PageServiceImpl pageActor,
ReadStream is,
int length)
throws IOException
{
Row row = table.row();
// int keyLength = row.getKeyLength();
int removeLength = row.removeLength()... | java | void readCheckpointDelta(TableKelp table,
PageServiceImpl pageActor,
ReadStream is,
int length)
throws IOException
{
Row row = table.row();
// int keyLength = row.getKeyLength();
int removeLength = row.removeLength()... | [
"void",
"readCheckpointDelta",
"(",
"TableKelp",
"table",
",",
"PageServiceImpl",
"pageActor",
",",
"ReadStream",
"is",
",",
"int",
"length",
")",
"throws",
"IOException",
"{",
"Row",
"row",
"=",
"table",
".",
"row",
"(",
")",
";",
"// int keyLength = row.getKey... | Reads a delta entry from the checkpoint. | [
"Reads",
"a",
"delta",
"entry",
"from",
"the",
"checkpoint",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/PageLeafImpl.java#L1060-L1126 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/PageLeafImpl.java | PageLeafImpl.validate | void validate(TableKelp table)
{
if (! table.isValidate()) {
return;
}
Row row = table.row();
for (BlockLeaf block : _blocks) {
block.validateBlock(row);
}
} | java | void validate(TableKelp table)
{
if (! table.isValidate()) {
return;
}
Row row = table.row();
for (BlockLeaf block : _blocks) {
block.validateBlock(row);
}
} | [
"void",
"validate",
"(",
"TableKelp",
"table",
")",
"{",
"if",
"(",
"!",
"table",
".",
"isValidate",
"(",
")",
")",
"{",
"return",
";",
"}",
"Row",
"row",
"=",
"table",
".",
"row",
"(",
")",
";",
"for",
"(",
"BlockLeaf",
"block",
":",
"_blocks",
... | Validates the leaf blocks | [
"Validates",
"the",
"leaf",
"blocks"
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/PageLeafImpl.java#L1185-L1196 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/PageLeafStub.java | PageLeafStub.addDelta | void addDelta(TableKelp db, int offset, int length)
{
if (_delta == null) {
_delta = new int[2 * db.getDeltaMax()];
}
_delta[_deltaTail++] = offset;
_delta[_deltaTail++] = length;
} | java | void addDelta(TableKelp db, int offset, int length)
{
if (_delta == null) {
_delta = new int[2 * db.getDeltaMax()];
}
_delta[_deltaTail++] = offset;
_delta[_deltaTail++] = length;
} | [
"void",
"addDelta",
"(",
"TableKelp",
"db",
",",
"int",
"offset",
",",
"int",
"length",
")",
"{",
"if",
"(",
"_delta",
"==",
"null",
")",
"{",
"_delta",
"=",
"new",
"int",
"[",
"2",
"*",
"db",
".",
"getDeltaMax",
"(",
")",
"]",
";",
"}",
"_delta"... | Adds a delta record to the leaf stub. | [
"Adds",
"a",
"delta",
"record",
"to",
"the",
"leaf",
"stub",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/PageLeafStub.java#L159-L167 | train |
SeaCloudsEU/SeaCloudsPlatform | planner/core/src/main/java/eu/seaclouds/platform/planner/core/Planner.java | Planner.fetchAndPlan | public String[] fetchAndPlan(String aam) throws ParsingException, IOException {
String offerings = this.fetchOfferings();
return this.plan(aam, offerings);
} | java | public String[] fetchAndPlan(String aam) throws ParsingException, IOException {
String offerings = this.fetchOfferings();
return this.plan(aam, offerings);
} | [
"public",
"String",
"[",
"]",
"fetchAndPlan",
"(",
"String",
"aam",
")",
"throws",
"ParsingException",
",",
"IOException",
"{",
"String",
"offerings",
"=",
"this",
".",
"fetchOfferings",
"(",
")",
";",
"return",
"this",
".",
"plan",
"(",
"aam",
",",
"offer... | Fetches offerings from the Discoverer and makes plans
@param aam the String representing the AAM
@return the generated plans
@throws ParsingException
@throws IOException | [
"Fetches",
"offerings",
"from",
"the",
"Discoverer",
"and",
"makes",
"plans"
] | b199fe6de2c63b808cb248d3aca947d802375df8 | https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/planner/core/src/main/java/eu/seaclouds/platform/planner/core/Planner.java#L132-L135 | train |
SeaCloudsEU/SeaCloudsPlatform | planner/core/src/main/java/eu/seaclouds/platform/planner/core/Planner.java | Planner.plan | public String[] plan(String aam, String uniqueOfferingsTosca) throws ParsingException, IOException {
log.info("Planning for aam: \n" + aam);
//Get offerings
log.info("Getting Offeing Step: Start");
Map<String, Pair<NodeTemplate, String>> offerings = parseOfferings(uniqueOfferingsTosca)... | java | public String[] plan(String aam, String uniqueOfferingsTosca) throws ParsingException, IOException {
log.info("Planning for aam: \n" + aam);
//Get offerings
log.info("Getting Offeing Step: Start");
Map<String, Pair<NodeTemplate, String>> offerings = parseOfferings(uniqueOfferingsTosca)... | [
"public",
"String",
"[",
"]",
"plan",
"(",
"String",
"aam",
",",
"String",
"uniqueOfferingsTosca",
")",
"throws",
"ParsingException",
",",
"IOException",
"{",
"log",
".",
"info",
"(",
"\"Planning for aam: \\n\"",
"+",
"aam",
")",
";",
"//Get offerings",
"log",
... | Makes plans starting from the AAM and a String containing the TOSCA of the
offerings available to generate the plans
@param aam the String representing the AAM
@param uniqueOfferingsTosca the String containing the Tosca representation of the available offerings
@return the generated plans
@throws ParsingException
@th... | [
"Makes",
"plans",
"starting",
"from",
"the",
"AAM",
"and",
"a",
"String",
"containing",
"the",
"TOSCA",
"of",
"the",
"offerings",
"available",
"to",
"generate",
"the",
"plans"
] | b199fe6de2c63b808cb248d3aca947d802375df8 | https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/planner/core/src/main/java/eu/seaclouds/platform/planner/core/Planner.java#L148-L187 | train |
SeaCloudsEU/SeaCloudsPlatform | planner/core/src/main/java/eu/seaclouds/platform/planner/core/Planner.java | Planner.fetchAndRePlan | public String[] fetchAndRePlan(String aam, List<String> modulesToFilter) throws ParsingException, IOException {
String offerings = this.fetchOfferings();
return this.rePlan(aam, offerings, modulesToFilter);
} | java | public String[] fetchAndRePlan(String aam, List<String> modulesToFilter) throws ParsingException, IOException {
String offerings = this.fetchOfferings();
return this.rePlan(aam, offerings, modulesToFilter);
} | [
"public",
"String",
"[",
"]",
"fetchAndRePlan",
"(",
"String",
"aam",
",",
"List",
"<",
"String",
">",
"modulesToFilter",
")",
"throws",
"ParsingException",
",",
"IOException",
"{",
"String",
"offerings",
"=",
"this",
".",
"fetchOfferings",
"(",
")",
";",
"r... | Fetches offerings from the Discoverer and replan
@param aam the String representing the AAM
@param modulesToFilter
@return
@throws ParsingException
@throws IOException | [
"Fetches",
"offerings",
"from",
"the",
"Discoverer",
"and",
"replan"
] | b199fe6de2c63b808cb248d3aca947d802375df8 | https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/planner/core/src/main/java/eu/seaclouds/platform/planner/core/Planner.java#L203-L206 | train |
SeaCloudsEU/SeaCloudsPlatform | planner/core/src/main/java/eu/seaclouds/platform/planner/core/Planner.java | Planner.fetchOfferings | private String fetchOfferings() {
DiscovererFetchallResult allOfferings = null;
try {
String discovererOutput = discovererClient.getRequest("fetch_all", Collections.EMPTY_LIST);
ObjectMapper mapper = new ObjectMapper();
allOfferings = mapper.readValue(discovererOutput... | java | private String fetchOfferings() {
DiscovererFetchallResult allOfferings = null;
try {
String discovererOutput = discovererClient.getRequest("fetch_all", Collections.EMPTY_LIST);
ObjectMapper mapper = new ObjectMapper();
allOfferings = mapper.readValue(discovererOutput... | [
"private",
"String",
"fetchOfferings",
"(",
")",
"{",
"DiscovererFetchallResult",
"allOfferings",
"=",
"null",
";",
"try",
"{",
"String",
"discovererOutput",
"=",
"discovererClient",
".",
"getRequest",
"(",
"\"fetch_all\"",
",",
"Collections",
".",
"EMPTY_LIST",
")"... | Fetches the list offerings from the Discoverer
@return the String containing a unique Tosca representation of all available offerings | [
"Fetches",
"the",
"list",
"offerings",
"from",
"the",
"Discoverer"
] | b199fe6de2c63b808cb248d3aca947d802375df8 | https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/planner/core/src/main/java/eu/seaclouds/platform/planner/core/Planner.java#L251-L263 | train |
baratine/baratine | framework/src/main/java/com/caucho/v5/amp/marshal/RampImport.java | RampImport.marshal | ModuleMarshal marshal(Class<?> sourceType,
Class<?> targetType,
Class<?> declaredTargetType)
{
ImportKey key = new ImportKey(sourceType, targetType);
ModuleMarshal marshal = _marshalMap.get(key);
if (marshal != null) {
return marshal;
}
... | java | ModuleMarshal marshal(Class<?> sourceType,
Class<?> targetType,
Class<?> declaredTargetType)
{
ImportKey key = new ImportKey(sourceType, targetType);
ModuleMarshal marshal = _marshalMap.get(key);
if (marshal != null) {
return marshal;
}
... | [
"ModuleMarshal",
"marshal",
"(",
"Class",
"<",
"?",
">",
"sourceType",
",",
"Class",
"<",
"?",
">",
"targetType",
",",
"Class",
"<",
"?",
">",
"declaredTargetType",
")",
"{",
"ImportKey",
"key",
"=",
"new",
"ImportKey",
"(",
"sourceType",
",",
"targetType"... | Returns the marshal to convert from the sourceType to the targetType. | [
"Returns",
"the",
"marshal",
"to",
"convert",
"from",
"the",
"sourceType",
"to",
"the",
"targetType",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/amp/marshal/RampImport.java#L263-L280 | train |
baratine/baratine | core/src/main/java/com/caucho/v5/util/Primes.java | Primes.getBiggestPrime | public static int getBiggestPrime(long value)
{
for (int i = PRIMES.length - 1; i >= 0; i--) {
if (PRIMES[i] <= value) {
return PRIMES[i];
}
}
return 2;
} | java | public static int getBiggestPrime(long value)
{
for (int i = PRIMES.length - 1; i >= 0; i--) {
if (PRIMES[i] <= value) {
return PRIMES[i];
}
}
return 2;
} | [
"public",
"static",
"int",
"getBiggestPrime",
"(",
"long",
"value",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"PRIMES",
".",
"length",
"-",
"1",
";",
"i",
">=",
"0",
";",
"i",
"--",
")",
"{",
"if",
"(",
"PRIMES",
"[",
"i",
"]",
"<=",
"value",
")",... | Returns the largest prime less than the given bits. | [
"Returns",
"the",
"largest",
"prime",
"less",
"than",
"the",
"given",
"bits",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/util/Primes.java#L73-L82 | train |
baratine/baratine | web/src/main/java/com/caucho/v5/jni/OpenSSLFactory.java | OpenSSLFactory.setCertificateChainFile | public void setCertificateChainFile(Path certificateChainFile)
{
try {
_certificateChainFile = certificateChainFile.toRealPath().toString();
} catch (IOException e) {
throw new RuntimeException(e);
}
} | java | public void setCertificateChainFile(Path certificateChainFile)
{
try {
_certificateChainFile = certificateChainFile.toRealPath().toString();
} catch (IOException e) {
throw new RuntimeException(e);
}
} | [
"public",
"void",
"setCertificateChainFile",
"(",
"Path",
"certificateChainFile",
")",
"{",
"try",
"{",
"_certificateChainFile",
"=",
"certificateChainFile",
".",
"toRealPath",
"(",
")",
".",
"toString",
"(",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",... | Sets the certificateChainFile. | [
"Sets",
"the",
"certificateChainFile",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/jni/OpenSSLFactory.java#L203-L210 | train |
baratine/baratine | web/src/main/java/com/caucho/v5/jni/OpenSSLFactory.java | OpenSSLFactory.setCACertificatePath | public void setCACertificatePath(Path caCertificatePath)
{
try {
_caCertificatePath = caCertificatePath.toRealPath().toString();
} catch (IOException e) {
throw new RuntimeException(e);
}
} | java | public void setCACertificatePath(Path caCertificatePath)
{
try {
_caCertificatePath = caCertificatePath.toRealPath().toString();
} catch (IOException e) {
throw new RuntimeException(e);
}
} | [
"public",
"void",
"setCACertificatePath",
"(",
"Path",
"caCertificatePath",
")",
"{",
"try",
"{",
"_caCertificatePath",
"=",
"caCertificatePath",
".",
"toRealPath",
"(",
")",
".",
"toString",
"(",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"t... | Sets the caCertificatePath. | [
"Sets",
"the",
"caCertificatePath",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/jni/OpenSSLFactory.java#L223-L230 | train |
baratine/baratine | web/src/main/java/com/caucho/v5/jni/OpenSSLFactory.java | OpenSSLFactory.setCACertificateFile | public void setCACertificateFile(Path caCertificateFile)
{
try {
_caCertificateFile = caCertificateFile.toRealPath().toString();
} catch (IOException e) {
throw new RuntimeException(e);
}
} | java | public void setCACertificateFile(Path caCertificateFile)
{
try {
_caCertificateFile = caCertificateFile.toRealPath().toString();
} catch (IOException e) {
throw new RuntimeException(e);
}
} | [
"public",
"void",
"setCACertificateFile",
"(",
"Path",
"caCertificateFile",
")",
"{",
"try",
"{",
"_caCertificateFile",
"=",
"caCertificateFile",
".",
"toRealPath",
"(",
")",
".",
"toString",
"(",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"t... | Sets the caCertificateFile. | [
"Sets",
"the",
"caCertificateFile",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/jni/OpenSSLFactory.java#L243-L250 | train |
baratine/baratine | web/src/main/java/com/caucho/v5/jni/OpenSSLFactory.java | OpenSSLFactory.setCARevocationPath | public void setCARevocationPath(Path caRevocationPath)
{
try {
_caRevocationPath = caRevocationPath.toRealPath().toString();
} catch (IOException e) {
throw new RuntimeException(e);
}
} | java | public void setCARevocationPath(Path caRevocationPath)
{
try {
_caRevocationPath = caRevocationPath.toRealPath().toString();
} catch (IOException e) {
throw new RuntimeException(e);
}
} | [
"public",
"void",
"setCARevocationPath",
"(",
"Path",
"caRevocationPath",
")",
"{",
"try",
"{",
"_caRevocationPath",
"=",
"caRevocationPath",
".",
"toRealPath",
"(",
")",
".",
"toString",
"(",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"throw... | Sets the caRevocationPath. | [
"Sets",
"the",
"caRevocationPath",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/jni/OpenSSLFactory.java#L263-L270 | train |
baratine/baratine | web/src/main/java/com/caucho/v5/jni/OpenSSLFactory.java | OpenSSLFactory.setCARevocationFile | public void setCARevocationFile(Path caRevocationFile)
{
try {
_caRevocationFile = caRevocationFile.toRealPath().toString();
} catch (IOException e) {
throw new RuntimeException(e);
}
} | java | public void setCARevocationFile(Path caRevocationFile)
{
try {
_caRevocationFile = caRevocationFile.toRealPath().toString();
} catch (IOException e) {
throw new RuntimeException(e);
}
} | [
"public",
"void",
"setCARevocationFile",
"(",
"Path",
"caRevocationFile",
")",
"{",
"try",
"{",
"_caRevocationFile",
"=",
"caRevocationFile",
".",
"toRealPath",
"(",
")",
".",
"toString",
"(",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"throw... | Sets the caRevocationFile. | [
"Sets",
"the",
"caRevocationFile",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/jni/OpenSSLFactory.java#L283-L290 | train |
baratine/baratine | web/src/main/java/com/caucho/v5/jni/OpenSSLFactory.java | OpenSSLFactory.addEngineCommand | public void addEngineCommand(String command)
{
if (command == null || command.length() == 0) {
return;
}
int p = command.indexOf(':');
String arg = "";
if (p > 0) {
arg = command.substring(p + 1);
command = command.substring(0, p);
}
StringBuilder sb =... | java | public void addEngineCommand(String command)
{
if (command == null || command.length() == 0) {
return;
}
int p = command.indexOf(':');
String arg = "";
if (p > 0) {
arg = command.substring(p + 1);
command = command.substring(0, p);
}
StringBuilder sb =... | [
"public",
"void",
"addEngineCommand",
"(",
"String",
"command",
")",
"{",
"if",
"(",
"command",
"==",
"null",
"||",
"command",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"return",
";",
"}",
"int",
"p",
"=",
"command",
".",
"indexOf",
"(",
"'",
"... | Sets the engine-commands | [
"Sets",
"the",
"engine",
"-",
"commands"
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/jni/OpenSSLFactory.java#L370-L398 | train |
baratine/baratine | web/src/main/java/com/caucho/v5/jni/OpenSSLFactory.java | OpenSSLFactory.nextProtocols | public void nextProtocols(String ...protocols)
{
if (protocols == null || protocols.length == 0) {
_nextProtocols = null;
return;
}
StringBuilder sb = new StringBuilder();
for (String protocol : protocols) {
if (protocol == null || "".equals(protocol)) {
continue;
... | java | public void nextProtocols(String ...protocols)
{
if (protocols == null || protocols.length == 0) {
_nextProtocols = null;
return;
}
StringBuilder sb = new StringBuilder();
for (String protocol : protocols) {
if (protocol == null || "".equals(protocol)) {
continue;
... | [
"public",
"void",
"nextProtocols",
"(",
"String",
"...",
"protocols",
")",
"{",
"if",
"(",
"protocols",
"==",
"null",
"||",
"protocols",
".",
"length",
"==",
"0",
")",
"{",
"_nextProtocols",
"=",
"null",
";",
"return",
";",
"}",
"StringBuilder",
"sb",
"=... | Sets the next protocols. | [
"Sets",
"the",
"next",
"protocols",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/jni/OpenSSLFactory.java#L420-L438 | train |
baratine/baratine | web/src/main/java/com/caucho/v5/jni/OpenSSLFactory.java | OpenSSLFactory.setVerifyClient | public void setVerifyClient(String verifyClient)
throws ConfigException
{
if (! "optional_no_ca".equals(verifyClient)
&& ! "optional-no-ca".equals(verifyClient)
&& ! "optional".equals(verifyClient)
&& ! "require".equals(verifyClient)
&& ! "none".equals(verifyClient))
thro... | java | public void setVerifyClient(String verifyClient)
throws ConfigException
{
if (! "optional_no_ca".equals(verifyClient)
&& ! "optional-no-ca".equals(verifyClient)
&& ! "optional".equals(verifyClient)
&& ! "require".equals(verifyClient)
&& ! "none".equals(verifyClient))
thro... | [
"public",
"void",
"setVerifyClient",
"(",
"String",
"verifyClient",
")",
"throws",
"ConfigException",
"{",
"if",
"(",
"!",
"\"optional_no_ca\"",
".",
"equals",
"(",
"verifyClient",
")",
"&&",
"!",
"\"optional-no-ca\"",
".",
"equals",
"(",
"verifyClient",
")",
"&... | Sets the verifyClient. | [
"Sets",
"the",
"verifyClient",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/jni/OpenSSLFactory.java#L469-L484 | train |
Dissem/Jabit | core/src/main/java/ch/dissem/bitmessage/factory/BufferPool.java | BufferPool.allocateHeaderBuffer | public synchronized ByteBuffer allocateHeaderBuffer() {
Stack<ByteBuffer> pool = pools.get(HEADER_SIZE);
if (pool.isEmpty()) {
return ByteBuffer.allocate(HEADER_SIZE);
} else {
return pool.pop();
}
} | java | public synchronized ByteBuffer allocateHeaderBuffer() {
Stack<ByteBuffer> pool = pools.get(HEADER_SIZE);
if (pool.isEmpty()) {
return ByteBuffer.allocate(HEADER_SIZE);
} else {
return pool.pop();
}
} | [
"public",
"synchronized",
"ByteBuffer",
"allocateHeaderBuffer",
"(",
")",
"{",
"Stack",
"<",
"ByteBuffer",
">",
"pool",
"=",
"pools",
".",
"get",
"(",
"HEADER_SIZE",
")",
";",
"if",
"(",
"pool",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"ByteBuffer",
... | Returns a buffer that has the size of the Bitmessage network message header, 24 bytes.
@return a buffer of size 24 | [
"Returns",
"a",
"buffer",
"that",
"has",
"the",
"size",
"of",
"the",
"Bitmessage",
"network",
"message",
"header",
"24",
"bytes",
"."
] | 64ee41aee81c537aa27818e93e6afcd2ca1b7844 | https://github.com/Dissem/Jabit/blob/64ee41aee81c537aa27818e93e6afcd2ca1b7844/core/src/main/java/ch/dissem/bitmessage/factory/BufferPool.java#L65-L72 | train |
baratine/baratine | framework/src/main/java/com/caucho/v5/loader/CompilingClassEntry.java | CompilingClassEntry.compileIsModified | public boolean compileIsModified()
{
if (_compileIsModified)
return true;
CompileThread compileThread = new CompileThread();
ThreadPool.current().start(compileThread);
try {
synchronized (compileThread) {
if (! compileThread.isDone())
compileThread.wait(5000);
}
... | java | public boolean compileIsModified()
{
if (_compileIsModified)
return true;
CompileThread compileThread = new CompileThread();
ThreadPool.current().start(compileThread);
try {
synchronized (compileThread) {
if (! compileThread.isDone())
compileThread.wait(5000);
}
... | [
"public",
"boolean",
"compileIsModified",
"(",
")",
"{",
"if",
"(",
"_compileIsModified",
")",
"return",
"true",
";",
"CompileThread",
"compileThread",
"=",
"new",
"CompileThread",
"(",
")",
";",
"ThreadPool",
".",
"current",
"(",
")",
".",
"start",
"(",
"co... | Returns true if the compile doesn't avoid the dependency. | [
"Returns",
"true",
"if",
"the",
"compile",
"doesn",
"t",
"avoid",
"the",
"dependency",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/loader/CompilingClassEntry.java#L112-L139 | train |
baratine/baratine | framework/src/main/java/com/caucho/v5/bartender/link/ServerLinkBartender.java | ServerLinkBartender.lookup | ServiceRefAmp lookup(String path, PodRef podCaller)
{
if (_linkServiceRef.address().startsWith("local:")) {
int p = path.indexOf('/', 1);
if (p > 0) {
// champ path is /pod.0/path
// return (ServiceRefAmp) _champService.lookup(path);
return (ServiceRefAmp) _rampManager.s... | java | ServiceRefAmp lookup(String path, PodRef podCaller)
{
if (_linkServiceRef.address().startsWith("local:")) {
int p = path.indexOf('/', 1);
if (p > 0) {
// champ path is /pod.0/path
// return (ServiceRefAmp) _champService.lookup(path);
return (ServiceRefAmp) _rampManager.s... | [
"ServiceRefAmp",
"lookup",
"(",
"String",
"path",
",",
"PodRef",
"podCaller",
")",
"{",
"if",
"(",
"_linkServiceRef",
".",
"address",
"(",
")",
".",
"startsWith",
"(",
"\"local:\"",
")",
")",
"{",
"int",
"p",
"=",
"path",
".",
"indexOf",
"(",
"'",
"'",... | Lookup returns a ServiceRef for the foreign path and calling pod.
@param path the foreign service path
@param podCaller the calling pod | [
"Lookup",
"returns",
"a",
"ServiceRef",
"for",
"the",
"foreign",
"path",
"and",
"calling",
"pod",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/bartender/link/ServerLinkBartender.java#L159-L180 | train |
baratine/baratine | framework/src/main/java/com/caucho/v5/vfs/StdoutStream.java | StdoutStream.create | public static StdoutStream create()
{
if (_stdout == null) {
_stdout = new StdoutStream();
ConstPath path = new ConstPath(null, _stdout);
path.setScheme("stdout");
//_stdout.setPath(path);
}
return _stdout;
} | java | public static StdoutStream create()
{
if (_stdout == null) {
_stdout = new StdoutStream();
ConstPath path = new ConstPath(null, _stdout);
path.setScheme("stdout");
//_stdout.setPath(path);
}
return _stdout;
} | [
"public",
"static",
"StdoutStream",
"create",
"(",
")",
"{",
"if",
"(",
"_stdout",
"==",
"null",
")",
"{",
"_stdout",
"=",
"new",
"StdoutStream",
"(",
")",
";",
"ConstPath",
"path",
"=",
"new",
"ConstPath",
"(",
"null",
",",
"_stdout",
")",
";",
"path"... | Returns the StdoutStream singleton | [
"Returns",
"the",
"StdoutStream",
"singleton"
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/StdoutStream.java#L51-L61 | train |
baratine/baratine | framework/src/main/java/com/caucho/v5/vfs/StdoutStream.java | StdoutStream.write | public void write(byte []buf, int offset, int length, boolean isEnd)
throws IOException
{
System.out.write(buf, offset, length);
System.out.flush();
} | java | public void write(byte []buf, int offset, int length, boolean isEnd)
throws IOException
{
System.out.write(buf, offset, length);
System.out.flush();
} | [
"public",
"void",
"write",
"(",
"byte",
"[",
"]",
"buf",
",",
"int",
"offset",
",",
"int",
"length",
",",
"boolean",
"isEnd",
")",
"throws",
"IOException",
"{",
"System",
".",
"out",
".",
"write",
"(",
"buf",
",",
"offset",
",",
"length",
")",
";",
... | Writes the data to the System.out.
@param buf the buffer to write.
@param offset starting offset in the buffer.
@param length number of bytes to write.
@param isEnd true when the stream is closing. | [
"Writes",
"the",
"data",
"to",
"the",
"System",
".",
"out",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/StdoutStream.java#L79-L84 | train |
baratine/baratine | framework/src/main/java/com/caucho/v5/util/ThreadDump.java | ThreadDump.create | public static ThreadDump create()
{
ThreadDump threadDump = _threadDumpRef.get();
if (threadDump == null) {
threadDump = new ThreadDumpPro();
_threadDumpRef.compareAndSet(null, threadDump);
threadDump = _threadDumpRef.get();
}
return threadDump;
} | java | public static ThreadDump create()
{
ThreadDump threadDump = _threadDumpRef.get();
if (threadDump == null) {
threadDump = new ThreadDumpPro();
_threadDumpRef.compareAndSet(null, threadDump);
threadDump = _threadDumpRef.get();
}
return threadDump;
} | [
"public",
"static",
"ThreadDump",
"create",
"(",
")",
"{",
"ThreadDump",
"threadDump",
"=",
"_threadDumpRef",
".",
"get",
"(",
")",
";",
"if",
"(",
"threadDump",
"==",
"null",
")",
"{",
"threadDump",
"=",
"new",
"ThreadDumpPro",
"(",
")",
";",
"_threadDump... | Returns the singleton instance, creating if necessary. An instance of
com.caucho.server.admin.ProThreadDump will be returned if available and
licensed. ProThreadDump includes the URI of the request the thread is
processing, if applicable. | [
"Returns",
"the",
"singleton",
"instance",
"creating",
"if",
"necessary",
".",
"An",
"instance",
"of",
"com",
".",
"caucho",
".",
"server",
".",
"admin",
".",
"ProThreadDump",
"will",
"be",
"returned",
"if",
"available",
"and",
"licensed",
".",
"ProThreadDump"... | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/util/ThreadDump.java#L55-L67 | train |
baratine/baratine | framework/src/main/java/com/caucho/v5/util/ThreadDump.java | ThreadDump.getThreadDump | public String getThreadDump(int depth, boolean onlyActive)
{
ThreadMXBean threadBean = ManagementFactory.getThreadMXBean();
long []ids = threadBean.getAllThreadIds();
ThreadInfo []info = threadBean.getThreadInfo(ids, depth);
StringBuilder sb = new StringBuilder();
sb.append("Thread Dump generate... | java | public String getThreadDump(int depth, boolean onlyActive)
{
ThreadMXBean threadBean = ManagementFactory.getThreadMXBean();
long []ids = threadBean.getAllThreadIds();
ThreadInfo []info = threadBean.getThreadInfo(ids, depth);
StringBuilder sb = new StringBuilder();
sb.append("Thread Dump generate... | [
"public",
"String",
"getThreadDump",
"(",
"int",
"depth",
",",
"boolean",
"onlyActive",
")",
"{",
"ThreadMXBean",
"threadBean",
"=",
"ManagementFactory",
".",
"getThreadMXBean",
"(",
")",
";",
"long",
"[",
"]",
"ids",
"=",
"threadBean",
".",
"getAllThreadIds",
... | Returns dump of threads. Optionally uses cached dump.
@param onlyActive if true only running threads are logged | [
"Returns",
"dump",
"of",
"threads",
".",
"Optionally",
"uses",
"cached",
"dump",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/util/ThreadDump.java#L105-L128 | train |
baratine/baratine | web/src/main/java/com/caucho/v5/http/protocol2/InHttp.java | InHttp.readFlow | private boolean readFlow(ReadStream is, int length, int streamId)
throws IOException
{
if (length != 4) {
error("Invalid window update length {0}", length);
return false;
}
int credit = BitsUtil.readInt(is);
if (streamId == 0) {
_conn.channelZero().addSendCredit(credit)... | java | private boolean readFlow(ReadStream is, int length, int streamId)
throws IOException
{
if (length != 4) {
error("Invalid window update length {0}", length);
return false;
}
int credit = BitsUtil.readInt(is);
if (streamId == 0) {
_conn.channelZero().addSendCredit(credit)... | [
"private",
"boolean",
"readFlow",
"(",
"ReadStream",
"is",
",",
"int",
"length",
",",
"int",
"streamId",
")",
"throws",
"IOException",
"{",
"if",
"(",
"length",
"!=",
"4",
")",
"{",
"error",
"(",
"\"Invalid window update length {0}\"",
",",
"length",
")",
";... | window-update | [
"window",
"-",
"update"
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol2/InHttp.java#L273-L297 | train |
baratine/baratine | web/src/main/java/com/caucho/v5/http/protocol2/InHttp.java | InHttp.readGoAway | private boolean readGoAway(ReadStream is, int length)
throws IOException
{
int lastStream = BitsUtil.readInt(is);
int errorCode = BitsUtil.readInt(is);
is.skip(length - 8);
_isGoAway = true;
_conn.onReadGoAway();
if (onCloseStream() <= 0) {
_inHandler.onGoAway();
... | java | private boolean readGoAway(ReadStream is, int length)
throws IOException
{
int lastStream = BitsUtil.readInt(is);
int errorCode = BitsUtil.readInt(is);
is.skip(length - 8);
_isGoAway = true;
_conn.onReadGoAway();
if (onCloseStream() <= 0) {
_inHandler.onGoAway();
... | [
"private",
"boolean",
"readGoAway",
"(",
"ReadStream",
"is",
",",
"int",
"length",
")",
"throws",
"IOException",
"{",
"int",
"lastStream",
"=",
"BitsUtil",
".",
"readInt",
"(",
"is",
")",
";",
"int",
"errorCode",
"=",
"BitsUtil",
".",
"readInt",
"(",
"is",... | go-away | [
"go",
"-",
"away"
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol2/InHttp.java#L320-L337 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java | UpgradeScanner10.readMetaHeader | private boolean readMetaHeader()
throws IOException
{
try (ReadStream is = openRead(0, META_SEGMENT_SIZE)) {
int crc = 17;
long magic = BitsUtil.readLong(is);
if (magic != KELP_MAGIC) {
System.out.println("WRONG_MAGIC: " + magic);
return false;
}
... | java | private boolean readMetaHeader()
throws IOException
{
try (ReadStream is = openRead(0, META_SEGMENT_SIZE)) {
int crc = 17;
long magic = BitsUtil.readLong(is);
if (magic != KELP_MAGIC) {
System.out.println("WRONG_MAGIC: " + magic);
return false;
}
... | [
"private",
"boolean",
"readMetaHeader",
"(",
")",
"throws",
"IOException",
"{",
"try",
"(",
"ReadStream",
"is",
"=",
"openRead",
"(",
"0",
",",
"META_SEGMENT_SIZE",
")",
")",
"{",
"int",
"crc",
"=",
"17",
";",
"long",
"magic",
"=",
"BitsUtil",
".",
"read... | Reads the initial metadata for the store file as a whole. | [
"Reads",
"the",
"initial",
"metadata",
"for",
"the",
"store",
"file",
"as",
"a",
"whole",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java#L159-L214 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java | UpgradeScanner10.readMetaData | private boolean readMetaData()
throws IOException
{
SegmentExtent10 segment = _metaSegment;
try (ReadStream is = openRead(segment.address(), segment.length())) {
is.position(META_OFFSET);
while (readMetaEntry(is)) {
}
}
return true;
} | java | private boolean readMetaData()
throws IOException
{
SegmentExtent10 segment = _metaSegment;
try (ReadStream is = openRead(segment.address(), segment.length())) {
is.position(META_OFFSET);
while (readMetaEntry(is)) {
}
}
return true;
} | [
"private",
"boolean",
"readMetaData",
"(",
")",
"throws",
"IOException",
"{",
"SegmentExtent10",
"segment",
"=",
"_metaSegment",
";",
"try",
"(",
"ReadStream",
"is",
"=",
"openRead",
"(",
"segment",
".",
"address",
"(",
")",
",",
"segment",
".",
"length",
"(... | Reads the metadata entries for the tables and the segments. | [
"Reads",
"the",
"metadata",
"entries",
"for",
"the",
"tables",
"and",
"the",
"segments",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java#L219-L232 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java | UpgradeScanner10.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);
i... | 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);
i... | [
"private",
"boolean",
"readMetaTable",
"(",
"ReadStream",
"is",
",",
"int",
"crc",
")",
"throws",
"IOException",
"{",
"byte",
"[",
"]",
"key",
"=",
"new",
"byte",
"[",
"TABLE_KEY_SIZE",
"]",
";",
"is",
".",
"read",
"(",
"key",
",",
"0",
",",
"key",
"... | Reads metadata for a table. | [
"Reads",
"metadata",
"for",
"a",
"table",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java#L269-L312 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java | UpgradeScanner10.readSegments | private void readSegments()
throws IOException
{
for (SegmentExtent10 extent : _segmentExtents) {
try (ReadStream is = openRead(extent.address(), extent.length())) {
is.skip(extent.length() - BLOCK_SIZE);
long sequence = BitsUtil.readLong(is);
byte []tableKey = ... | java | private void readSegments()
throws IOException
{
for (SegmentExtent10 extent : _segmentExtents) {
try (ReadStream is = openRead(extent.address(), extent.length())) {
is.skip(extent.length() - BLOCK_SIZE);
long sequence = BitsUtil.readLong(is);
byte []tableKey = ... | [
"private",
"void",
"readSegments",
"(",
")",
"throws",
"IOException",
"{",
"for",
"(",
"SegmentExtent10",
"extent",
":",
"_segmentExtents",
")",
"{",
"try",
"(",
"ReadStream",
"is",
"=",
"openRead",
"(",
"extent",
".",
"address",
"(",
")",
",",
"extent",
"... | Reads the segment metadata, the sequence and table key. | [
"Reads",
"the",
"segment",
"metadata",
"the",
"sequence",
"and",
"table",
"key",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java#L343-L364 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java | UpgradeScanner10.upgradeDatabase | private void upgradeDatabase(KelpUpgrade upgradeKelp)
throws IOException
{
Collections.sort(_tableList,
(x,y)->x.row().name().compareTo(y.row().name()));
for (TableEntry10 table : _tableList) {
TableUpgrade upgradeTable = upgradeKelp.table(table.key(), table.row());
... | java | private void upgradeDatabase(KelpUpgrade upgradeKelp)
throws IOException
{
Collections.sort(_tableList,
(x,y)->x.row().name().compareTo(y.row().name()));
for (TableEntry10 table : _tableList) {
TableUpgrade upgradeTable = upgradeKelp.table(table.key(), table.row());
... | [
"private",
"void",
"upgradeDatabase",
"(",
"KelpUpgrade",
"upgradeKelp",
")",
"throws",
"IOException",
"{",
"Collections",
".",
"sort",
"(",
"_tableList",
",",
"(",
"x",
",",
"y",
")",
"->",
"x",
".",
"row",
"(",
")",
".",
"name",
"(",
")",
".",
"compa... | Upgrade the store | [
"Upgrade",
"the",
"store"
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java#L369-L380 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java | UpgradeScanner10.upgradeTable | private void upgradeTable(TableEntry10 table,
TableUpgrade upgradeTable)
throws IOException
{
_pageMap = new TreeMap<>();
readTableIndex(table);
for (Page10 page : _pageMap.values()) {
upgradeLeaf(table, upgradeTable, page);
List<Delta10> delta... | java | private void upgradeTable(TableEntry10 table,
TableUpgrade upgradeTable)
throws IOException
{
_pageMap = new TreeMap<>();
readTableIndex(table);
for (Page10 page : _pageMap.values()) {
upgradeLeaf(table, upgradeTable, page);
List<Delta10> delta... | [
"private",
"void",
"upgradeTable",
"(",
"TableEntry10",
"table",
",",
"TableUpgrade",
"upgradeTable",
")",
"throws",
"IOException",
"{",
"_pageMap",
"=",
"new",
"TreeMap",
"<>",
"(",
")",
";",
"readTableIndex",
"(",
"table",
")",
";",
"for",
"(",
"Page10",
"... | Upgrade rows from a table. | [
"Upgrade",
"rows",
"from",
"a",
"table",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java#L385-L404 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java | UpgradeScanner10.readTableIndex | private void readTableIndex(TableEntry10 table)
throws IOException
{
for (Segment10 segment : tableSegments(table)) {
try (ReadStream is = openRead(segment.address(), segment.length())) {
readSegmentIndex(is, segment);
}
}
} | java | private void readTableIndex(TableEntry10 table)
throws IOException
{
for (Segment10 segment : tableSegments(table)) {
try (ReadStream is = openRead(segment.address(), segment.length())) {
readSegmentIndex(is, segment);
}
}
} | [
"private",
"void",
"readTableIndex",
"(",
"TableEntry10",
"table",
")",
"throws",
"IOException",
"{",
"for",
"(",
"Segment10",
"segment",
":",
"tableSegments",
"(",
"table",
")",
")",
"{",
"try",
"(",
"ReadStream",
"is",
"=",
"openRead",
"(",
"segment",
".",... | Read all page metadata for a table. | [
"Read",
"all",
"page",
"metadata",
"for",
"a",
"table",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java#L409-L417 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java | UpgradeScanner10.readSegmentIndex | private void readSegmentIndex(ReadStream is, Segment10 segment)
throws IOException
{
int address = segment.length() - BLOCK_SIZE;
TempBuffer tBuf = TempBuffer.create();
byte []buffer = tBuf.buffer();
is.position(address);
is.read(buffer, 0, BLOCK_SIZE);
int tail = BitsUtil.r... | java | private void readSegmentIndex(ReadStream is, Segment10 segment)
throws IOException
{
int address = segment.length() - BLOCK_SIZE;
TempBuffer tBuf = TempBuffer.create();
byte []buffer = tBuf.buffer();
is.position(address);
is.read(buffer, 0, BLOCK_SIZE);
int tail = BitsUtil.r... | [
"private",
"void",
"readSegmentIndex",
"(",
"ReadStream",
"is",
",",
"Segment10",
"segment",
")",
"throws",
"IOException",
"{",
"int",
"address",
"=",
"segment",
".",
"length",
"(",
")",
"-",
"BLOCK_SIZE",
";",
"TempBuffer",
"tBuf",
"=",
"TempBuffer",
".",
"... | Read page index from a segment. | [
"Read",
"page",
"index",
"from",
"a",
"segment",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java#L422-L474 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java | UpgradeScanner10.addLeaf | private void addLeaf(Segment10 segment,
int pid,
int nextPid,
int address,
int length)
{
Page10 page = _pageMap.get(pid);
if (page != null && page.sequence() < segment.sequence()) {
return;
}
p... | java | private void addLeaf(Segment10 segment,
int pid,
int nextPid,
int address,
int length)
{
Page10 page = _pageMap.get(pid);
if (page != null && page.sequence() < segment.sequence()) {
return;
}
p... | [
"private",
"void",
"addLeaf",
"(",
"Segment10",
"segment",
",",
"int",
"pid",
",",
"int",
"nextPid",
",",
"int",
"address",
",",
"int",
"length",
")",
"{",
"Page10",
"page",
"=",
"_pageMap",
".",
"get",
"(",
"pid",
")",
";",
"if",
"(",
"page",
"!=",
... | Adds a new leaf entry to the page list.
Because pages are added in order, each new page overrides the older one. | [
"Adds",
"a",
"new",
"leaf",
"entry",
"to",
"the",
"page",
"list",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java#L481-L496 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java | UpgradeScanner10.addLeafDelta | private void addLeafDelta(Segment10 segment,
int pid,
int nextPid,
int address,
int length)
{
Page10 page = _pageMap.get(pid);
if (page != null && page.sequence() < segment.sequence()) {
... | java | private void addLeafDelta(Segment10 segment,
int pid,
int nextPid,
int address,
int length)
{
Page10 page = _pageMap.get(pid);
if (page != null && page.sequence() < segment.sequence()) {
... | [
"private",
"void",
"addLeafDelta",
"(",
"Segment10",
"segment",
",",
"int",
"pid",
",",
"int",
"nextPid",
",",
"int",
"address",
",",
"int",
"length",
")",
"{",
"Page10",
"page",
"=",
"_pageMap",
".",
"get",
"(",
"pid",
")",
";",
"if",
"(",
"page",
"... | Adds a new leaf delta to the page list.
Because pages are added in order, each new page overrides the older one. | [
"Adds",
"a",
"new",
"leaf",
"delta",
"to",
"the",
"page",
"list",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java#L503-L518 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java | UpgradeScanner10.tableSegments | private ArrayList<Segment10> tableSegments(TableEntry10 table)
{
ArrayList<Segment10> tableSegments = new ArrayList<>();
for (Segment10 segment : _segments) {
if (Arrays.equals(segment.key(), table.key())) {
tableSegments.add(segment);
}
}
Collections.sort(tableSegments,
... | java | private ArrayList<Segment10> tableSegments(TableEntry10 table)
{
ArrayList<Segment10> tableSegments = new ArrayList<>();
for (Segment10 segment : _segments) {
if (Arrays.equals(segment.key(), table.key())) {
tableSegments.add(segment);
}
}
Collections.sort(tableSegments,
... | [
"private",
"ArrayList",
"<",
"Segment10",
">",
"tableSegments",
"(",
"TableEntry10",
"table",
")",
"{",
"ArrayList",
"<",
"Segment10",
">",
"tableSegments",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"Segment10",
"segment",
":",
"_segments",
"... | Returns segments for a table in reverse sequence order.
The reverse order minimizes extra pages reads, because older pages
don't need to be read. | [
"Returns",
"segments",
"for",
"a",
"table",
"in",
"reverse",
"sequence",
"order",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java#L526-L540 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java | UpgradeScanner10.upgradeLeaf | private void upgradeLeaf(TableEntry10 table,
TableUpgrade upgradeTable,
Page10 page)
throws IOException
{
try (ReadStream is = openRead(page.segment().address(),
page.segment().length())) {
is.position(page.address(... | java | private void upgradeLeaf(TableEntry10 table,
TableUpgrade upgradeTable,
Page10 page)
throws IOException
{
try (ReadStream is = openRead(page.segment().address(),
page.segment().length())) {
is.position(page.address(... | [
"private",
"void",
"upgradeLeaf",
"(",
"TableEntry10",
"table",
",",
"TableUpgrade",
"upgradeTable",
",",
"Page10",
"page",
")",
"throws",
"IOException",
"{",
"try",
"(",
"ReadStream",
"is",
"=",
"openRead",
"(",
"page",
".",
"segment",
"(",
")",
".",
"addre... | Upgrade a table page. | [
"Upgrade",
"a",
"table",
"page",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java#L545-L566 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java | UpgradeScanner10.upgradeLeafBlock | private void upgradeLeafBlock(ReadStream is,
TableEntry10 table,
TableUpgrade upgradeTable,
Page10 page)
throws IOException
{
TempBuffer tBuf = TempBuffer.create();
byte []buffer = tBuf.buffer();
... | java | private void upgradeLeafBlock(ReadStream is,
TableEntry10 table,
TableUpgrade upgradeTable,
Page10 page)
throws IOException
{
TempBuffer tBuf = TempBuffer.create();
byte []buffer = tBuf.buffer();
... | [
"private",
"void",
"upgradeLeafBlock",
"(",
"ReadStream",
"is",
",",
"TableEntry10",
"table",
",",
"TableUpgrade",
"upgradeTable",
",",
"Page10",
"page",
")",
"throws",
"IOException",
"{",
"TempBuffer",
"tBuf",
"=",
"TempBuffer",
".",
"create",
"(",
")",
";",
... | Reads data for a leaf.
<code><pre>
blobLen int16
blobData {blobLen}
rowLen int16
rowData {rowLen}
</pre></code> | [
"Reads",
"data",
"for",
"a",
"leaf",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java#L578-L621 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java | UpgradeScanner10.upgradeDelta | private void upgradeDelta(TableEntry10 table,
TableUpgrade upgradeTable,
Page10 page,
Delta10 delta)
throws IOException
{
try (ReadStream is = openRead(page.segment().address(),
page.segment(... | java | private void upgradeDelta(TableEntry10 table,
TableUpgrade upgradeTable,
Page10 page,
Delta10 delta)
throws IOException
{
try (ReadStream is = openRead(page.segment().address(),
page.segment(... | [
"private",
"void",
"upgradeDelta",
"(",
"TableEntry10",
"table",
",",
"TableUpgrade",
"upgradeTable",
",",
"Page10",
"page",
",",
"Delta10",
"delta",
")",
"throws",
"IOException",
"{",
"try",
"(",
"ReadStream",
"is",
"=",
"openRead",
"(",
"page",
".",
"segment... | Upgrade a table leaf delta. | [
"Upgrade",
"a",
"table",
"leaf",
"delta",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java#L626-L642 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java | UpgradeScanner10.rowInsert | private void rowInsert(RowUpgrade row,
TableUpgrade upgradeTable,
byte []buffer,
int offset)
{
Cursor10 cursor = new Cursor10(row, buffer, offset);
upgradeTable.row(cursor);
} | java | private void rowInsert(RowUpgrade row,
TableUpgrade upgradeTable,
byte []buffer,
int offset)
{
Cursor10 cursor = new Cursor10(row, buffer, offset);
upgradeTable.row(cursor);
} | [
"private",
"void",
"rowInsert",
"(",
"RowUpgrade",
"row",
",",
"TableUpgrade",
"upgradeTable",
",",
"byte",
"[",
"]",
"buffer",
",",
"int",
"offset",
")",
"{",
"Cursor10",
"cursor",
"=",
"new",
"Cursor10",
"(",
"row",
",",
"buffer",
",",
"offset",
")",
"... | Insert a row. | [
"Insert",
"a",
"row",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java#L722-L730 | train |
baratine/baratine | kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java | UpgradeScanner10.openRead | private ReadStream openRead(long address, int size)
{
InStore inStore = _store.openRead(address, size);
InStoreStream is = new InStoreStream(inStore, address, address + size);
return new ReadStream(new VfsStream(is));
} | java | private ReadStream openRead(long address, int size)
{
InStore inStore = _store.openRead(address, size);
InStoreStream is = new InStoreStream(inStore, address, address + size);
return new ReadStream(new VfsStream(is));
} | [
"private",
"ReadStream",
"openRead",
"(",
"long",
"address",
",",
"int",
"size",
")",
"{",
"InStore",
"inStore",
"=",
"_store",
".",
"openRead",
"(",
"address",
",",
"size",
")",
";",
"InStoreStream",
"is",
"=",
"new",
"InStoreStream",
"(",
"inStore",
",",... | Open a read stream to a segment.
@param address file address for the segment
@param size length of the segment
@return opened ReadStream | [
"Open",
"a",
"read",
"stream",
"to",
"a",
"segment",
"."
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/upgrade/UpgradeScanner10.java#L740-L747 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.