id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
44,400
SeaCloudsEU/SeaCloudsPlatform
sla/sla-core/sla-service/src/main/java/eu/atos/sla/service/rest/SeacloudsRest.java
SeacloudsRest.getSlaUrl
private String getSlaUrl(String envSlaUrl, UriInfo uriInfo) { String baseUrl = uriInfo.getBaseUri().toString(); if (envSlaUrl == null) { envSlaUrl = ""; } String result = ("".equals(envSlaUrl))? baseUrl : envSlaUrl; logger.debug("getSlaUrl(env={}, supp...
java
private String getSlaUrl(String envSlaUrl, UriInfo uriInfo) { String baseUrl = uriInfo.getBaseUri().toString(); if (envSlaUrl == null) { envSlaUrl = ""; } String result = ("".equals(envSlaUrl))? baseUrl : envSlaUrl; logger.debug("getSlaUrl(env={}, supp...
[ "private", "String", "getSlaUrl", "(", "String", "envSlaUrl", ",", "UriInfo", "uriInfo", ")", "{", "String", "baseUrl", "=", "uriInfo", ".", "getBaseUri", "(", ")", ".", "toString", "(", ")", ";", "if", "(", "envSlaUrl", "==", "null", ")", "{", "envSlaUr...
Returns base url of the sla core. If the SLA_URL env var is set, returns that value. Else, get the base url from the context of the current REST call. This second value may be wrong because this base url must be the value that the MonitoringPlatform needs to use to connect to the SLA Core.
[ "Returns", "base", "url", "of", "the", "sla", "core", "." ]
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/sla/sla-core/sla-service/src/main/java/eu/atos/sla/service/rest/SeacloudsRest.java#L372-L382
44,401
SeaCloudsEU/SeaCloudsPlatform
sla/sla-core/sla-service/src/main/java/eu/atos/sla/service/rest/SeacloudsRest.java
SeacloudsRest.getMetricsBaseUrl
private String getMetricsBaseUrl(String suppliedBaseUrl, String envBaseUrl) { String result = ("".equals(suppliedBaseUrl))? envBaseUrl : suppliedBaseUrl; logger.debug("getMetricsBaseUrl(env={}, supplied={}) = {}", envBaseUrl, suppliedBaseUrl, result); return result; }
java
private String getMetricsBaseUrl(String suppliedBaseUrl, String envBaseUrl) { String result = ("".equals(suppliedBaseUrl))? envBaseUrl : suppliedBaseUrl; logger.debug("getMetricsBaseUrl(env={}, supplied={}) = {}", envBaseUrl, suppliedBaseUrl, result); return result; }
[ "private", "String", "getMetricsBaseUrl", "(", "String", "suppliedBaseUrl", ",", "String", "envBaseUrl", ")", "{", "String", "result", "=", "(", "\"\"", ".", "equals", "(", "suppliedBaseUrl", ")", ")", "?", "envBaseUrl", ":", "suppliedBaseUrl", ";", "logger", ...
Return base url of the metrics endpoint of the Monitoring Platform. If an url is supplied in the request, use that value. Else, use MODACLOUDS_METRICS_URL env var is set.
[ "Return", "base", "url", "of", "the", "metrics", "endpoint", "of", "the", "Monitoring", "Platform", "." ]
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/sla/sla-core/sla-service/src/main/java/eu/atos/sla/service/rest/SeacloudsRest.java#L389-L395
44,402
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/StreamImplInputStream.java
StreamImplInputStream.read
public int read(byte []buffer, int offset, int length) throws IOException { return _stream.read(buffer, offset, length); }
java
public int read(byte []buffer, int offset, int length) throws IOException { return _stream.read(buffer, offset, length); }
[ "public", "int", "read", "(", "byte", "[", "]", "buffer", ",", "int", "offset", ",", "int", "length", ")", "throws", "IOException", "{", "return", "_stream", ".", "read", "(", "buffer", ",", "offset", ",", "length", ")", ";", "}" ]
Reads a buffer to the underlying stream. @param buffer the byte array to write. @param offset the offset into the byte array. @param length the number of bytes to write.
[ "Reads", "a", "buffer", "to", "the", "underlying", "stream", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/StreamImplInputStream.java#L73-L77
44,403
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/FilesystemPath.java
FilesystemPath.getParent
@Override public PathImpl getParent() { if (_pathname.length() <= 1) return lookup("/"); int length = _pathname.length(); int lastSlash = _pathname.lastIndexOf('/'); if (lastSlash < 1) return lookup("/"); if (lastSlash == length - 1) { lastSlash = _pathname.lastIndexOf('/', ...
java
@Override public PathImpl getParent() { if (_pathname.length() <= 1) return lookup("/"); int length = _pathname.length(); int lastSlash = _pathname.lastIndexOf('/'); if (lastSlash < 1) return lookup("/"); if (lastSlash == length - 1) { lastSlash = _pathname.lastIndexOf('/', ...
[ "@", "Override", "public", "PathImpl", "getParent", "(", ")", "{", "if", "(", "_pathname", ".", "length", "(", ")", "<=", "1", ")", "return", "lookup", "(", "\"/\"", ")", ";", "int", "length", "=", "_pathname", ".", "length", "(", ")", ";", "int", ...
Return the parent Path
[ "Return", "the", "parent", "Path" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/FilesystemPath.java#L82-L101
44,404
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/FilesystemPath.java
FilesystemPath.normalizePath
static protected String normalizePath(String oldPath, String newPath, int offset, char separatorChar) { CharBuffer cb = new CharBuffer(); normalizePath(cb, oldPath, newPath, offset, separato...
java
static protected String normalizePath(String oldPath, String newPath, int offset, char separatorChar) { CharBuffer cb = new CharBuffer(); normalizePath(cb, oldPath, newPath, offset, separato...
[ "static", "protected", "String", "normalizePath", "(", "String", "oldPath", ",", "String", "newPath", ",", "int", "offset", ",", "char", "separatorChar", ")", "{", "CharBuffer", "cb", "=", "new", "CharBuffer", "(", ")", ";", "normalizePath", "(", "cb", ",", ...
wrapper for the real normalize path routine to use CharBuffer. @param oldPath The parent Path's path @param newPath The user's new path @param offset Offset into the user path @return the normalized path
[ "wrapper", "for", "the", "real", "normalize", "path", "routine", "to", "use", "CharBuffer", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/FilesystemPath.java#L153-L161
44,405
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/FilesystemPath.java
FilesystemPath.normalizePath
static protected void normalizePath(CharBuffer cb, String oldPath, String newPath, int offset, char separatorChar) { cb.clear(); cb.append(oldPath); if (cb.length() == 0 || cb.lastChar() != '/') cb.append('/'); int leng...
java
static protected void normalizePath(CharBuffer cb, String oldPath, String newPath, int offset, char separatorChar) { cb.clear(); cb.append(oldPath); if (cb.length() == 0 || cb.lastChar() != '/') cb.append('/'); int leng...
[ "static", "protected", "void", "normalizePath", "(", "CharBuffer", "cb", ",", "String", "oldPath", ",", "String", "newPath", ",", "int", "offset", ",", "char", "separatorChar", ")", "{", "cb", ".", "clear", "(", ")", ";", "cb", ".", "append", "(", "oldPa...
Normalizes a filesystemPath path. <ul> <li>foo//bar -> foo/bar <li>foo/./bar -> foo/bar <li>foo/../bar -> bar <li>/../bar -> /bar </ul> @param cb charBuffer holding the normalized result @param oldPath the parent path @param newPath the relative path @param offset where in the child path to start
[ "Normalizes", "a", "filesystemPath", "path", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/FilesystemPath.java#L178-L264
44,406
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/FilesystemPath.java
FilesystemPath.getFullPath
public String getFullPath() { if (_root == this || _root == null) return getPath(); String rootPath = _root.getFullPath(); String path = getPath(); if (rootPath.length() <= 1) return path; else if (path.length() <= 1) return rootPath; else return rootPath + path; }
java
public String getFullPath() { if (_root == this || _root == null) return getPath(); String rootPath = _root.getFullPath(); String path = getPath(); if (rootPath.length() <= 1) return path; else if (path.length() <= 1) return rootPath; else return rootPath + path; }
[ "public", "String", "getFullPath", "(", ")", "{", "if", "(", "_root", "==", "this", "||", "_root", "==", "null", ")", "return", "getPath", "(", ")", ";", "String", "rootPath", "=", "_root", ".", "getFullPath", "(", ")", ";", "String", "path", "=", "g...
For chrooted filesystems return the real system path.
[ "For", "chrooted", "filesystems", "return", "the", "real", "system", "path", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/FilesystemPath.java#L300-L314
44,407
baratine/baratine
api/src/main/java/io/baratine/jdbc/JdbcRow.java
JdbcRow.getClass
public Class<?> getClass(int index) { Object value = _values[index - 1]; if (value == null) { return null; } else { return value.getClass(); } }
java
public Class<?> getClass(int index) { Object value = _values[index - 1]; if (value == null) { return null; } else { return value.getClass(); } }
[ "public", "Class", "<", "?", ">", "getClass", "(", "int", "index", ")", "{", "Object", "value", "=", "_values", "[", "index", "-", "1", "]", ";", "if", "(", "value", "==", "null", ")", "{", "return", "null", ";", "}", "else", "{", "return", "valu...
Returns the class of the column. @param index 1-based @return class of column
[ "Returns", "the", "class", "of", "the", "column", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/api/src/main/java/io/baratine/jdbc/JdbcRow.java#L66-L76
44,408
baratine/baratine
api/src/main/java/io/baratine/jdbc/JdbcRow.java
JdbcRow.getString
public String getString(int index) { Object value = _values[index - 1]; if (value != null) { return value.toString(); } else { return null; } }
java
public String getString(int index) { Object value = _values[index - 1]; if (value != null) { return value.toString(); } else { return null; } }
[ "public", "String", "getString", "(", "int", "index", ")", "{", "Object", "value", "=", "_values", "[", "index", "-", "1", "]", ";", "if", "(", "value", "!=", "null", ")", "{", "return", "value", ".", "toString", "(", ")", ";", "}", "else", "{", ...
Returns the column as a String. @param index 1-based @return column as a String
[ "Returns", "the", "column", "as", "a", "String", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/api/src/main/java/io/baratine/jdbc/JdbcRow.java#L95-L105
44,409
baratine/baratine
api/src/main/java/io/baratine/jdbc/JdbcRow.java
JdbcRow.getLong
public long getLong(int index) { Object value = _values[index - 1]; if (value instanceof Long) { return (Long) value; } else if (value instanceof Integer) { return (Integer) value; } else { return Long.valueOf(value.toString()); } }
java
public long getLong(int index) { Object value = _values[index - 1]; if (value instanceof Long) { return (Long) value; } else if (value instanceof Integer) { return (Integer) value; } else { return Long.valueOf(value.toString()); } }
[ "public", "long", "getLong", "(", "int", "index", ")", "{", "Object", "value", "=", "_values", "[", "index", "-", "1", "]", ";", "if", "(", "value", "instanceof", "Long", ")", "{", "return", "(", "Long", ")", "value", ";", "}", "else", "if", "(", ...
Returns the column as a long. @param index 1-based @return column as a long
[ "Returns", "the", "column", "as", "a", "long", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/api/src/main/java/io/baratine/jdbc/JdbcRow.java#L113-L126
44,410
baratine/baratine
api/src/main/java/io/baratine/jdbc/JdbcRow.java
JdbcRow.getDouble
public double getDouble(int index) { Object value = _values[index - 1]; if (value instanceof Double) { return (Double) value; } else if (value instanceof Float) { return (Float) value; } else if (value instanceof Number) { return (Double) ((Number) value); } else { ...
java
public double getDouble(int index) { Object value = _values[index - 1]; if (value instanceof Double) { return (Double) value; } else if (value instanceof Float) { return (Float) value; } else if (value instanceof Number) { return (Double) ((Number) value); } else { ...
[ "public", "double", "getDouble", "(", "int", "index", ")", "{", "Object", "value", "=", "_values", "[", "index", "-", "1", "]", ";", "if", "(", "value", "instanceof", "Double", ")", "{", "return", "(", "Double", ")", "value", ";", "}", "else", "if", ...
Returns the column as a double. @param index 1-based @return column as a double
[ "Returns", "the", "column", "as", "a", "double", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/api/src/main/java/io/baratine/jdbc/JdbcRow.java#L134-L150
44,411
baratine/baratine
api/src/main/java/io/baratine/jdbc/JdbcRow.java
JdbcRow.getBoolean
public boolean getBoolean(int index) { Object value = _values[index - 1]; if (value instanceof Boolean) { return (Boolean) value; } else { return Boolean.valueOf(value.toString()); } }
java
public boolean getBoolean(int index) { Object value = _values[index - 1]; if (value instanceof Boolean) { return (Boolean) value; } else { return Boolean.valueOf(value.toString()); } }
[ "public", "boolean", "getBoolean", "(", "int", "index", ")", "{", "Object", "value", "=", "_values", "[", "index", "-", "1", "]", ";", "if", "(", "value", "instanceof", "Boolean", ")", "{", "return", "(", "Boolean", ")", "value", ";", "}", "else", "{...
Returns the column as a boolean. @param index 1-based @return column as a boolean
[ "Returns", "the", "column", "as", "a", "boolean", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/api/src/main/java/io/baratine/jdbc/JdbcRow.java#L158-L168
44,412
baratine/baratine
kraken/src/main/java/com/caucho/v5/kelp/Page.java
Page.writeCheckpoint
@InService(SegmentServiceImpl.class) public Page writeCheckpoint(TableKelp table, OutSegment sOut, long oldSequence, int saveLength, int tail, int saveSequence) throws IOException { return n...
java
@InService(SegmentServiceImpl.class) public Page writeCheckpoint(TableKelp table, OutSegment sOut, long oldSequence, int saveLength, int tail, int saveSequence) throws IOException { return n...
[ "@", "InService", "(", "SegmentServiceImpl", ".", "class", ")", "public", "Page", "writeCheckpoint", "(", "TableKelp", "table", ",", "OutSegment", "sOut", ",", "long", "oldSequence", ",", "int", "saveLength", ",", "int", "tail", ",", "int", "saveSequence", ")"...
Called by the segment writing service to write the page to the stream. @param table @param sOut @param oldSequence @param saveLength @param tail @param saveSequence @return @throws IOException
[ "Called", "by", "the", "segment", "writing", "service", "to", "write", "the", "page", "to", "the", "stream", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/Page.java#L385-L396
44,413
baratine/baratine
framework/src/main/java/com/caucho/v5/make/DependencyList.java
DependencyList.getJavaCreateString
public String getJavaCreateString() { StringBuilder sb = new StringBuilder(); sb.append("new com.caucho.v5.make.DependencyList()"); for (int i = 0; i < _dependencyList.size(); i++) { sb.append(".add("); sb.append(_dependencyList.get(i).getJavaCreateString()); sb.append(")"); } ...
java
public String getJavaCreateString() { StringBuilder sb = new StringBuilder(); sb.append("new com.caucho.v5.make.DependencyList()"); for (int i = 0; i < _dependencyList.size(); i++) { sb.append(".add("); sb.append(_dependencyList.get(i).getJavaCreateString()); sb.append(")"); } ...
[ "public", "String", "getJavaCreateString", "(", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "sb", ".", "append", "(", "\"new com.caucho.v5.make.DependencyList()\"", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", ...
Returns a string to recreate the dependency.
[ "Returns", "a", "string", "to", "recreate", "the", "dependency", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/make/DependencyList.java#L122-L135
44,414
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java
RequestHttpBase.initRequest
protected void initRequest() { _hostHeader = null; _xForwardedHostHeader = null; _expect100Continue = false; _cookies.clear(); _contentLengthIn = -1; _hasReadStream = false; _readEncoding = null; //_request = request; //_requestFacade = getHttp().createFacade(this); _...
java
protected void initRequest() { _hostHeader = null; _xForwardedHostHeader = null; _expect100Continue = false; _cookies.clear(); _contentLengthIn = -1; _hasReadStream = false; _readEncoding = null; //_request = request; //_requestFacade = getHttp().createFacade(this); _...
[ "protected", "void", "initRequest", "(", ")", "{", "_hostHeader", "=", "null", ";", "_xForwardedHostHeader", "=", "null", ";", "_expect100Continue", "=", "false", ";", "_cookies", ".", "clear", "(", ")", ";", "_contentLengthIn", "=", "-", "1", ";", "_hasRead...
Prepare the Request object for a new request. @param httpBuffer the raw connection stream
[ "Prepare", "the", "Request", "object", "for", "a", "new", "request", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java#L352-L395
44,415
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java
RequestHttpBase.clientDisconnect
public void clientDisconnect() { try { OutHttpApp responseStream = _responseStream; if (responseStream != null) { responseStream.close(); } } catch (Exception e) { log.log(Level.FINER, e.toString(), e); } ConnectionTcp conn = connTcp(); if (conn != null...
java
public void clientDisconnect() { try { OutHttpApp responseStream = _responseStream; if (responseStream != null) { responseStream.close(); } } catch (Exception e) { log.log(Level.FINER, e.toString(), e); } ConnectionTcp conn = connTcp(); if (conn != null...
[ "public", "void", "clientDisconnect", "(", ")", "{", "try", "{", "OutHttpApp", "responseStream", "=", "_responseStream", ";", "if", "(", "responseStream", "!=", "null", ")", "{", "responseStream", ".", "close", "(", ")", ";", "}", "}", "catch", "(", "Excep...
Called when the client has disconnected
[ "Called", "when", "the", "client", "has", "disconnected" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java#L578-L597
44,416
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java
RequestHttpBase.getServerPort
public int getServerPort() { String host = null; CharSequence rawHost; if ((rawHost = getHost()) != null) { int length = rawHost.length(); int i; for (i = length - 1; i >= 0; i--) { if (rawHost.charAt(i) == ':') { int port = 0; for (i++; i < length; i++) { ...
java
public int getServerPort() { String host = null; CharSequence rawHost; if ((rawHost = getHost()) != null) { int length = rawHost.length(); int i; for (i = length - 1; i >= 0; i--) { if (rawHost.charAt(i) == ':') { int port = 0; for (i++; i < length; i++) { ...
[ "public", "int", "getServerPort", "(", ")", "{", "String", "host", "=", "null", ";", "CharSequence", "rawHost", ";", "if", "(", "(", "rawHost", "=", "getHost", "(", ")", ")", "!=", "null", ")", "{", "int", "length", "=", "rawHost", ".", "length", "("...
Returns the server's port.
[ "Returns", "the", "server", "s", "port", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java#L617-L670
44,417
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java
RequestHttpBase.getHeaderBuffer
public CharSegment getHeaderBuffer(String name) { String value = header(name); if (value != null) return new CharBuffer(value); else return null; }
java
public CharSegment getHeaderBuffer(String name) { String value = header(name); if (value != null) return new CharBuffer(value); else return null; }
[ "public", "CharSegment", "getHeaderBuffer", "(", "String", "name", ")", "{", "String", "value", "=", "header", "(", "name", ")", ";", "if", "(", "value", "!=", "null", ")", "return", "new", "CharBuffer", "(", "value", ")", ";", "else", "return", "null", ...
Fills the result with the header values as CharSegment values. Most implementations will implement this directly. @param name the header name
[ "Fills", "the", "result", "with", "the", "header", "values", "as", "CharSegment", "values", ".", "Most", "implementations", "will", "implement", "this", "directly", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java#L777-L785
44,418
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java
RequestHttpBase.addHeaderInt
protected boolean addHeaderInt(char []keyBuf, int keyOff, int keyLen, CharSegment value) { if (keyLen < 4) { return true; } int key1 = keyBuf[keyOff] | 0x20 | (keyLen << 8); switch (key1) { case CONNECTION_KEY: if (match(keyBuf, keyOff, keyLen, CO...
java
protected boolean addHeaderInt(char []keyBuf, int keyOff, int keyLen, CharSegment value) { if (keyLen < 4) { return true; } int key1 = keyBuf[keyOff] | 0x20 | (keyLen << 8); switch (key1) { case CONNECTION_KEY: if (match(keyBuf, keyOff, keyLen, CO...
[ "protected", "boolean", "addHeaderInt", "(", "char", "[", "]", "keyBuf", ",", "int", "keyOff", ",", "int", "keyLen", ",", "CharSegment", "value", ")", "{", "if", "(", "keyLen", "<", "4", ")", "{", "return", "true", ";", "}", "int", "key1", "=", "keyB...
Adds the header, checking for known values.
[ "Adds", "the", "header", "checking", "for", "known", "values", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java#L803-L893
44,419
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java
RequestHttpBase.match
private boolean match(char []a, int aOff, int aLength, char []b) { int bLength = b.length; if (aLength != bLength) return false; for (int i = aLength - 1; i >= 0; i--) { char chA = a[aOff + i]; char chB = b[i]; if (chA != chB && chA + 'a' - 'A' != chB) { return false; ...
java
private boolean match(char []a, int aOff, int aLength, char []b) { int bLength = b.length; if (aLength != bLength) return false; for (int i = aLength - 1; i >= 0; i--) { char chA = a[aOff + i]; char chB = b[i]; if (chA != chB && chA + 'a' - 'A' != chB) { return false; ...
[ "private", "boolean", "match", "(", "char", "[", "]", "a", ",", "int", "aOff", ",", "int", "aLength", ",", "char", "[", "]", "b", ")", "{", "int", "bLength", "=", "b", ".", "length", ";", "if", "(", "aLength", "!=", "bLength", ")", "return", "fal...
Matches case insensitively, with the second normalized to lower case.
[ "Matches", "case", "insensitively", "with", "the", "second", "normalized", "to", "lower", "case", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java#L927-L944
44,420
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java
RequestHttpBase.getHeaders
public Enumeration<String> getHeaders(String name) { String value = header(name); if (value == null) { return Collections.emptyEnumeration(); } ArrayList<String> list = new ArrayList<String>(); list.add(value); return Collections.enumeration(list); }
java
public Enumeration<String> getHeaders(String name) { String value = header(name); if (value == null) { return Collections.emptyEnumeration(); } ArrayList<String> list = new ArrayList<String>(); list.add(value); return Collections.enumeration(list); }
[ "public", "Enumeration", "<", "String", ">", "getHeaders", "(", "String", "name", ")", "{", "String", "value", "=", "header", "(", "name", ")", ";", "if", "(", "value", "==", "null", ")", "{", "return", "Collections", ".", "emptyEnumeration", "(", ")", ...
Returns an enumeration of the headers for the named attribute. @param name the header name
[ "Returns", "an", "enumeration", "of", "the", "headers", "for", "the", "named", "attribute", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java#L951-L963
44,421
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java
RequestHttpBase.getHeaderBuffers
public void getHeaderBuffers(String name, ArrayList<CharSegment> resultList) { String value = header(name); if (value != null) resultList.add(new CharBuffer(value)); }
java
public void getHeaderBuffers(String name, ArrayList<CharSegment> resultList) { String value = header(name); if (value != null) resultList.add(new CharBuffer(value)); }
[ "public", "void", "getHeaderBuffers", "(", "String", "name", ",", "ArrayList", "<", "CharSegment", ">", "resultList", ")", "{", "String", "value", "=", "header", "(", "name", ")", ";", "if", "(", "value", "!=", "null", ")", "resultList", ".", "add", "(",...
Fills the result with a list of the header values as CharSegment values. Most implementations will implement this directly. @param name the header name @param resultList the resulting buffer
[ "Fills", "the", "result", "with", "a", "list", "of", "the", "header", "values", "as", "CharSegment", "values", ".", "Most", "implementations", "will", "implement", "this", "directly", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java#L973-L979
44,422
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java
RequestHttpBase.getIntHeader
public int getIntHeader(String key) { CharSegment value = getHeaderBuffer(key); if (value == null) return -1; int len = value.length(); if (len == 0) throw new NumberFormatException(value.toString()); int iValue = 0; int i = 0; int ch = value.charAt(i); int sign = 1; ...
java
public int getIntHeader(String key) { CharSegment value = getHeaderBuffer(key); if (value == null) return -1; int len = value.length(); if (len == 0) throw new NumberFormatException(value.toString()); int iValue = 0; int i = 0; int ch = value.charAt(i); int sign = 1; ...
[ "public", "int", "getIntHeader", "(", "String", "key", ")", "{", "CharSegment", "value", "=", "getHeaderBuffer", "(", "key", ")", ";", "if", "(", "value", "==", "null", ")", "return", "-", "1", ";", "int", "len", "=", "value", ".", "length", "(", ")"...
Returns the named header, converted to an integer. @param key the header key. @return the value of the header as an integer.
[ "Returns", "the", "named", "header", "converted", "to", "an", "integer", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java#L988-L1023
44,423
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java
RequestHttpBase.encoding
public String encoding() { if (_readEncoding != null) return _readEncoding; CharSegment value = getHeaderBuffer("Content-Type"); if (value == null) return null; int i = value.indexOf("charset"); if (i < 0) return null; int len = value.length(); for (i += 7; i < len &&...
java
public String encoding() { if (_readEncoding != null) return _readEncoding; CharSegment value = getHeaderBuffer("Content-Type"); if (value == null) return null; int i = value.indexOf("charset"); if (i < 0) return null; int len = value.length(); for (i += 7; i < len &&...
[ "public", "String", "encoding", "(", ")", "{", "if", "(", "_readEncoding", "!=", "null", ")", "return", "_readEncoding", ";", "CharSegment", "value", "=", "getHeaderBuffer", "(", "\"Content-Type\"", ")", ";", "if", "(", "value", "==", "null", ")", "return", ...
Returns the character encoding of a post.
[ "Returns", "the", "character", "encoding", "of", "a", "post", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java#L1052-L1102
44,424
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java
RequestHttpBase.fillCookies
CookieWeb []fillCookies() { int size = _cookies.size(); if (size > 0) { CookieWeb []cookiesIn = new WebCookie[size]; for (int i = size - 1; i >= 0; i--) { cookiesIn[i] = _cookies.get(i); } return cookiesIn; } else { return NULL_COOKIES; } }
java
CookieWeb []fillCookies() { int size = _cookies.size(); if (size > 0) { CookieWeb []cookiesIn = new WebCookie[size]; for (int i = size - 1; i >= 0; i--) { cookiesIn[i] = _cookies.get(i); } return cookiesIn; } else { return NULL_COOKIES; } }
[ "CookieWeb", "[", "]", "fillCookies", "(", ")", "{", "int", "size", "=", "_cookies", ".", "size", "(", ")", ";", "if", "(", "size", ">", "0", ")", "{", "CookieWeb", "[", "]", "cookiesIn", "=", "new", "WebCookie", "[", "size", "]", ";", "for", "("...
Parses cookie information from the cookie headers.
[ "Parses", "cookie", "information", "from", "the", "cookie", "headers", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java#L1159-L1175
44,425
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java
RequestHttpBase.finishRequest
private void finishRequest() throws IOException { try { cleanup(); } catch (Exception e) { log.log(Level.WARNING, e.toString(), e); } finally { //_requestFacade = null; } }
java
private void finishRequest() throws IOException { try { cleanup(); } catch (Exception e) { log.log(Level.WARNING, e.toString(), e); } finally { //_requestFacade = null; } }
[ "private", "void", "finishRequest", "(", ")", "throws", "IOException", "{", "try", "{", "cleanup", "(", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "log", ".", "log", "(", "Level", ".", "WARNING", ",", "e", ".", "toString", "(", ")", "...
Cleans up at the end of the request
[ "Cleans", "up", "at", "the", "end", "of", "the", "request" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java#L1621-L1631
44,426
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java
RequestHttpBase.out
public final OutHttpApp out() { OutHttpApp stream = _responseStream; if (stream == null) { stream = createOut(); _responseStream = stream; } return stream; }
java
public final OutHttpApp out() { OutHttpApp stream = _responseStream; if (stream == null) { stream = createOut(); _responseStream = stream; } return stream; }
[ "public", "final", "OutHttpApp", "out", "(", ")", "{", "OutHttpApp", "stream", "=", "_responseStream", ";", "if", "(", "stream", "==", "null", ")", "{", "stream", "=", "createOut", "(", ")", ";", "_responseStream", "=", "stream", ";", "}", "return", "str...
Gets the response stream.
[ "Gets", "the", "response", "stream", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java#L1662-L1673
44,427
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java
RequestHttpBase.containsHeaderOut
public boolean containsHeaderOut(String name) { ArrayList<String> headerKeys = _headerKeysOut; int size = headerKeys.size(); for (int i = 0; i < size; i++) { String oldKey = headerKeys.get(i); if (oldKey.equalsIgnoreCase(name)) { return true; } } if (name.equalsIgn...
java
public boolean containsHeaderOut(String name) { ArrayList<String> headerKeys = _headerKeysOut; int size = headerKeys.size(); for (int i = 0; i < size; i++) { String oldKey = headerKeys.get(i); if (oldKey.equalsIgnoreCase(name)) { return true; } } if (name.equalsIgn...
[ "public", "boolean", "containsHeaderOut", "(", "String", "name", ")", "{", "ArrayList", "<", "String", ">", "headerKeys", "=", "_headerKeysOut", ";", "int", "size", "=", "headerKeys", ".", "size", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "...
Returns true if the response already contains the named header. @param name name of the header to test.
[ "Returns", "true", "if", "the", "response", "already", "contains", "the", "named", "header", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java#L1786-L1808
44,428
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java
RequestHttpBase.headerOut
public String headerOut(String name) { ArrayList<String> keys = _headerKeysOut; int headerSize = keys.size(); for (int i = 0; i < headerSize; i++) { String oldKey = keys.get(i); if (oldKey.equalsIgnoreCase(name)) { return (String) _headerValuesOut.get(i); } } /* if...
java
public String headerOut(String name) { ArrayList<String> keys = _headerKeysOut; int headerSize = keys.size(); for (int i = 0; i < headerSize; i++) { String oldKey = keys.get(i); if (oldKey.equalsIgnoreCase(name)) { return (String) _headerValuesOut.get(i); } } /* if...
[ "public", "String", "headerOut", "(", "String", "name", ")", "{", "ArrayList", "<", "String", ">", "keys", "=", "_headerKeysOut", ";", "int", "headerSize", "=", "keys", ".", "size", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "h...
Returns the value of an already set output header. @param name name of the header to get.
[ "Returns", "the", "value", "of", "an", "already", "set", "output", "header", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java#L1815-L1844
44,429
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java
RequestHttpBase.addHeaderOutImpl
public void addHeaderOutImpl(String key, String value) { if (headerOutSpecial(key, value)) { return; } ArrayList<String> keys = _headerKeysOut; ArrayList<String> values = _headerValuesOut; int size = keys.size(); // webapp/1k32 for (int i = 0; i < size; i++) { if...
java
public void addHeaderOutImpl(String key, String value) { if (headerOutSpecial(key, value)) { return; } ArrayList<String> keys = _headerKeysOut; ArrayList<String> values = _headerValuesOut; int size = keys.size(); // webapp/1k32 for (int i = 0; i < size; i++) { if...
[ "public", "void", "addHeaderOutImpl", "(", "String", "key", ",", "String", "value", ")", "{", "if", "(", "headerOutSpecial", "(", "key", ",", "value", ")", ")", "{", "return", ";", "}", "ArrayList", "<", "String", ">", "keys", "=", "_headerKeysOut", ";",...
Adds a new header. If an old header with that name exists, both headers are output. @param key the header key. @param value the header value.
[ "Adds", "a", "new", "header", ".", "If", "an", "old", "header", "with", "that", "name", "exists", "both", "headers", "are", "output", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java#L1928-L1948
44,430
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java
RequestHttpBase.headerOutSpecial
private boolean headerOutSpecial(String key, String value) { int length = key.length(); if (length == 0) { return false; } int ch = key.charAt(0); if ('A' <= ch && ch <= 'Z') { ch += 'a' - 'A'; } int code = (length << 8) + ch; switch (code) { ca...
java
private boolean headerOutSpecial(String key, String value) { int length = key.length(); if (length == 0) { return false; } int ch = key.charAt(0); if ('A' <= ch && ch <= 'Z') { ch += 'a' - 'A'; } int code = (length << 8) + ch; switch (code) { ca...
[ "private", "boolean", "headerOutSpecial", "(", "String", "key", ",", "String", "value", ")", "{", "int", "length", "=", "key", ".", "length", "(", ")", ";", "if", "(", "length", "==", "0", ")", "{", "return", "false", ";", "}", "int", "ch", "=", "k...
Special processing for a special value.
[ "Special", "processing", "for", "a", "special", "value", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java#L1966-L2051
44,431
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java
RequestHttpBase.setFooter
public void setFooter(String key, String value) { Objects.requireNonNull(value); int i = 0; boolean hasFooter = false; for (i = _footerKeys.size() - 1; i >= 0; i--) { String oldKey = _footerKeys.get(i); if (oldKey.equalsIgnoreCase(key)) { if (hasFooter) { _footerKeys.r...
java
public void setFooter(String key, String value) { Objects.requireNonNull(value); int i = 0; boolean hasFooter = false; for (i = _footerKeys.size() - 1; i >= 0; i--) { String oldKey = _footerKeys.get(i); if (oldKey.equalsIgnoreCase(key)) { if (hasFooter) { _footerKeys.r...
[ "public", "void", "setFooter", "(", "String", "key", ",", "String", "value", ")", "{", "Objects", ".", "requireNonNull", "(", "value", ")", ";", "int", "i", "=", "0", ";", "boolean", "hasFooter", "=", "false", ";", "for", "(", "i", "=", "_footerKeys", ...
Sets a footer, replacing an already-existing footer @param key the header key to set. @param value the header value to set.
[ "Sets", "a", "footer", "replacing", "an", "already", "-", "existing", "footer" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java#L2214-L2241
44,432
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java
RequestHttpBase.addFooter
public void addFooter(String key, String value) { if (headerOutSpecial(key, value)) { return; } _footerKeys.add(key); _footerValues.add(value); }
java
public void addFooter(String key, String value) { if (headerOutSpecial(key, value)) { return; } _footerKeys.add(key); _footerValues.add(value); }
[ "public", "void", "addFooter", "(", "String", "key", ",", "String", "value", ")", "{", "if", "(", "headerOutSpecial", "(", "key", ",", "value", ")", ")", "{", "return", ";", "}", "_footerKeys", ".", "add", "(", "key", ")", ";", "_footerValues", ".", ...
Adds a new footer. If an old footer with that name exists, both footers are output. @param key the footer key. @param value the footer value.
[ "Adds", "a", "new", "footer", ".", "If", "an", "old", "footer", "with", "that", "name", "exists", "both", "footers", "are", "output", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java#L2250-L2258
44,433
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java
RequestHttpBase.isOutCommitted
public final boolean isOutCommitted() { OutHttpApp stream = out(); if (stream.isCommitted()) { return true; } // server/05a7 if (_contentLengthOut > 0 && _contentLengthOut <= stream.contentLength()) { return true; } return false; }
java
public final boolean isOutCommitted() { OutHttpApp stream = out(); if (stream.isCommitted()) { return true; } // server/05a7 if (_contentLengthOut > 0 && _contentLengthOut <= stream.contentLength()) { return true; } return false; }
[ "public", "final", "boolean", "isOutCommitted", "(", ")", "{", "OutHttpApp", "stream", "=", "out", "(", ")", ";", "if", "(", "stream", ".", "isCommitted", "(", ")", ")", "{", "return", "true", ";", "}", "// server/05a7", "if", "(", "_contentLengthOut", "...
Returns true if some data has been sent to the browser.
[ "Returns", "true", "if", "some", "data", "has", "been", "sent", "to", "the", "browser", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java#L2282-L2296
44,434
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java
RequestHttpBase.contentLengthSent
public long contentLengthSent() { OutHttpApp stream = _responseStream; // stream can be null for duplex (websocket) if (stream != null) { return stream.contentLength(); } else { return Math.max(_contentLengthOut, 0); } }
java
public long contentLengthSent() { OutHttpApp stream = _responseStream; // stream can be null for duplex (websocket) if (stream != null) { return stream.contentLength(); } else { return Math.max(_contentLengthOut, 0); } }
[ "public", "long", "contentLengthSent", "(", ")", "{", "OutHttpApp", "stream", "=", "_responseStream", ";", "// stream can be null for duplex (websocket)", "if", "(", "stream", "!=", "null", ")", "{", "return", "stream", ".", "contentLength", "(", ")", ";", "}", ...
Returns the number of bytes sent to the output.
[ "Returns", "the", "number", "of", "bytes", "sent", "to", "the", "output", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/RequestHttpBase.java#L2318-L2329
44,435
baratine/baratine
web/src/main/java/com/caucho/v5/jni/SelectManagerJni.java
SelectManagerJni.enableKeepalive
private boolean enableKeepalive(PollController conn, boolean isNew) throws IOException { if (_selectMax <= _connectionCount.get()) { throw new IllegalStateException(this + " keepalive overflow " + _connectionCount + " max=" +...
java
private boolean enableKeepalive(PollController conn, boolean isNew) throws IOException { if (_selectMax <= _connectionCount.get()) { throw new IllegalStateException(this + " keepalive overflow " + _connectionCount + " max=" +...
[ "private", "boolean", "enableKeepalive", "(", "PollController", "conn", ",", "boolean", "isNew", ")", "throws", "IOException", "{", "if", "(", "_selectMax", "<=", "_connectionCount", ".", "get", "(", ")", ")", "{", "throw", "new", "IllegalStateException", "(", ...
Enables keepalive and checks to see if data is available. @return true if a read would block (keepalive is required)
[ "Enables", "keepalive", "and", "checks", "to", "see", "if", "data", "is", "available", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/jni/SelectManagerJni.java#L302-L352
44,436
baratine/baratine
web/src/main/java/com/caucho/v5/jni/SelectManagerJni.java
SelectManagerJni.runSelectTask
private void runSelectTask() { if (_lifecycle.isActive() || _lifecycle.isAfterStopping()) { log.warning(this + " cannot start because an instance is active"); return; } initNative(_fd); synchronized (_thread) { _thread.notify(); } if (! _lifecycle.toActive()) { log.w...
java
private void runSelectTask() { if (_lifecycle.isActive() || _lifecycle.isAfterStopping()) { log.warning(this + " cannot start because an instance is active"); return; } initNative(_fd); synchronized (_thread) { _thread.notify(); } if (! _lifecycle.toActive()) { log.w...
[ "private", "void", "runSelectTask", "(", ")", "{", "if", "(", "_lifecycle", ".", "isActive", "(", ")", "||", "_lifecycle", ".", "isAfterStopping", "(", ")", ")", "{", "log", ".", "warning", "(", "this", "+", "\" cannot start because an instance is active\"", "...
Running process accepting connections.
[ "Running", "process", "accepting", "connections", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/jni/SelectManagerJni.java#L363-L382
44,437
SeaCloudsEU/SeaCloudsPlatform
planner/core/src/main/java/eu/seaclouds/platform/planner/core/resolver/DeployerTypesResolver.java
DeployerTypesResolver.initTypesMapping
@SuppressWarnings("unchecked") private void initTypesMapping() { if (mapping == null) { throw new IllegalStateException("Mapping does contain any information in " + "DeployerTypesResolver " + this); } if (mapping.containsKey(NODE_TYPES_MAPPING_SECTION)) { ...
java
@SuppressWarnings("unchecked") private void initTypesMapping() { if (mapping == null) { throw new IllegalStateException("Mapping does contain any information in " + "DeployerTypesResolver " + this); } if (mapping.containsKey(NODE_TYPES_MAPPING_SECTION)) { ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "void", "initTypesMapping", "(", ")", "{", "if", "(", "mapping", "==", "null", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Mapping does contain any information in \"", "+", "\"DeployerTypesR...
Initialize the different types mapping.
[ "Initialize", "the", "different", "types", "mapping", "." ]
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/planner/core/src/main/java/eu/seaclouds/platform/planner/core/resolver/DeployerTypesResolver.java#L56-L83
44,438
baratine/baratine
web/src/main/java/com/caucho/v5/network/port/ConnectionTcp.java
ConnectionTcp.addressRemote
@Override public int addressRemote(byte []buffer, int offset, int length) { return _socket.getRemoteAddress(buffer, offset, length); }
java
@Override public int addressRemote(byte []buffer, int offset, int length) { return _socket.getRemoteAddress(buffer, offset, length); }
[ "@", "Override", "public", "int", "addressRemote", "(", "byte", "[", "]", "buffer", ",", "int", "offset", ",", "int", "length", ")", "{", "return", "_socket", ".", "getRemoteAddress", "(", "buffer", ",", "offset", ",", "length", ")", ";", "}" ]
Adds from the socket's remote address.
[ "Adds", "from", "the", "socket", "s", "remote", "address", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/network/port/ConnectionTcp.java#L353-L357
44,439
baratine/baratine
web/src/main/java/com/caucho/v5/network/port/ConnectionTcp.java
ConnectionTcp.requestWake
@Override public void requestWake() { try { _state = _state.toWake(); requestLoop(); } catch (Exception e) { log.log(Level.WARNING, e.toString(), e); } /* if (_stateRef.get().toWake(_stateRef)) { offer(getConnectionTask()); } */ }
java
@Override public void requestWake() { try { _state = _state.toWake(); requestLoop(); } catch (Exception e) { log.log(Level.WARNING, e.toString(), e); } /* if (_stateRef.get().toWake(_stateRef)) { offer(getConnectionTask()); } */ }
[ "@", "Override", "public", "void", "requestWake", "(", ")", "{", "try", "{", "_state", "=", "_state", ".", "toWake", "(", ")", ";", "requestLoop", "(", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "log", ".", "log", "(", "Level", ".", ...
Wake a connection. The connection may be idle because it's received a close-read but HTTP is still processing. When the HTTP write completes, it will wake the read thread.
[ "Wake", "a", "connection", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/network/port/ConnectionTcp.java#L526-L542
44,440
baratine/baratine
web/src/main/java/com/caucho/v5/network/port/ConnectionTcp.java
ConnectionTcp.processPoll
private StateConnection processPoll() throws IOException { PortTcp port = _port; if (port.isClosed()) { return StateConnection.DESTROY; } if (readStream().available() > 0) { return StateConnection.ACTIVE; } long timeout = _idleTimeout; _idleStartTime = CurrentTime.curre...
java
private StateConnection processPoll() throws IOException { PortTcp port = _port; if (port.isClosed()) { return StateConnection.DESTROY; } if (readStream().available() > 0) { return StateConnection.ACTIVE; } long timeout = _idleTimeout; _idleStartTime = CurrentTime.curre...
[ "private", "StateConnection", "processPoll", "(", ")", "throws", "IOException", "{", "PortTcp", "port", "=", "_port", ";", "if", "(", "port", ".", "isClosed", "(", ")", ")", "{", "return", "StateConnection", ".", "DESTROY", ";", "}", "if", "(", "readStream...
Starts a keepalive, either returning available data or returning false to close the loop If keepaliveRead() returns true, data is available. If it returns false, either the connection is closed, or the connection has been registered with the select.
[ "Starts", "a", "keepalive", "either", "returning", "available", "data", "or", "returning", "false", "to", "close", "the", "loop" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/network/port/ConnectionTcp.java#L769-L865
44,441
baratine/baratine
web/src/main/java/com/caucho/v5/network/port/ConnectionTcp.java
ConnectionTcp.initSocket
private void initSocket() throws IOException { _idleTimeout = _port.getKeepaliveTimeout(); _port.ssl(_socket); writeStream().init(_socket.stream()); // ReadStream cannot use getWriteStream or auto-flush // because of duplex mode // ReadStream is = getReadStream(); _readStream.init(_...
java
private void initSocket() throws IOException { _idleTimeout = _port.getKeepaliveTimeout(); _port.ssl(_socket); writeStream().init(_socket.stream()); // ReadStream cannot use getWriteStream or auto-flush // because of duplex mode // ReadStream is = getReadStream(); _readStream.init(_...
[ "private", "void", "initSocket", "(", ")", "throws", "IOException", "{", "_idleTimeout", "=", "_port", ".", "getKeepaliveTimeout", "(", ")", ";", "_port", ".", "ssl", "(", "_socket", ")", ";", "writeStream", "(", ")", ".", "init", "(", "_socket", ".", "s...
Initialize the socket for a new connection
[ "Initialize", "the", "socket", "for", "a", "new", "connection" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/network/port/ConnectionTcp.java#L925-L943
44,442
baratine/baratine
web/src/main/java/com/caucho/v5/network/port/ConnectionTcp.java
ConnectionTcp.destroy
private void destroy() { if (log.isLoggable(Level.FINEST)) { log.finest(this + " destroying connection"); } try { _socket.forceShutdown(); } catch (Throwable e) { } try { closeConnection(); } catch (Throwable e) { log.log(Level.FINER, e.toString(), e); } ...
java
private void destroy() { if (log.isLoggable(Level.FINEST)) { log.finest(this + " destroying connection"); } try { _socket.forceShutdown(); } catch (Throwable e) { } try { closeConnection(); } catch (Throwable e) { log.log(Level.FINER, e.toString(), e); } ...
[ "private", "void", "destroy", "(", ")", "{", "if", "(", "log", ".", "isLoggable", "(", "Level", ".", "FINEST", ")", ")", "{", "log", ".", "finest", "(", "this", "+", "\" destroying connection\"", ")", ";", "}", "try", "{", "_socket", ".", "forceShutdow...
Destroy kills the connection and drops it from the connection pool. Destroy should only occur if the connection state machine has failed or
[ "Destroy", "kills", "the", "connection", "and", "drops", "it", "from", "the", "connection", "pool", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/network/port/ConnectionTcp.java#L1128-L1147
44,443
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/JarWithStream.java
JarWithStream.isCacheValid
private boolean isCacheValid() { long now = CurrentTime.currentTime(); if ((now - _lastTime < 100) && ! CurrentTime.isTest()) return true; long oldLastModified = _lastModified; long oldLength = _length; long newLastModified = getBacking().getLastModified(); long newLength = getBac...
java
private boolean isCacheValid() { long now = CurrentTime.currentTime(); if ((now - _lastTime < 100) && ! CurrentTime.isTest()) return true; long oldLastModified = _lastModified; long oldLength = _length; long newLastModified = getBacking().getLastModified(); long newLength = getBac...
[ "private", "boolean", "isCacheValid", "(", ")", "{", "long", "now", "=", "CurrentTime", ".", "currentTime", "(", ")", ";", "if", "(", "(", "now", "-", "_lastTime", "<", "100", ")", "&&", "!", "CurrentTime", ".", "isTest", "(", ")", ")", "return", "tr...
Returns the last modified time for the path. @return the last modified time of the jar in milliseconds.
[ "Returns", "the", "last", "modified", "time", "for", "the", "path", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/JarWithStream.java#L242-L276
44,444
baratine/baratine
core/src/main/java/com/caucho/v5/util/WeakAlarm.java
WeakAlarm.setContextLoader
@Override public void setContextLoader(ClassLoader loader) { if (loader != null) _loaderRef = new WeakReference<ClassLoader>(loader); else _loaderRef = null; }
java
@Override public void setContextLoader(ClassLoader loader) { if (loader != null) _loaderRef = new WeakReference<ClassLoader>(loader); else _loaderRef = null; }
[ "@", "Override", "public", "void", "setContextLoader", "(", "ClassLoader", "loader", ")", "{", "if", "(", "loader", "!=", "null", ")", "_loaderRef", "=", "new", "WeakReference", "<", "ClassLoader", ">", "(", "loader", ")", ";", "else", "_loaderRef", "=", "...
Sets the class loader.
[ "Sets", "the", "class", "loader", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/util/WeakAlarm.java#L122-L129
44,445
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JClassLoaderWrapper.java
JClassLoaderWrapper.create
public static JClassLoaderWrapper create(ClassLoader loader) { JClassLoaderWrapper jLoader = _localClassLoader.getLevel(loader); if (jLoader == null) { jLoader = new JClassLoaderWrapper(loader); _localClassLoader.set(jLoader, loader); } return jLoader; }
java
public static JClassLoaderWrapper create(ClassLoader loader) { JClassLoaderWrapper jLoader = _localClassLoader.getLevel(loader); if (jLoader == null) { jLoader = new JClassLoaderWrapper(loader); _localClassLoader.set(jLoader, loader); } return jLoader; }
[ "public", "static", "JClassLoaderWrapper", "create", "(", "ClassLoader", "loader", ")", "{", "JClassLoaderWrapper", "jLoader", "=", "_localClassLoader", ".", "getLevel", "(", "loader", ")", ";", "if", "(", "jLoader", "==", "null", ")", "{", "jLoader", "=", "ne...
Creates the class loader with the context class loader.
[ "Creates", "the", "class", "loader", "with", "the", "context", "class", "loader", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JClassLoaderWrapper.java#L65-L75
44,446
baratine/baratine
framework/src/main/java/com/caucho/v5/ramp/vault/MethodParserVault.java
MethodParserVault.parseBy
private ByExpressionBuilder parseBy() { ByExpressionBuilder by = new ByExpressionBuilder(); int x = _parseIndex; Token token = scanToken(); if (token == null) throw new IllegalStateException(L.l("expected field name at {0} in {1}", x, ...
java
private ByExpressionBuilder parseBy() { ByExpressionBuilder by = new ByExpressionBuilder(); int x = _parseIndex; Token token = scanToken(); if (token == null) throw new IllegalStateException(L.l("expected field name at {0} in {1}", x, ...
[ "private", "ByExpressionBuilder", "parseBy", "(", ")", "{", "ByExpressionBuilder", "by", "=", "new", "ByExpressionBuilder", "(", ")", ";", "int", "x", "=", "_parseIndex", ";", "Token", "token", "=", "scanToken", "(", ")", ";", "if", "(", "token", "==", "nu...
Parse the "by" expression in the method name.
[ "Parse", "the", "by", "expression", "in", "the", "method", "name", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/ramp/vault/MethodParserVault.java#L235-L333
44,447
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/CaseInsensitive.java
CaseInsensitive.isCaseInsensitive
public static boolean isCaseInsensitive() { Boolean value = _caseInsensitive.get(); if (value == null) { return _isCaseInsensitive; } else return value.booleanValue(); }
java
public static boolean isCaseInsensitive() { Boolean value = _caseInsensitive.get(); if (value == null) { return _isCaseInsensitive; } else return value.booleanValue(); }
[ "public", "static", "boolean", "isCaseInsensitive", "(", ")", "{", "Boolean", "value", "=", "_caseInsensitive", ".", "get", "(", ")", ";", "if", "(", "value", "==", "null", ")", "{", "return", "_isCaseInsensitive", ";", "}", "else", "return", "value", ".",...
Returns true if the local environment is case sensitive.
[ "Returns", "true", "if", "the", "local", "environment", "is", "case", "sensitive", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/CaseInsensitive.java#L54-L63
44,448
baratine/baratine
framework/src/main/java/com/caucho/v5/loader/JarListLoader.java
JarListLoader.validate
@Override public void validate() throws ConfigException { for (int i = 0; i < _jarList.size(); i++) { _jarList.get(i).validate(); } }
java
@Override public void validate() throws ConfigException { for (int i = 0; i < _jarList.size(); i++) { _jarList.get(i).validate(); } }
[ "@", "Override", "public", "void", "validate", "(", ")", "throws", "ConfigException", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "_jarList", ".", "size", "(", ")", ";", "i", "++", ")", "{", "_jarList", ".", "get", "(", "i", ")", ".", ...
Validates the loader.
[ "Validates", "the", "loader", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/loader/JarListLoader.java#L138-L145
44,449
baratine/baratine
framework/src/main/java/com/caucho/v5/loader/JarListLoader.java
JarListLoader.getResources
@Override public void getResources(Vector<URL> vector, String name) { if (_pathMap != null) { String cleanName = name; if (cleanName.endsWith("/")) cleanName = cleanName.substring(0, cleanName.length() - 1); JarMap.JarList jarEntryList = _pathMap.get(cleanName); fo...
java
@Override public void getResources(Vector<URL> vector, String name) { if (_pathMap != null) { String cleanName = name; if (cleanName.endsWith("/")) cleanName = cleanName.substring(0, cleanName.length() - 1); JarMap.JarList jarEntryList = _pathMap.get(cleanName); fo...
[ "@", "Override", "public", "void", "getResources", "(", "Vector", "<", "URL", ">", "vector", ",", "String", "name", ")", "{", "if", "(", "_pathMap", "!=", "null", ")", "{", "String", "cleanName", "=", "name", ";", "if", "(", "cleanName", ".", "endsWith...
Adds resources to the enumeration.
[ "Adds", "resources", "to", "the", "enumeration", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/loader/JarListLoader.java#L326-L372
44,450
baratine/baratine
framework/src/main/java/com/caucho/v5/loader/JarListLoader.java
JarListLoader.getPath
@Override public PathImpl getPath(String pathName) { if (_pathMap != null) { String cleanPathName = pathName; if (cleanPathName.endsWith("/")) cleanPathName = cleanPathName.substring(0, cleanPathName.length() - 1); JarMap.JarList jarEntryList = _pathMap.get(cleanPathName)...
java
@Override public PathImpl getPath(String pathName) { if (_pathMap != null) { String cleanPathName = pathName; if (cleanPathName.endsWith("/")) cleanPathName = cleanPathName.substring(0, cleanPathName.length() - 1); JarMap.JarList jarEntryList = _pathMap.get(cleanPathName)...
[ "@", "Override", "public", "PathImpl", "getPath", "(", "String", "pathName", ")", "{", "if", "(", "_pathMap", "!=", "null", ")", "{", "String", "cleanPathName", "=", "pathName", ";", "if", "(", "cleanPathName", ".", "endsWith", "(", "\"/\"", ")", ")", "c...
Find a given path somewhere in the classpath @param pathName the relative resourceName @return the matching path or null
[ "Find", "a", "given", "path", "somewhere", "in", "the", "classpath" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/loader/JarListLoader.java#L381-L409
44,451
baratine/baratine
framework/src/main/java/com/caucho/v5/loader/JarListLoader.java
JarListLoader.clearJars
protected void clearJars() { synchronized (this) { ArrayList<JarEntry> jars = new ArrayList<JarEntry>(_jarList); _jarList.clear(); if (_pathMap != null) _pathMap.clear(); for (int i = 0; i < jars.size(); i++) { JarEntry jarEntry = jars.get(i); JarPath jarPath...
java
protected void clearJars() { synchronized (this) { ArrayList<JarEntry> jars = new ArrayList<JarEntry>(_jarList); _jarList.clear(); if (_pathMap != null) _pathMap.clear(); for (int i = 0; i < jars.size(); i++) { JarEntry jarEntry = jars.get(i); JarPath jarPath...
[ "protected", "void", "clearJars", "(", ")", "{", "synchronized", "(", "this", ")", "{", "ArrayList", "<", "JarEntry", ">", "jars", "=", "new", "ArrayList", "<", "JarEntry", ">", "(", "_jarList", ")", ";", "_jarList", ".", "clear", "(", ")", ";", "if", ...
Closes the jars.
[ "Closes", "the", "jars", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/loader/JarListLoader.java#L414-L431
44,452
baratine/baratine
web/src/main/java/com/caucho/v5/health/meter/MeterAverage.java
MeterAverage.sampleSigma
public final double sampleSigma(int n) { synchronized (_lock) { long count = _count.get(); long lastCount = _lastStdCount; _lastStdCount = count; double sum = _sum.get(); double lastSum = _lastStdSum; _lastStdSum = sum; double sumSquare = _sumSquare; _sumSquare = ...
java
public final double sampleSigma(int n) { synchronized (_lock) { long count = _count.get(); long lastCount = _lastStdCount; _lastStdCount = count; double sum = _sum.get(); double lastSum = _lastStdSum; _lastStdSum = sum; double sumSquare = _sumSquare; _sumSquare = ...
[ "public", "final", "double", "sampleSigma", "(", "int", "n", ")", "{", "synchronized", "(", "_lock", ")", "{", "long", "count", "=", "_count", ".", "get", "(", ")", ";", "long", "lastCount", "=", "_lastStdCount", ";", "_lastStdCount", "=", "count", ";", ...
Return the probe's next 2-sigma
[ "Return", "the", "probe", "s", "next", "2", "-", "sigma" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/health/meter/MeterAverage.java#L144-L171
44,453
chyxion/table-to-xls
src/main/java/me/chyxion/xls/css/CssUtils.java
CssUtils.getInt
public static int getInt(String strValue) { int value = 0; if (StringUtils.isNotBlank(strValue)) { Matcher m = Pattern.compile("^(\\d+)(?:\\w+|%)?$").matcher(strValue); if (m.find()) { value = Integer.parseInt(m.group(1)); } } return value; }
java
public static int getInt(String strValue) { int value = 0; if (StringUtils.isNotBlank(strValue)) { Matcher m = Pattern.compile("^(\\d+)(?:\\w+|%)?$").matcher(strValue); if (m.find()) { value = Integer.parseInt(m.group(1)); } } return value; }
[ "public", "static", "int", "getInt", "(", "String", "strValue", ")", "{", "int", "value", "=", "0", ";", "if", "(", "StringUtils", ".", "isNotBlank", "(", "strValue", ")", ")", "{", "Matcher", "m", "=", "Pattern", ".", "compile", "(", "\"^(\\\\d+)(?:\\\\...
get int value of string @param strValue string value @return int value
[ "get", "int", "value", "of", "string" ]
8dc0ab06b336c65ce949a974fb4930ee24d54ba7
https://github.com/chyxion/table-to-xls/blob/8dc0ab06b336c65ce949a974fb4930ee24d54ba7/src/main/java/me/chyxion/xls/css/CssUtils.java#L70-L79
44,454
baratine/baratine
web/src/main/java/com/caucho/v5/network/port/PortTcp.java
PortTcp.isKeepaliveAllowed
boolean isKeepaliveAllowed(long connectionStartTime) { if (! _lifecycle.isActive()) { return false; } else if (connectionStartTime + _keepaliveTimeMax < CurrentTime.currentTime()) { return false; } else if (_keepaliveMax <= _keepaliveAllocateCount.get()) { return false; } ...
java
boolean isKeepaliveAllowed(long connectionStartTime) { if (! _lifecycle.isActive()) { return false; } else if (connectionStartTime + _keepaliveTimeMax < CurrentTime.currentTime()) { return false; } else if (_keepaliveMax <= _keepaliveAllocateCount.get()) { return false; } ...
[ "boolean", "isKeepaliveAllowed", "(", "long", "connectionStartTime", ")", "{", "if", "(", "!", "_lifecycle", ".", "isActive", "(", ")", ")", "{", "return", "false", ";", "}", "else", "if", "(", "connectionStartTime", "+", "_keepaliveTimeMax", "<", "CurrentTime...
Allocates a keepalive for the connection. @param connectionStartTime - when the connection's accept occurred.
[ "Allocates", "a", "keepalive", "for", "the", "connection", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/network/port/PortTcp.java#L640-L661
44,455
baratine/baratine
web/src/main/java/com/caucho/v5/network/port/PortTcp.java
PortTcp.keepaliveThreadRead
int keepaliveThreadRead(ReadStream is, long timeoutConn) throws IOException { if (isClosed()) { return -1; } int available = is.availableBuffer(); if (available > 0) { return available; } long timeout = Math.min(getKeepaliveTimeout(), getSocketTimeout()); if (timeou...
java
int keepaliveThreadRead(ReadStream is, long timeoutConn) throws IOException { if (isClosed()) { return -1; } int available = is.availableBuffer(); if (available > 0) { return available; } long timeout = Math.min(getKeepaliveTimeout(), getSocketTimeout()); if (timeou...
[ "int", "keepaliveThreadRead", "(", "ReadStream", "is", ",", "long", "timeoutConn", ")", "throws", "IOException", "{", "if", "(", "isClosed", "(", ")", ")", "{", "return", "-", "1", ";", "}", "int", "available", "=", "is", ".", "availableBuffer", "(", ")"...
Reads data from a keepalive connection
[ "Reads", "data", "from", "a", "keepalive", "connection" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/network/port/PortTcp.java#L675-L758
44,456
baratine/baratine
web/src/main/java/com/caucho/v5/network/port/PortTcp.java
PortTcp.freeConnection
@Friend(ConnectionTcp.class) void freeConnection(ConnectionTcp conn) { if (removeConnection(conn)) { _idleConn.free(conn); } else if (isActive()) { // Thread.dumpStack(); System.out.println("Possible Double Close: " + this + " " + conn); } //_connThreadPool.wake(); }
java
@Friend(ConnectionTcp.class) void freeConnection(ConnectionTcp conn) { if (removeConnection(conn)) { _idleConn.free(conn); } else if (isActive()) { // Thread.dumpStack(); System.out.println("Possible Double Close: " + this + " " + conn); } //_connThreadPool.wake(); }
[ "@", "Friend", "(", "ConnectionTcp", ".", "class", ")", "void", "freeConnection", "(", "ConnectionTcp", "conn", ")", "{", "if", "(", "removeConnection", "(", "conn", ")", ")", "{", "_idleConn", ".", "free", "(", "conn", ")", ";", "}", "else", "if", "("...
Closes the stats for the connection.
[ "Closes", "the", "stats", "for", "the", "connection", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/network/port/PortTcp.java#L829-L841
44,457
SeaCloudsEU/SeaCloudsPlatform
monitor/seaclouds-data-collector/src/main/java/eu/seaclouds/monitor/datacollector/Registry.java
Registry.init
public void init(String dc_sync_period, String resources_keep_alive_period, String manager_ip, String manager_port) { if (registryInitialized) throw new RuntimeException("Registry was already initialized"); if (dc_sync_period != null) { CONFIG_SYNC_PERIOD = Integer.parseInt(dc...
java
public void init(String dc_sync_period, String resources_keep_alive_period, String manager_ip, String manager_port) { if (registryInitialized) throw new RuntimeException("Registry was already initialized"); if (dc_sync_period != null) { CONFIG_SYNC_PERIOD = Integer.parseInt(dc...
[ "public", "void", "init", "(", "String", "dc_sync_period", ",", "String", "resources_keep_alive_period", ",", "String", "manager_ip", ",", "String", "manager_port", ")", "{", "if", "(", "registryInitialized", ")", "throw", "new", "RuntimeException", "(", "\"Registry...
This method is used to initialized the collecting of each metric. It initializes a DCAgent with the manager_ip and manager_port parameters in order to communicate with Tower 4Clouds. It then build a DCDescriptor with the list of all the provided metrics and the set of monitored resources for each provided metric. It th...
[ "This", "method", "is", "used", "to", "initialized", "the", "collecting", "of", "each", "metric", ".", "It", "initializes", "a", "DCAgent", "with", "the", "manager_ip", "and", "manager_port", "parameters", "in", "order", "to", "communicate", "with", "Tower", "...
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/monitor/seaclouds-data-collector/src/main/java/eu/seaclouds/monitor/datacollector/Registry.java#L69-L111
44,458
SeaCloudsEU/SeaCloudsPlatform
monitor/seaclouds-data-collector/src/main/java/eu/seaclouds/monitor/datacollector/Registry.java
Registry.addResource
public static void addResource(String type, String id, String url){ //add the new resource to the list of the managed resources logger.info("Adding the following new resource to the Data Collector Descriptor: {}, {}", type, id); try { resources.put(new InternalCompo...
java
public static void addResource(String type, String id, String url){ //add the new resource to the list of the managed resources logger.info("Adding the following new resource to the Data Collector Descriptor: {}, {}", type, id); try { resources.put(new InternalCompo...
[ "public", "static", "void", "addResource", "(", "String", "type", ",", "String", "id", ",", "String", "url", ")", "{", "//add the new resource to the list of the managed resources", "logger", ".", "info", "(", "\"Adding the following new resource to the Data Collector Descrip...
This method allow to add a new monitored resource to the Registry. @param type the Type of the new resource to be added. @param id the id of the new resource to be added. @param url the String representation of the url of the new resource to be added.
[ "This", "method", "allow", "to", "add", "a", "new", "monitored", "resource", "to", "the", "Registry", "." ]
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/monitor/seaclouds-data-collector/src/main/java/eu/seaclouds/monitor/datacollector/Registry.java#L213-L252
44,459
baratine/baratine
core/src/main/java/com/caucho/v5/config/ConfigException.java
ConfigException.cause
static Throwable cause(Throwable e) { while (e.getCause() != null && (e instanceof InstantiationException || e instanceof InvocationTargetException || e.getClass().equals(RuntimeExceptionConfig.class))) { e = e.getCause(); } return e; }
java
static Throwable cause(Throwable e) { while (e.getCause() != null && (e instanceof InstantiationException || e instanceof InvocationTargetException || e.getClass().equals(RuntimeExceptionConfig.class))) { e = e.getCause(); } return e; }
[ "static", "Throwable", "cause", "(", "Throwable", "e", ")", "{", "while", "(", "e", ".", "getCause", "(", ")", "!=", "null", "&&", "(", "e", "instanceof", "InstantiationException", "||", "e", "instanceof", "InvocationTargetException", "||", "e", ".", "getCla...
Unwraps noise from the exception trace.
[ "Unwraps", "noise", "from", "the", "exception", "trace", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/config/ConfigException.java#L243-L253
44,460
baratine/baratine
web/src/main/java/com/caucho/v5/deploy2/Strategy2StartManualRedeployAuto.java
Strategy2StartManualRedeployAuto.alarm
@Override public void alarm(DeployService2Impl<I> deploy, Result<I> result) { LifecycleState state = deploy.getState(); if (! state.isActive()) { result.ok(deploy.get()); } else if (deploy.isModifiedNow()) { // baratine/801g deploy.logModified(deploy.getLog()); deploy.re...
java
@Override public void alarm(DeployService2Impl<I> deploy, Result<I> result) { LifecycleState state = deploy.getState(); if (! state.isActive()) { result.ok(deploy.get()); } else if (deploy.isModifiedNow()) { // baratine/801g deploy.logModified(deploy.getLog()); deploy.re...
[ "@", "Override", "public", "void", "alarm", "(", "DeployService2Impl", "<", "I", ">", "deploy", ",", "Result", "<", "I", ">", "result", ")", "{", "LifecycleState", "state", "=", "deploy", ".", "getState", "(", ")", ";", "if", "(", "!", "state", ".", ...
Restart if the controller is active.
[ "Restart", "if", "the", "controller", "is", "active", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/deploy2/Strategy2StartManualRedeployAuto.java#L75-L91
44,461
baratine/baratine
framework/src/main/java/com/caucho/v5/javac/JavacErrorParser.java
JavacErrorParser.parseLine
String parseLine(CharCursor is, LineMap lineMap) throws IOException { int ch = is.read(); _buf.clear(); String filename = null; int line = 0; // Take 3: match /.*:\d+:/ _token.clear(); line: for (; ch != is.DONE; ch = is.read()) { while (ch == ':') { line = 0; ...
java
String parseLine(CharCursor is, LineMap lineMap) throws IOException { int ch = is.read(); _buf.clear(); String filename = null; int line = 0; // Take 3: match /.*:\d+:/ _token.clear(); line: for (; ch != is.DONE; ch = is.read()) { while (ch == ':') { line = 0; ...
[ "String", "parseLine", "(", "CharCursor", "is", ",", "LineMap", "lineMap", ")", "throws", "IOException", "{", "int", "ch", "=", "is", ".", "read", "(", ")", ";", "_buf", ".", "clear", "(", ")", ";", "String", "filename", "=", "null", ";", "int", "lin...
Scans errors. <p>Javac errors look like "filename:line: message"
[ "Scans", "errors", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/javac/JavacErrorParser.java#L129-L186
44,462
baratine/baratine
core/src/main/java/com/caucho/v5/util/Crc64.java
Crc64.generate
public static long generate(long crc, long value) { crc = next(crc, (byte) (value >> 56)); crc = next(crc, (byte) (value >> 48)); crc = next(crc, (byte) (value >> 40)); crc = next(crc, (byte) (value >> 32)); crc = next(crc, (byte) (value >> 24)); crc = next(crc, (byte) (value >> 16)); crc ...
java
public static long generate(long crc, long value) { crc = next(crc, (byte) (value >> 56)); crc = next(crc, (byte) (value >> 48)); crc = next(crc, (byte) (value >> 40)); crc = next(crc, (byte) (value >> 32)); crc = next(crc, (byte) (value >> 24)); crc = next(crc, (byte) (value >> 16)); crc ...
[ "public", "static", "long", "generate", "(", "long", "crc", ",", "long", "value", ")", "{", "crc", "=", "next", "(", "crc", ",", "(", "byte", ")", "(", "value", ">>", "56", ")", ")", ";", "crc", "=", "next", "(", "crc", ",", "(", "byte", ")", ...
Calculates CRC from a long
[ "Calculates", "CRC", "from", "a", "long" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/util/Crc64.java#L132-L144
44,463
baratine/baratine
kraken/src/main/java/com/caucho/v5/kraken/query/LiteralExpr.java
LiteralExpr.toObjectExpr
@Override public String toObjectExpr(String columnName) { if (_value == null) { return "null"; } else if (_value instanceof String) { return "'" + _value + "'"; } else { return String.valueOf(_value); } }
java
@Override public String toObjectExpr(String columnName) { if (_value == null) { return "null"; } else if (_value instanceof String) { return "'" + _value + "'"; } else { return String.valueOf(_value); } }
[ "@", "Override", "public", "String", "toObjectExpr", "(", "String", "columnName", ")", "{", "if", "(", "_value", "==", "null", ")", "{", "return", "\"null\"", ";", "}", "else", "if", "(", "_value", "instanceof", "String", ")", "{", "return", "\"'\"", "+"...
Object expr support.
[ "Object", "expr", "support", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kraken/query/LiteralExpr.java#L104-L116
44,464
baratine/baratine
kraken/src/main/java/com/caucho/v5/kelp/PageLeafEntry.java
PageLeafEntry.copyTo
public int copyTo(byte []buffer, int rowOffset, int blobTail) { byte []blockBuffer = _block.getBuffer(); System.arraycopy(blockBuffer, _rowOffset, buffer, rowOffset, _length); return _row.copyBlobs(blockBuffer, _rowOffset, buffer, rowOffset, blobTail); }
java
public int copyTo(byte []buffer, int rowOffset, int blobTail) { byte []blockBuffer = _block.getBuffer(); System.arraycopy(blockBuffer, _rowOffset, buffer, rowOffset, _length); return _row.copyBlobs(blockBuffer, _rowOffset, buffer, rowOffset, blobTail); }
[ "public", "int", "copyTo", "(", "byte", "[", "]", "buffer", ",", "int", "rowOffset", ",", "int", "blobTail", ")", "{", "byte", "[", "]", "blockBuffer", "=", "_block", ".", "getBuffer", "(", ")", ";", "System", ".", "arraycopy", "(", "blockBuffer", ",",...
Copies the row and its inline blobs to the target buffer. @return -1 if the row or the blobs can't fit in the new buffer.
[ "Copies", "the", "row", "and", "its", "inline", "blobs", "to", "the", "target", "buffer", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/PageLeafEntry.java#L108-L116
44,465
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/PathWrapper.java
PathWrapper.schemeWalk
@Override public PathImpl schemeWalk(String userPath, Map<String,Object> newAttributes, String newPath, int offset) { return getWrappedPath().schemeWalk(userPath, newAttributes, newPath, offset); }
java
@Override public PathImpl schemeWalk(String userPath, Map<String,Object> newAttributes, String newPath, int offset) { return getWrappedPath().schemeWalk(userPath, newAttributes, newPath, offset); }
[ "@", "Override", "public", "PathImpl", "schemeWalk", "(", "String", "userPath", ",", "Map", "<", "String", ",", "Object", ">", "newAttributes", ",", "String", "newPath", ",", "int", "offset", ")", "{", "return", "getWrappedPath", "(", ")", ".", "schemeWalk",...
Path-specific lookup. Path implementations will override this. @param userPath the user's lookup() path. @param newAttributes the attributes for the new path. @param newPath the lookup() path @param offset offset into newPath to start lookup. @return the found path
[ "Path", "-", "specific", "lookup", ".", "Path", "implementations", "will", "override", "this", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/PathWrapper.java#L149-L156
44,466
baratine/baratine
core/src/main/java/com/caucho/v5/amp/thread/ThreadAmp.java
ThreadAmp.executorTimeout
final void executorTimeout(ExecutorThrottle executor, long timeout) { _executor = executor; _activeSlowExpireTime = CurrentTime.getCurrentTimeActual() + timeout; }
java
final void executorTimeout(ExecutorThrottle executor, long timeout) { _executor = executor; _activeSlowExpireTime = CurrentTime.getCurrentTimeActual() + timeout; }
[ "final", "void", "executorTimeout", "(", "ExecutorThrottle", "executor", ",", "long", "timeout", ")", "{", "_executor", "=", "executor", ";", "_activeSlowExpireTime", "=", "CurrentTime", ".", "getCurrentTimeActual", "(", ")", "+", "timeout", ";", "}" ]
Sets timeouts.
[ "Sets", "timeouts", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/amp/thread/ThreadAmp.java#L110-L114
44,467
baratine/baratine
core/src/main/java/com/caucho/v5/amp/thread/ThreadAmp.java
ThreadAmp.run
@Override public void run() { try { _launcher.onChildIdleBegin(); _launcher.onChildThreadLaunchBegin(); _pool.addThread(this); runTasks(); } catch (Throwable e) { log.log(Level.WARNING, e.toString(), e); } finally { _pool.removeThread(this); _launcher.onC...
java
@Override public void run() { try { _launcher.onChildIdleBegin(); _launcher.onChildThreadLaunchBegin(); _pool.addThread(this); runTasks(); } catch (Throwable e) { log.log(Level.WARNING, e.toString(), e); } finally { _pool.removeThread(this); _launcher.onC...
[ "@", "Override", "public", "void", "run", "(", ")", "{", "try", "{", "_launcher", ".", "onChildIdleBegin", "(", ")", ";", "_launcher", ".", "onChildThreadLaunchBegin", "(", ")", ";", "_pool", ".", "addThread", "(", "this", ")", ";", "runTasks", "(", ")",...
The main thread execution method.
[ "The", "main", "thread", "execution", "method", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/amp/thread/ThreadAmp.java#L146-L162
44,468
baratine/baratine
core/src/main/java/com/caucho/v5/amp/thread/ThreadAmp.java
ThreadAmp.runTasks
private void runTasks() { ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader(); ThreadPoolBase pool = _pool; Thread thread = this; Outbox outbox = outbox(); boolean isWake = false; setName(_name); while (! _isClose) { RunnableItem taskItem = pool.poll(isWake)...
java
private void runTasks() { ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader(); ThreadPoolBase pool = _pool; Thread thread = this; Outbox outbox = outbox(); boolean isWake = false; setName(_name); while (! _isClose) { RunnableItem taskItem = pool.poll(isWake)...
[ "private", "void", "runTasks", "(", ")", "{", "ClassLoader", "systemClassLoader", "=", "ClassLoader", ".", "getSystemClassLoader", "(", ")", ";", "ThreadPoolBase", "pool", "=", "_pool", ";", "Thread", "thread", "=", "this", ";", "Outbox", "outbox", "=", "outbo...
Main thread loop.
[ "Main", "thread", "loop", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/amp/thread/ThreadAmp.java#L167-L223
44,469
baratine/baratine
framework/src/main/java/com/caucho/v5/make/ClassDependency.java
ClassDependency.addDigest
private static long addDigest(long digest, long v) { digest = Crc64.generate(digest, (byte) (v >> 24)); digest = Crc64.generate(digest, (byte) (v >> 16)); digest = Crc64.generate(digest, (byte) (v >> 8)); digest = Crc64.generate(digest, (byte) v); return digest; }
java
private static long addDigest(long digest, long v) { digest = Crc64.generate(digest, (byte) (v >> 24)); digest = Crc64.generate(digest, (byte) (v >> 16)); digest = Crc64.generate(digest, (byte) (v >> 8)); digest = Crc64.generate(digest, (byte) v); return digest; }
[ "private", "static", "long", "addDigest", "(", "long", "digest", ",", "long", "v", ")", "{", "digest", "=", "Crc64", ".", "generate", "(", "digest", ",", "(", "byte", ")", "(", "v", ">>", "24", ")", ")", ";", "digest", "=", "Crc64", ".", "generate"...
Adds the int to the digest.
[ "Adds", "the", "int", "to", "the", "digest", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/make/ClassDependency.java#L248-L256
44,470
baratine/baratine
web/src/main/java/com/caucho/v5/web/webapp/ViewMap.java
ViewMap.compareView
private int compareView(ViewRef<?> viewA, ViewRef<?> viewB, Class<?> type) { int cmp = viewB.priority() - viewA.priority(); if (cmp != 0) { return cmp; } cmp = typeDepth(viewA.type(), type) - typeDepth(viewB.type(), type); if (c...
java
private int compareView(ViewRef<?> viewA, ViewRef<?> viewB, Class<?> type) { int cmp = viewB.priority() - viewA.priority(); if (cmp != 0) { return cmp; } cmp = typeDepth(viewA.type(), type) - typeDepth(viewB.type(), type); if (c...
[ "private", "int", "compareView", "(", "ViewRef", "<", "?", ">", "viewA", ",", "ViewRef", "<", "?", ">", "viewB", ",", "Class", "<", "?", ">", "type", ")", "{", "int", "cmp", "=", "viewB", ".", "priority", "(", ")", "-", "viewA", ".", "priority", ...
sort views. Higher @Priority is a better match. Closer type match is a better match.
[ "sort", "views", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/web/webapp/ViewMap.java#L110-L132
44,471
baratine/baratine
web/src/main/java/com/caucho/v5/web/webapp/ViewMap.java
ViewMap.typeDepth
private int typeDepth(Class<?> match, Class<?> actual) { if (actual == null) { return Integer.MAX_VALUE / 2; } if (match.equals(Object.class)) { return Integer.MAX_VALUE / 4; } if (match.equals(actual)) { return 0; } int cost = 1 + typeDepth(match, actual.g...
java
private int typeDepth(Class<?> match, Class<?> actual) { if (actual == null) { return Integer.MAX_VALUE / 2; } if (match.equals(Object.class)) { return Integer.MAX_VALUE / 4; } if (match.equals(actual)) { return 0; } int cost = 1 + typeDepth(match, actual.g...
[ "private", "int", "typeDepth", "(", "Class", "<", "?", ">", "match", ",", "Class", "<", "?", ">", "actual", ")", "{", "if", "(", "actual", "==", "null", ")", "{", "return", "Integer", ".", "MAX_VALUE", "/", "2", ";", "}", "if", "(", "match", ".",...
count of how closely the source matches the target.
[ "count", "of", "how", "closely", "the", "source", "matches", "the", "target", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/web/webapp/ViewMap.java#L137-L158
44,472
baratine/baratine
core/src/main/java/com/caucho/v5/inject/InjectProgram.java
InjectProgram.configure
public final void configure(Object bean) { Objects.requireNonNull(bean); Thread thread = Thread.currentThread(); ClassLoader loader = thread.getContextClassLoader(); /* ContextConfig oldContext = ContextConfig.getCurrent(); try { ContextConfig.setCurrent(new ContextConfig(...
java
public final void configure(Object bean) { Objects.requireNonNull(bean); Thread thread = Thread.currentThread(); ClassLoader loader = thread.getContextClassLoader(); /* ContextConfig oldContext = ContextConfig.getCurrent(); try { ContextConfig.setCurrent(new ContextConfig(...
[ "public", "final", "void", "configure", "(", "Object", "bean", ")", "{", "Objects", ".", "requireNonNull", "(", "bean", ")", ";", "Thread", "thread", "=", "Thread", ".", "currentThread", "(", ")", ";", "ClassLoader", "loader", "=", "thread", ".", "getConte...
Configures a bean with a configuration file.
[ "Configures", "a", "bean", "with", "a", "configuration", "file", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/InjectProgram.java#L138-L158
44,473
baratine/baratine
core/src/main/java/com/caucho/v5/inject/InjectProgram.java
InjectProgram.configureImpl
final public void configureImpl(Object bean) // , ConfigType<?> type) throws ConfigException { Objects.requireNonNull(bean); //Objects.requireNonNull(type); try { //type.beforeConfigure(bean); // ioc/23e7 InjectContext env = InjectContextImpl.CONTEXT; injectTop(be...
java
final public void configureImpl(Object bean) // , ConfigType<?> type) throws ConfigException { Objects.requireNonNull(bean); //Objects.requireNonNull(type); try { //type.beforeConfigure(bean); // ioc/23e7 InjectContext env = InjectContextImpl.CONTEXT; injectTop(be...
[ "final", "public", "void", "configureImpl", "(", "Object", "bean", ")", "// , ConfigType<?> type)", "throws", "ConfigException", "{", "Objects", ".", "requireNonNull", "(", "bean", ")", ";", "//Objects.requireNonNull(type);", "try", "{", "//type.beforeConfigure(bean);", ...
Configures the object.
[ "Configures", "the", "object", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/InjectProgram.java#L163-L181
44,474
baratine/baratine
framework/src/main/java/com/caucho/v5/javac/LineMap.java
LineMap.add
public boolean add(String srcFilename, int srcLine, int dstLine) { return add(srcFilename, srcLine, dstLine, false); }
java
public boolean add(String srcFilename, int srcLine, int dstLine) { return add(srcFilename, srcLine, dstLine, false); }
[ "public", "boolean", "add", "(", "String", "srcFilename", ",", "int", "srcLine", ",", "int", "dstLine", ")", "{", "return", "add", "(", "srcFilename", ",", "srcLine", ",", "dstLine", ",", "false", ")", ";", "}" ]
Adds a new line map entry. <p>LineMap assumes that dstLine increases monotonically. @param srcFilename the source filename, e.g. the included filename @param srcLine the source line, e.g. the line in the included file @param dstLine the line of the generated file. @return true if a new entry is needed
[ "Adds", "a", "new", "line", "map", "entry", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/javac/LineMap.java#L117-L120
44,475
baratine/baratine
framework/src/main/java/com/caucho/v5/javac/LineMap.java
LineMap.addLine
public void addLine(int startLine, String sourceFile, int repeatCount, int outputLine, int outputIncrement) { _lines.add(new Line(startLine, sourceFile, repeatCount, outputLine, outputIncrement)); }
java
public void addLine(int startLine, String sourceFile, int repeatCount, int outputLine, int outputIncrement) { _lines.add(new Line(startLine, sourceFile, repeatCount, outputLine, outputIncrement)); }
[ "public", "void", "addLine", "(", "int", "startLine", ",", "String", "sourceFile", ",", "int", "repeatCount", ",", "int", "outputLine", ",", "int", "outputIncrement", ")", "{", "_lines", ".", "add", "(", "new", "Line", "(", "startLine", ",", "sourceFile", ...
Adds a line from the smap
[ "Adds", "a", "line", "from", "the", "smap" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/javac/LineMap.java#L161-L166
44,476
baratine/baratine
framework/src/main/java/com/caucho/v5/javac/LineMap.java
LineMap.convertError
public String convertError(String filename, int line, int column, String message) { String srcFilename = null; int destLine = 0; int srcLine = 0; for (int i = 0; i < _lines.size(); i++) { Line map = _lines.get(i); if (filename != null && ! filename.endsWi...
java
public String convertError(String filename, int line, int column, String message) { String srcFilename = null; int destLine = 0; int srcLine = 0; for (int i = 0; i < _lines.size(); i++) { Line map = _lines.get(i); if (filename != null && ! filename.endsWi...
[ "public", "String", "convertError", "(", "String", "filename", ",", "int", "line", ",", "int", "column", ",", "String", "message", ")", "{", "String", "srcFilename", "=", "null", ";", "int", "destLine", "=", "0", ";", "int", "srcLine", "=", "0", ";", "...
Converts an error in the generated file to a CompileError based on the source.
[ "Converts", "an", "error", "in", "the", "generated", "file", "to", "a", "CompileError", "based", "on", "the", "source", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/javac/LineMap.java#L205-L227
44,477
baratine/baratine
framework/src/main/java/com/caucho/v5/javac/LineMap.java
LineMap.convertError
private void convertError(CharBuffer buf, int line) { String srcFilename = null; int destLine = 0; int srcLine = 0; int srcTailLine = Integer.MAX_VALUE; for (int i = 0; i < _lines.size(); i++) { Line map = (Line) _lines.get(i); if (map._dstLine <= line && line <= map.getLastDesti...
java
private void convertError(CharBuffer buf, int line) { String srcFilename = null; int destLine = 0; int srcLine = 0; int srcTailLine = Integer.MAX_VALUE; for (int i = 0; i < _lines.size(); i++) { Line map = (Line) _lines.get(i); if (map._dstLine <= line && line <= map.getLastDesti...
[ "private", "void", "convertError", "(", "CharBuffer", "buf", ",", "int", "line", ")", "{", "String", "srcFilename", "=", "null", ";", "int", "destLine", "=", "0", ";", "int", "srcLine", "=", "0", ";", "int", "srcTailLine", "=", "Integer", ".", "MAX_VALUE...
Maps a destination line to an error location. @param buf CharBuffer to write the error location @param line generated source line to convert.
[ "Maps", "a", "destination", "line", "to", "an", "error", "location", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/javac/LineMap.java#L384-L414
44,478
baratine/baratine
web/src/main/java/com/caucho/v5/http/dispatch/Invocation.java
Invocation.copyFrom
public void copyFrom(Invocation invocation) { _classLoader = invocation._classLoader; _rawHost = invocation._rawHost; _rawURI = invocation._rawURI; _hostName = invocation._hostName; _port = invocation._port; _uri = invocation._uri; _depend = invocation._depend; _querySt...
java
public void copyFrom(Invocation invocation) { _classLoader = invocation._classLoader; _rawHost = invocation._rawHost; _rawURI = invocation._rawURI; _hostName = invocation._hostName; _port = invocation._port; _uri = invocation._uri; _depend = invocation._depend; _querySt...
[ "public", "void", "copyFrom", "(", "Invocation", "invocation", ")", "{", "_classLoader", "=", "invocation", ".", "_classLoader", ";", "_rawHost", "=", "invocation", ".", "_rawHost", ";", "_rawURI", "=", "invocation", ".", "_rawURI", ";", "_hostName", "=", "inv...
Copies from the invocation.
[ "Copies", "from", "the", "invocation", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/dispatch/Invocation.java#L237-L251
44,479
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/PrintWriterImpl.java
PrintWriterImpl.print
final public void print(long v) { Writer out = this.out; if (out == null) return; if (v == 0x8000000000000000L) { print("-9223372036854775808"); return; } try { if (v < 0) { out.write('-'); v = -v; } else if (v == 0) { out.write('0'); ...
java
final public void print(long v) { Writer out = this.out; if (out == null) return; if (v == 0x8000000000000000L) { print("-9223372036854775808"); return; } try { if (v < 0) { out.write('-'); v = -v; } else if (v == 0) { out.write('0'); ...
[ "final", "public", "void", "print", "(", "long", "v", ")", "{", "Writer", "out", "=", "this", ".", "out", ";", "if", "(", "out", "==", "null", ")", "return", ";", "if", "(", "v", "==", "0x8000000000000000", "L", ")", "{", "print", "(", "\"-92233720...
Prints a long.
[ "Prints", "a", "long", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/PrintWriterImpl.java#L189-L220
44,480
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/PrintWriterImpl.java
PrintWriterImpl.println
final public void println(long v) { Writer out = this.out; if (out == null) return; print(v); try { out.write(_newline, 0, _newline.length); } catch (IOException e) { log.log(Level.FINE, e.toString(), e); } }
java
final public void println(long v) { Writer out = this.out; if (out == null) return; print(v); try { out.write(_newline, 0, _newline.length); } catch (IOException e) { log.log(Level.FINE, e.toString(), e); } }
[ "final", "public", "void", "println", "(", "long", "v", ")", "{", "Writer", "out", "=", "this", ".", "out", ";", "if", "(", "out", "==", "null", ")", "return", ";", "print", "(", "v", ")", ";", "try", "{", "out", ".", "write", "(", "_newline", ...
Prints a long followed by a newline. @param v the value to print
[ "Prints", "a", "long", "followed", "by", "a", "newline", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/PrintWriterImpl.java#L397-L410
44,481
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/attr/CodeAttribute.java
CodeAttribute.exportCode
public void exportCode(JavaClass source, JavaClass target) throws Exception { ExportAnalyzer analyzer = new ExportAnalyzer(source, target); CodeEnhancer visitor = new CodeEnhancer(source, this); visitor.analyze(analyzer, false); visitor.update(); }
java
public void exportCode(JavaClass source, JavaClass target) throws Exception { ExportAnalyzer analyzer = new ExportAnalyzer(source, target); CodeEnhancer visitor = new CodeEnhancer(source, this); visitor.analyze(analyzer, false); visitor.update(); }
[ "public", "void", "exportCode", "(", "JavaClass", "source", ",", "JavaClass", "target", ")", "throws", "Exception", "{", "ExportAnalyzer", "analyzer", "=", "new", "ExportAnalyzer", "(", "source", ",", "target", ")", ";", "CodeEnhancer", "visitor", "=", "new", ...
Exports code.
[ "Exports", "code", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/attr/CodeAttribute.java#L324-L334
44,482
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/OutHttpApp1.java
OutHttpApp1.fillChunkHeader
@Override protected void fillChunkHeader(TempBuffer tBuf, int length) { if (length == 0) throw new IllegalStateException(); byte []buffer = tBuf.buffer(); buffer[0] = (byte) '\r'; buffer[1] = (byte) '\n'; buffer[2] = hexDigit(length >> 12); buffer[3] = hexDigit(length >> 8); ...
java
@Override protected void fillChunkHeader(TempBuffer tBuf, int length) { if (length == 0) throw new IllegalStateException(); byte []buffer = tBuf.buffer(); buffer[0] = (byte) '\r'; buffer[1] = (byte) '\n'; buffer[2] = hexDigit(length >> 12); buffer[3] = hexDigit(length >> 8); ...
[ "@", "Override", "protected", "void", "fillChunkHeader", "(", "TempBuffer", "tBuf", ",", "int", "length", ")", "{", "if", "(", "length", "==", "0", ")", "throw", "new", "IllegalStateException", "(", ")", ";", "byte", "[", "]", "buffer", "=", "tBuf", ".",...
Fills the chunk header.
[ "Fills", "the", "chunk", "header", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/OutHttpApp1.java#L126-L142
44,483
baratine/baratine
api/src/main/java/io/baratine/inject/Key.java
Key.of
public static <T> Key<T> of(Type type, Class<? extends Annotation> []annTypes) { return new Key<>(type, annTypes); }
java
public static <T> Key<T> of(Type type, Class<? extends Annotation> []annTypes) { return new Key<>(type, annTypes); }
[ "public", "static", "<", "T", ">", "Key", "<", "T", ">", "of", "(", "Type", "type", ",", "Class", "<", "?", "extends", "Annotation", ">", "[", "]", "annTypes", ")", "{", "return", "new", "Key", "<>", "(", "type", ",", "annTypes", ")", ";", "}" ]
Builds Key from Type and annotation types @param type target type @param annTypes associated annotations @param <T> type @return instance of a Key
[ "Builds", "Key", "from", "Type", "and", "annotation", "types" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/api/src/main/java/io/baratine/inject/Key.java#L187-L190
44,484
baratine/baratine
api/src/main/java/io/baratine/inject/Key.java
Key.of
public static <T> Key<T> of(Class<T> type, Class<? extends Annotation> annType) { Objects.requireNonNull(type); Objects.requireNonNull(annType); return new Key<>(type, new Class[] { annType }); }
java
public static <T> Key<T> of(Class<T> type, Class<? extends Annotation> annType) { Objects.requireNonNull(type); Objects.requireNonNull(annType); return new Key<>(type, new Class[] { annType }); }
[ "public", "static", "<", "T", ">", "Key", "<", "T", ">", "of", "(", "Class", "<", "T", ">", "type", ",", "Class", "<", "?", "extends", "Annotation", ">", "annType", ")", "{", "Objects", ".", "requireNonNull", "(", "type", ")", ";", "Objects", ".", ...
Builds Key from Class and annotation type @param type target type @param annType associated annotation @param <T> type @return instance of a Key
[ "Builds", "Key", "from", "Class", "and", "annotation", "type" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/api/src/main/java/io/baratine/inject/Key.java#L200-L207
44,485
baratine/baratine
api/src/main/java/io/baratine/inject/Key.java
Key.of
public static <T> Key<T> of(Class<T> type, Annotation ann) { Objects.requireNonNull(type); Objects.requireNonNull(ann); return new Key<>(type, new Annotation[] { ann }); }
java
public static <T> Key<T> of(Class<T> type, Annotation ann) { Objects.requireNonNull(type); Objects.requireNonNull(ann); return new Key<>(type, new Annotation[] { ann }); }
[ "public", "static", "<", "T", ">", "Key", "<", "T", ">", "of", "(", "Class", "<", "T", ">", "type", ",", "Annotation", "ann", ")", "{", "Objects", ".", "requireNonNull", "(", "type", ")", ";", "Objects", ".", "requireNonNull", "(", "ann", ")", ";",...
Builds Key from a Class and annotation @param type target class @param ann associated annotation @param <T> target type @return instance of a Key
[ "Builds", "Key", "from", "a", "Class", "and", "annotation" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/api/src/main/java/io/baratine/inject/Key.java#L217-L224
44,486
baratine/baratine
api/src/main/java/io/baratine/inject/Key.java
Key.rawClass
public Class<T> rawClass() { Type type = type(); if (type instanceof Class) { return (Class) type; } else if (type instanceof ParameterizedType) { ParameterizedType pType = (ParameterizedType) type; return (Class) pType.getRawType(); } else { throw new UnsupportedOper...
java
public Class<T> rawClass() { Type type = type(); if (type instanceof Class) { return (Class) type; } else if (type instanceof ParameterizedType) { ParameterizedType pType = (ParameterizedType) type; return (Class) pType.getRawType(); } else { throw new UnsupportedOper...
[ "public", "Class", "<", "T", ">", "rawClass", "(", ")", "{", "Type", "type", "=", "type", "(", ")", ";", "if", "(", "type", "instanceof", "Class", ")", "{", "return", "(", "Class", ")", "type", ";", "}", "else", "if", "(", "type", "instanceof", "...
Returns raw class of associated type @return raw class
[ "Returns", "raw", "class", "of", "associated", "type" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/api/src/main/java/io/baratine/inject/Key.java#L333-L348
44,487
baratine/baratine
api/src/main/java/io/baratine/inject/Key.java
Key.isAnnotationPresent
public boolean isAnnotationPresent(Class<? extends Annotation> annTypeTest) { for (Class<?> annType : _annTypes) { if (annType.equals(annTypeTest)) { return true; } } return false; }
java
public boolean isAnnotationPresent(Class<? extends Annotation> annTypeTest) { for (Class<?> annType : _annTypes) { if (annType.equals(annTypeTest)) { return true; } } return false; }
[ "public", "boolean", "isAnnotationPresent", "(", "Class", "<", "?", "extends", "Annotation", ">", "annTypeTest", ")", "{", "for", "(", "Class", "<", "?", ">", "annType", ":", "_annTypes", ")", "{", "if", "(", "annType", ".", "equals", "(", "annTypeTest", ...
Tests if annotation type is present in Key's annotations @param annTypeTest test annotation @return true if present, false otherwise
[ "Tests", "if", "annotation", "type", "is", "present", "in", "Key", "s", "annotations" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/api/src/main/java/io/baratine/inject/Key.java#L393-L402
44,488
baratine/baratine
api/src/main/java/io/baratine/inject/Key.java
Key.isAssignableFrom
public boolean isAssignableFrom(Key<? super T> key) { Objects.requireNonNull(key); for (Class<? extends Annotation> annType : _annTypes) { if (! containsType(annType, key._annTypes)) { return false; } } if (_type instanceof ParameterizedType) { if (! (key._type instanceof P...
java
public boolean isAssignableFrom(Key<? super T> key) { Objects.requireNonNull(key); for (Class<? extends Annotation> annType : _annTypes) { if (! containsType(annType, key._annTypes)) { return false; } } if (_type instanceof ParameterizedType) { if (! (key._type instanceof P...
[ "public", "boolean", "isAssignableFrom", "(", "Key", "<", "?", "super", "T", ">", "key", ")", "{", "Objects", ".", "requireNonNull", "(", "key", ")", ";", "for", "(", "Class", "<", "?", "extends", "Annotation", ">", "annType", ":", "_annTypes", ")", "{...
Tests if key is assignable. Key is considered assignable if annotation types match, Type matches and annotation instances match. @param key test key @return true if assignable, false otherwise
[ "Tests", "if", "key", "is", "assignable", ".", "Key", "is", "considered", "assignable", "if", "annotation", "types", "match", "Type", "matches", "and", "annotation", "instances", "match", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/api/src/main/java/io/baratine/inject/Key.java#L411-L437
44,489
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/Syslog.java
Syslog.syslog
public static void syslog(int facility, int severity, String text) { _jniTroubleshoot.checkIsValid(); if (! _isOpen) { _isOpen = true; nativeOpenSyslog(); } int priority = facility * 8 + severity; nativeSyslog(priority, text); }
java
public static void syslog(int facility, int severity, String text) { _jniTroubleshoot.checkIsValid(); if (! _isOpen) { _isOpen = true; nativeOpenSyslog(); } int priority = facility * 8 + severity; nativeSyslog(priority, text); }
[ "public", "static", "void", "syslog", "(", "int", "facility", ",", "int", "severity", ",", "String", "text", ")", "{", "_jniTroubleshoot", ".", "checkIsValid", "(", ")", ";", "if", "(", "!", "_isOpen", ")", "{", "_isOpen", "=", "true", ";", "nativeOpenSy...
Writes data.
[ "Writes", "data", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/Syslog.java#L80-L92
44,490
baratine/baratine
core/src/main/java/com/caucho/v5/loader/EnvironmentClassLoader.java
EnvironmentClassLoader.removeAttribute
public Object removeAttribute(String name) { if (_attributes == null) return null; else return _attributes.remove(name); }
java
public Object removeAttribute(String name) { if (_attributes == null) return null; else return _attributes.remove(name); }
[ "public", "Object", "removeAttribute", "(", "String", "name", ")", "{", "if", "(", "_attributes", "==", "null", ")", "return", "null", ";", "else", "return", "_attributes", ".", "remove", "(", "name", ")", ";", "}" ]
Removes the named attributes
[ "Removes", "the", "named", "attributes" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/loader/EnvironmentClassLoader.java#L365-L371
44,491
baratine/baratine
core/src/main/java/com/caucho/v5/loader/EnvironmentClassLoader.java
EnvironmentClassLoader.getResourceAsStream
@Override public InputStream getResourceAsStream(String name) { ResourceEntry entry = _resourceCacheMap.get(name); if (entry == null || entry.isModified()) { URL resource = super.getResource(name); entry = new ResourceEntry(resource); _resourceCacheMap.put(name, entry); ...
java
@Override public InputStream getResourceAsStream(String name) { ResourceEntry entry = _resourceCacheMap.get(name); if (entry == null || entry.isModified()) { URL resource = super.getResource(name); entry = new ResourceEntry(resource); _resourceCacheMap.put(name, entry); ...
[ "@", "Override", "public", "InputStream", "getResourceAsStream", "(", "String", "name", ")", "{", "ResourceEntry", "entry", "=", "_resourceCacheMap", ".", "get", "(", "name", ")", ";", "if", "(", "entry", "==", "null", "||", "entry", ".", "isModified", "(", ...
Overrides getResource to implement caching.
[ "Overrides", "getResource", "to", "implement", "caching", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/loader/EnvironmentClassLoader.java#L399-L413
44,492
baratine/baratine
core/src/main/java/com/caucho/v5/loader/EnvironmentClassLoader.java
EnvironmentClassLoader.initListeners
private void initListeners() { ClassLoader parent = getParent(); for (; parent != null; parent = parent.getParent()) { if (parent instanceof EnvironmentClassLoader) { EnvironmentClassLoader loader = (EnvironmentClassLoader) parent; if (_stopListener == null) _stopListener = n...
java
private void initListeners() { ClassLoader parent = getParent(); for (; parent != null; parent = parent.getParent()) { if (parent instanceof EnvironmentClassLoader) { EnvironmentClassLoader loader = (EnvironmentClassLoader) parent; if (_stopListener == null) _stopListener = n...
[ "private", "void", "initListeners", "(", ")", "{", "ClassLoader", "parent", "=", "getParent", "(", ")", ";", "for", "(", ";", "parent", "!=", "null", ";", "parent", "=", "parent", ".", "getParent", "(", ")", ")", "{", "if", "(", "parent", "instanceof",...
Adds self as a listener.
[ "Adds", "self", "as", "a", "listener", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/loader/EnvironmentClassLoader.java#L472-L488
44,493
baratine/baratine
core/src/main/java/com/caucho/v5/loader/EnvironmentClassLoader.java
EnvironmentClassLoader.addURL
@Override public void addURL(URL url, boolean isScanned) { if (containsURL(url)) { return; } super.addURL(url, isScanned); if (isScanned) _pendingScanRoots.add(new ScanRoot(url, null)); }
java
@Override public void addURL(URL url, boolean isScanned) { if (containsURL(url)) { return; } super.addURL(url, isScanned); if (isScanned) _pendingScanRoots.add(new ScanRoot(url, null)); }
[ "@", "Override", "public", "void", "addURL", "(", "URL", "url", ",", "boolean", "isScanned", ")", "{", "if", "(", "containsURL", "(", "url", ")", ")", "{", "return", ";", "}", "super", ".", "addURL", "(", "url", ",", "isScanned", ")", ";", "if", "(...
Adds the URL to the URLClassLoader.
[ "Adds", "the", "URL", "to", "the", "URLClassLoader", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/loader/EnvironmentClassLoader.java#L735-L746
44,494
baratine/baratine
core/src/main/java/com/caucho/v5/loader/EnvironmentClassLoader.java
EnvironmentClassLoader.getHash
@Override public String getHash() { String superHash = super.getHash(); // ioc/0p61 - package needed for hash to enable scan long crc = Crc64.generate(superHash); for (String pkg : _packageList) { crc = Crc64.generate(crc, pkg); } return Long.toHexString(Math.abs(crc)); ...
java
@Override public String getHash() { String superHash = super.getHash(); // ioc/0p61 - package needed for hash to enable scan long crc = Crc64.generate(superHash); for (String pkg : _packageList) { crc = Crc64.generate(crc, pkg); } return Long.toHexString(Math.abs(crc)); ...
[ "@", "Override", "public", "String", "getHash", "(", ")", "{", "String", "superHash", "=", "super", ".", "getHash", "(", ")", ";", "// ioc/0p61 - package needed for hash to enable scan", "long", "crc", "=", "Crc64", ".", "generate", "(", "superHash", ")", ";", ...
Add the custom packages to the classloader hash.
[ "Add", "the", "custom", "packages", "to", "the", "classloader", "hash", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/loader/EnvironmentClassLoader.java#L771-L784
44,495
baratine/baratine
core/src/main/java/com/caucho/v5/loader/EnvironmentClassLoader.java
EnvironmentClassLoader.start
public void start() { if (! getLifecycle().toStarting()) { startListeners(); return; } //sendAddLoaderEvent(); //bind(); try { make(); } catch (Exception e) { log().log(Level.WARNING, e.toString(), e); e.printStackTrace(); } startListeners(); ...
java
public void start() { if (! getLifecycle().toStarting()) { startListeners(); return; } //sendAddLoaderEvent(); //bind(); try { make(); } catch (Exception e) { log().log(Level.WARNING, e.toString(), e); e.printStackTrace(); } startListeners(); ...
[ "public", "void", "start", "(", ")", "{", "if", "(", "!", "getLifecycle", "(", ")", ".", "toStarting", "(", ")", ")", "{", "startListeners", "(", ")", ";", "return", ";", "}", "//sendAddLoaderEvent();", "//bind();", "try", "{", "make", "(", ")", ";", ...
Marks the environment of the class loader as started. The class loader itself doesn't use this, but a callback might.
[ "Marks", "the", "environment", "of", "the", "class", "loader", "as", "started", ".", "The", "class", "loader", "itself", "doesn", "t", "use", "this", "but", "a", "callback", "might", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/loader/EnvironmentClassLoader.java#L1009-L1044
44,496
baratine/baratine
core/src/main/java/com/caucho/v5/loader/EnvironmentClassLoader.java
EnvironmentClassLoader.stop
@Override public void stop() { if (! getLifecycle().toStop()) { return; } ArrayList<EnvLoaderListener> listeners = getEnvironmentListeners(); Thread thread = Thread.currentThread(); ClassLoader oldLoader = thread.getContextClassLoader(); thread.setContextClassLoader(this); t...
java
@Override public void stop() { if (! getLifecycle().toStop()) { return; } ArrayList<EnvLoaderListener> listeners = getEnvironmentListeners(); Thread thread = Thread.currentThread(); ClassLoader oldLoader = thread.getContextClassLoader(); thread.setContextClassLoader(this); t...
[ "@", "Override", "public", "void", "stop", "(", ")", "{", "if", "(", "!", "getLifecycle", "(", ")", ".", "toStop", "(", ")", ")", "{", "return", ";", "}", "ArrayList", "<", "EnvLoaderListener", ">", "listeners", "=", "getEnvironmentListeners", "(", ")", ...
Stops the environment, closing down any resources. The resources are closed in the reverse order that they're started
[ "Stops", "the", "environment", "closing", "down", "any", "resources", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/loader/EnvironmentClassLoader.java#L1063-L1097
44,497
baratine/baratine
core/src/main/java/com/caucho/v5/loader/EnvironmentClassLoader.java
EnvironmentClassLoader.destroy
@Override public void destroy() { Thread thread = Thread.currentThread(); ClassLoader oldLoader = thread.getContextClassLoader(); try { thread.setContextClassLoader(this); WeakStopListener stopListener = _stopListener; _stopListener = null; super.destroy(); ...
java
@Override public void destroy() { Thread thread = Thread.currentThread(); ClassLoader oldLoader = thread.getContextClassLoader(); try { thread.setContextClassLoader(this); WeakStopListener stopListener = _stopListener; _stopListener = null; super.destroy(); ...
[ "@", "Override", "public", "void", "destroy", "(", ")", "{", "Thread", "thread", "=", "Thread", ".", "currentThread", "(", ")", ";", "ClassLoader", "oldLoader", "=", "thread", ".", "getContextClassLoader", "(", ")", ";", "try", "{", "thread", ".", "setCont...
Destroys the class loader.
[ "Destroys", "the", "class", "loader", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/loader/EnvironmentClassLoader.java#L1102-L1143
44,498
baratine/baratine
framework/src/main/java/com/caucho/v5/kraken/cluster/TablePodImpl.java
TablePodImpl.update
@Override public void update(Result<Integer> result, int nodeIndex, String sql, Object[] args) { NodePodAmp node = _podKraken.getNode(nodeIndex); for (int i = 0; i < node.serverCount(); i++) { ServerBartender server = node.server(i);...
java
@Override public void update(Result<Integer> result, int nodeIndex, String sql, Object[] args) { NodePodAmp node = _podKraken.getNode(nodeIndex); for (int i = 0; i < node.serverCount(); i++) { ServerBartender server = node.server(i);...
[ "@", "Override", "public", "void", "update", "(", "Result", "<", "Integer", ">", "result", ",", "int", "nodeIndex", ",", "String", "sql", ",", "Object", "[", "]", "args", ")", "{", "NodePodAmp", "node", "=", "_podKraken", ".", "getNode", "(", "nodeIndex"...
Distributed update table. All owning nodes will get a request.
[ "Distributed", "update", "table", ".", "All", "owning", "nodes", "will", "get", "a", "request", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/kraken/cluster/TablePodImpl.java#L484-L510
44,499
AludraTest/aludratest
src/main/java/org/apache/commons/vfs2/provider/local/AludraLocalFile.java
AludraLocalFile.doAttach
@Override protected void doAttach() throws Exception { if (file == null) { // Remove the "file:///" // LocalFileName localFileName = (LocalFileName) getName(); String fileName = rootFile + getName().getPathDecoded(); // fileName = UriParser.decode(fileName); ...
java
@Override protected void doAttach() throws Exception { if (file == null) { // Remove the "file:///" // LocalFileName localFileName = (LocalFileName) getName(); String fileName = rootFile + getName().getPathDecoded(); // fileName = UriParser.decode(fileName); ...
[ "@", "Override", "protected", "void", "doAttach", "(", ")", "throws", "Exception", "{", "if", "(", "file", "==", "null", ")", "{", "// Remove the \"file:///\"", "// LocalFileName localFileName = (LocalFileName) getName();", "String", "fileName", "=", "rootFile", "+", ...
Attaches this file object to its file resource.
[ "Attaches", "this", "file", "object", "to", "its", "file", "resource", "." ]
37b13cebefc8449bab3a8c5fc46a9aa8758a3eec
https://github.com/AludraTest/aludratest/blob/37b13cebefc8449bab3a8c5fc46a9aa8758a3eec/src/main/java/org/apache/commons/vfs2/provider/local/AludraLocalFile.java#L62-L71