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
43,900
baratine/baratine
web/src/main/java/com/caucho/v5/io/StreamSource.java
StreamSource.openInputStream
public InputStream openInputStream() throws IOException { StreamSource indirectSource = _indirectSource; if (indirectSource != null) { return indirectSource.openInputStream(); } TempOutputStream out = _out; if (out != null) { return out.openInputStreamNoFree(); } ...
java
public InputStream openInputStream() throws IOException { StreamSource indirectSource = _indirectSource; if (indirectSource != null) { return indirectSource.openInputStream(); } TempOutputStream out = _out; if (out != null) { return out.openInputStreamNoFree(); } ...
[ "public", "InputStream", "openInputStream", "(", ")", "throws", "IOException", "{", "StreamSource", "indirectSource", "=", "_indirectSource", ";", "if", "(", "indirectSource", "!=", "null", ")", "{", "return", "indirectSource", ".", "openInputStream", "(", ")", ";...
Returns an input stream, without freeing the results
[ "Returns", "an", "input", "stream", "without", "freeing", "the", "results" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/io/StreamSource.java#L171-L188
43,901
baratine/baratine
framework/src/main/java/com/caucho/v5/json/ser/JsonFactory.java
JsonFactory.serializer
public final <T> SerializerJson<T> serializer(Class<T> cl) { return (SerializerJson) _serMap.get(cl); }
java
public final <T> SerializerJson<T> serializer(Class<T> cl) { return (SerializerJson) _serMap.get(cl); }
[ "public", "final", "<", "T", ">", "SerializerJson", "<", "T", ">", "serializer", "(", "Class", "<", "T", ">", "cl", ")", "{", "return", "(", "SerializerJson", ")", "_serMap", ".", "get", "(", "cl", ")", ";", "}" ]
The serializer for the given class.
[ "The", "serializer", "for", "the", "given", "class", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/json/ser/JsonFactory.java#L112-L115
43,902
baratine/baratine
framework/src/main/java/com/caucho/v5/json/ser/JsonFactory.java
JsonFactory.serializer
public final <T> SerializerJson<T> serializer(Type type) { SerializerJson<T> ser = (SerializerJson<T>) _serTypeMap.get(type); if (ser == null) { TypeRef typeRef = TypeRef.of(type); Class<T> rawClass = (Class<T>) typeRef.rawClass(); ser = serializer(rawClass).withType(typeRef, thi...
java
public final <T> SerializerJson<T> serializer(Type type) { SerializerJson<T> ser = (SerializerJson<T>) _serTypeMap.get(type); if (ser == null) { TypeRef typeRef = TypeRef.of(type); Class<T> rawClass = (Class<T>) typeRef.rawClass(); ser = serializer(rawClass).withType(typeRef, thi...
[ "public", "final", "<", "T", ">", "SerializerJson", "<", "T", ">", "serializer", "(", "Type", "type", ")", "{", "SerializerJson", "<", "T", ">", "ser", "=", "(", "SerializerJson", "<", "T", ">", ")", "_serTypeMap", ".", "get", "(", "type", ")", ";", ...
The serializer for the given type.
[ "The", "serializer", "for", "the", "given", "type", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/json/ser/JsonFactory.java#L120-L136
43,903
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/JarWithFile.java
JarWithFile.getJarDepend
private JarDepend getJarDepend() { if (_depend == null || _depend.isModified()) _depend = new JarDepend(new Depend(getBacking())); return _depend; }
java
private JarDepend getJarDepend() { if (_depend == null || _depend.isModified()) _depend = new JarDepend(new Depend(getBacking())); return _depend; }
[ "private", "JarDepend", "getJarDepend", "(", ")", "{", "if", "(", "_depend", "==", "null", "||", "_depend", ".", "isModified", "(", ")", ")", "_depend", "=", "new", "JarDepend", "(", "new", "Depend", "(", "getBacking", "(", ")", ")", ")", ";", "return"...
Returns the dependency.
[ "Returns", "the", "dependency", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/JarWithFile.java#L128-L134
43,904
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/JarWithFile.java
JarWithFile.getCertificates
public Certificate []getCertificates(String path) { if (! isSigned()) return null; if (path.length() > 0 && path.charAt(0) == '/') path = path.substring(1); try { if (! getBacking().canRead()) return null; JarFile jarFile = getJarFile(); JarEntry entry; ...
java
public Certificate []getCertificates(String path) { if (! isSigned()) return null; if (path.length() > 0 && path.charAt(0) == '/') path = path.substring(1); try { if (! getBacking().canRead()) return null; JarFile jarFile = getJarFile(); JarEntry entry; ...
[ "public", "Certificate", "[", "]", "getCertificates", "(", "String", "path", ")", "{", "if", "(", "!", "isSigned", "(", ")", ")", "return", "null", ";", "if", "(", "path", ".", "length", "(", ")", ">", "0", "&&", "path", ".", "charAt", "(", "0", ...
Returns any certificates.
[ "Returns", "any", "certificates", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/JarWithFile.java#L209-L248
43,905
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/JarWithFile.java
JarWithFile.getLastModified
public long getLastModified(String path) { try { // this entry time can cause problems ... ZipEntry entry = getZipEntry(path); return entry != null ? entry.getTime() : -1; } catch (IOException e) { log.log(Level.FINE, e.toString(), e); } return -1; }
java
public long getLastModified(String path) { try { // this entry time can cause problems ... ZipEntry entry = getZipEntry(path); return entry != null ? entry.getTime() : -1; } catch (IOException e) { log.log(Level.FINE, e.toString(), e); } return -1; }
[ "public", "long", "getLastModified", "(", "String", "path", ")", "{", "try", "{", "// this entry time can cause problems ...", "ZipEntry", "entry", "=", "getZipEntry", "(", "path", ")", ";", "return", "entry", "!=", "null", "?", "entry", ".", "getTime", "(", "...
Returns the last-modified time of the entry in the jar file. @param path full path to the jar entry @return the length of the entry
[ "Returns", "the", "last", "-", "modified", "time", "of", "the", "entry", "in", "the", "jar", "file", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/JarWithFile.java#L313-L325
43,906
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/JarWithFile.java
JarWithFile.getLength
public long getLength(String path) { try { ZipEntry entry = getZipEntry(path); long length = entry != null ? entry.getSize() : -1; return length; } catch (IOException e) { log.log(Level.FINE, e.toString(), e); return -1; } }
java
public long getLength(String path) { try { ZipEntry entry = getZipEntry(path); long length = entry != null ? entry.getSize() : -1; return length; } catch (IOException e) { log.log(Level.FINE, e.toString(), e); return -1; } }
[ "public", "long", "getLength", "(", "String", "path", ")", "{", "try", "{", "ZipEntry", "entry", "=", "getZipEntry", "(", "path", ")", ";", "long", "length", "=", "entry", "!=", "null", "?", "entry", ".", "getSize", "(", ")", ":", "-", "1", ";", "r...
Returns the length of the entry in the jar file. @param path full path to the jar entry @return the length of the entry
[ "Returns", "the", "length", "of", "the", "entry", "in", "the", "jar", "file", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/JarWithFile.java#L333-L346
43,907
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/JarWithFile.java
JarWithFile.canRead
public boolean canRead(String path) { try { ZipEntry entry = getZipEntry(path); return entry != null && ! entry.isDirectory(); } catch (IOException e) { log.log(Level.FINE, e.toString(), e); return false; } }
java
public boolean canRead(String path) { try { ZipEntry entry = getZipEntry(path); return entry != null && ! entry.isDirectory(); } catch (IOException e) { log.log(Level.FINE, e.toString(), e); return false; } }
[ "public", "boolean", "canRead", "(", "String", "path", ")", "{", "try", "{", "ZipEntry", "entry", "=", "getZipEntry", "(", "path", ")", ";", "return", "entry", "!=", "null", "&&", "!", "entry", ".", "isDirectory", "(", ")", ";", "}", "catch", "(", "I...
Readable if the jar is readable and the path refers to a file.
[ "Readable", "if", "the", "jar", "is", "readable", "and", "the", "path", "refers", "to", "a", "file", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/JarWithFile.java#L351-L362
43,908
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/JarWithFile.java
JarWithFile.clearCache
public void clearCache() { ZipFile zipFile = _zipFileRef.getAndSet(null); if (zipFile != null) try { zipFile.close(); } catch (Exception e) { } }
java
public void clearCache() { ZipFile zipFile = _zipFileRef.getAndSet(null); if (zipFile != null) try { zipFile.close(); } catch (Exception e) { } }
[ "public", "void", "clearCache", "(", ")", "{", "ZipFile", "zipFile", "=", "_zipFileRef", ".", "getAndSet", "(", "null", ")", ";", "if", "(", "zipFile", "!=", "null", ")", "try", "{", "zipFile", ".", "close", "(", ")", ";", "}", "catch", "(", "Excepti...
Clears any cached JarFile.
[ "Clears", "any", "cached", "JarFile", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/JarWithFile.java#L473-L482
43,909
baratine/baratine
framework/src/main/java/com/caucho/v5/http/pod/PodLoader.java
PodLoader.buildClassLoader
public ClassLoader buildClassLoader(ClassLoader serviceLoader) { synchronized (_loaderMap) { SoftReference<ClassLoader> extLoaderRef = _loaderMap.get(serviceLoader); if (extLoaderRef != null) { ClassLoader extLoader = extLoaderRef.get(); if (extLoader != null) { ...
java
public ClassLoader buildClassLoader(ClassLoader serviceLoader) { synchronized (_loaderMap) { SoftReference<ClassLoader> extLoaderRef = _loaderMap.get(serviceLoader); if (extLoaderRef != null) { ClassLoader extLoader = extLoaderRef.get(); if (extLoader != null) { ...
[ "public", "ClassLoader", "buildClassLoader", "(", "ClassLoader", "serviceLoader", ")", "{", "synchronized", "(", "_loaderMap", ")", "{", "SoftReference", "<", "ClassLoader", ">", "extLoaderRef", "=", "_loaderMap", ".", "get", "(", "serviceLoader", ")", ";", "if", ...
Builds a combined class-loader with the target service loader as a parent, and this calling pod loader as a child.
[ "Builds", "a", "combined", "class", "-", "loader", "with", "the", "target", "service", "loader", "as", "a", "parent", "and", "this", "calling", "pod", "loader", "as", "a", "child", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/http/pod/PodLoader.java#L191-L237
43,910
baratine/baratine
framework/src/main/java/com/caucho/v5/bartender/heartbeat/RootHeartbeat.java
RootHeartbeat.getServer
@Override public ServerHeartbeat getServer(String serverId) { ServerHeartbeat server = _serverMap.get(serverId); return server; }
java
@Override public ServerHeartbeat getServer(String serverId) { ServerHeartbeat server = _serverMap.get(serverId); return server; }
[ "@", "Override", "public", "ServerHeartbeat", "getServer", "(", "String", "serverId", ")", "{", "ServerHeartbeat", "server", "=", "_serverMap", ".", "get", "(", "serverId", ")", ";", "return", "server", ";", "}" ]
Returns the server with the given canonical id.
[ "Returns", "the", "server", "with", "the", "given", "canonical", "id", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/bartender/heartbeat/RootHeartbeat.java#L104-L110
43,911
baratine/baratine
framework/src/main/java/com/caucho/v5/bartender/heartbeat/RootHeartbeat.java
RootHeartbeat.findServerByName
@Override public ServerBartender findServerByName(String name) { for (ClusterHeartbeat cluster : _clusterMap.values()) { ServerBartender server = cluster.findServerByName(name); if (server != null) { return server; } } return null; }
java
@Override public ServerBartender findServerByName(String name) { for (ClusterHeartbeat cluster : _clusterMap.values()) { ServerBartender server = cluster.findServerByName(name); if (server != null) { return server; } } return null; }
[ "@", "Override", "public", "ServerBartender", "findServerByName", "(", "String", "name", ")", "{", "for", "(", "ClusterHeartbeat", "cluster", ":", "_clusterMap", ".", "values", "(", ")", ")", "{", "ServerBartender", "server", "=", "cluster", ".", "findServerByNa...
Returns the server with the given display name.
[ "Returns", "the", "server", "with", "the", "given", "display", "name", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/bartender/heartbeat/RootHeartbeat.java#L115-L127
43,912
baratine/baratine
framework/src/main/java/com/caucho/v5/bartender/heartbeat/RootHeartbeat.java
RootHeartbeat.createCluster
ClusterHeartbeat createCluster(String clusterName) { ClusterHeartbeat cluster = _clusterMap.get(clusterName); if (cluster == null) { cluster = new ClusterHeartbeat(clusterName, this); _clusterMap.putIfAbsent(clusterName, cluster); cluster = _clusterMap.get(clusterName); ...
java
ClusterHeartbeat createCluster(String clusterName) { ClusterHeartbeat cluster = _clusterMap.get(clusterName); if (cluster == null) { cluster = new ClusterHeartbeat(clusterName, this); _clusterMap.putIfAbsent(clusterName, cluster); cluster = _clusterMap.get(clusterName); ...
[ "ClusterHeartbeat", "createCluster", "(", "String", "clusterName", ")", "{", "ClusterHeartbeat", "cluster", "=", "_clusterMap", ".", "get", "(", "clusterName", ")", ";", "if", "(", "cluster", "==", "null", ")", "{", "cluster", "=", "new", "ClusterHeartbeat", "...
Returns the cluster with the given name, creating it if necessary.
[ "Returns", "the", "cluster", "with", "the", "given", "name", "creating", "it", "if", "necessary", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/bartender/heartbeat/RootHeartbeat.java#L197-L210
43,913
baratine/baratine
web/src/main/java/com/caucho/v5/io/StreamImplTee.java
StreamImplTee.read
@Override public int read(byte []buffer, int offset, int length) throws IOException { int sublen = getDelegate().read(buffer, offset, length); if (sublen > 0) { logStream().write(buffer, offset, sublen); } return sublen; }
java
@Override public int read(byte []buffer, int offset, int length) throws IOException { int sublen = getDelegate().read(buffer, offset, length); if (sublen > 0) { logStream().write(buffer, offset, sublen); } return sublen; }
[ "@", "Override", "public", "int", "read", "(", "byte", "[", "]", "buffer", ",", "int", "offset", ",", "int", "length", ")", "throws", "IOException", "{", "int", "sublen", "=", "getDelegate", "(", ")", ".", "read", "(", "buffer", ",", "offset", ",", "...
Reads the next chunk from the stream. @param buffer byte array receiving the data. @param offset starting offset into the array. @param length number of bytes to read. @return the number of bytes read or -1 on end of file.
[ "Reads", "the", "next", "chunk", "from", "the", "stream", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/io/StreamImplTee.java#L124-L134
43,914
baratine/baratine
web/src/main/java/com/caucho/v5/io/StreamImplTee.java
StreamImplTee.readTimeout
@Override public int readTimeout(byte []buffer, int offset, int length, long timeout) throws IOException { int sublen = getDelegate().readTimeout(buffer, offset, length, timeout); if (sublen > 0) { logStream().write(buffer, offset, sublen); } return sublen; ...
java
@Override public int readTimeout(byte []buffer, int offset, int length, long timeout) throws IOException { int sublen = getDelegate().readTimeout(buffer, offset, length, timeout); if (sublen > 0) { logStream().write(buffer, offset, sublen); } return sublen; ...
[ "@", "Override", "public", "int", "readTimeout", "(", "byte", "[", "]", "buffer", ",", "int", "offset", ",", "int", "length", ",", "long", "timeout", ")", "throws", "IOException", "{", "int", "sublen", "=", "getDelegate", "(", ")", ".", "readTimeout", "(...
Reads the next chunk from the stream in non-blocking mode. @param buffer byte array receiving the data. @param offset starting offset into the array. @param length number of bytes to read. @return the number of bytes read, -1 on end of file, or 0 on timeout.
[ "Reads", "the", "next", "chunk", "from", "the", "stream", "in", "non", "-", "blocking", "mode", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/io/StreamImplTee.java#L167-L178
43,915
SeaCloudsEU/SeaCloudsPlatform
dashboard/src/main/java/eu/seaclouds/platform/dashboard/util/ObjectMapperHelpers.java
ObjectMapperHelpers.ObjectToXml
public static String ObjectToXml(Object object) throws JAXBException { JAXBContext jaxbContext = JAXBContext.newInstance(object.getClass()); Marshaller marshaller = jaxbContext.createMarshaller(); StringWriter sw = new StringWriter(); marshaller.marshal(object, sw); return sw.toS...
java
public static String ObjectToXml(Object object) throws JAXBException { JAXBContext jaxbContext = JAXBContext.newInstance(object.getClass()); Marshaller marshaller = jaxbContext.createMarshaller(); StringWriter sw = new StringWriter(); marshaller.marshal(object, sw); return sw.toS...
[ "public", "static", "String", "ObjectToXml", "(", "Object", "object", ")", "throws", "JAXBException", "{", "JAXBContext", "jaxbContext", "=", "JAXBContext", ".", "newInstance", "(", "object", ".", "getClass", "(", ")", ")", ";", "Marshaller", "marshaller", "=", ...
Transforms an annotated Object to a XML string using javax.xml.bind.Marshaller @param object to transform to a XML String @return a XML string representing the object @throws IOException if is not possible to parse the object
[ "Transforms", "an", "annotated", "Object", "to", "a", "XML", "string", "using", "javax", ".", "xml", ".", "bind", ".", "Marshaller" ]
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/dashboard/src/main/java/eu/seaclouds/platform/dashboard/util/ObjectMapperHelpers.java#L128-L134
43,916
baratine/baratine
web/src/main/java/com/caucho/v5/io/i18n/ByteToCharBase.java
ByteToCharBase.setEncoding
public void setEncoding(String encoding) throws UnsupportedEncodingException { if (encoding != null) { _readEncoding = Encoding.getReadEncoding(this, encoding); _readEncodingName = Encoding.getMimeName(encoding); } else { _readEncoding = null; _readEncodingName = null; } ...
java
public void setEncoding(String encoding) throws UnsupportedEncodingException { if (encoding != null) { _readEncoding = Encoding.getReadEncoding(this, encoding); _readEncodingName = Encoding.getMimeName(encoding); } else { _readEncoding = null; _readEncodingName = null; } ...
[ "public", "void", "setEncoding", "(", "String", "encoding", ")", "throws", "UnsupportedEncodingException", "{", "if", "(", "encoding", "!=", "null", ")", "{", "_readEncoding", "=", "Encoding", ".", "getReadEncoding", "(", "this", ",", "encoding", ")", ";", "_r...
Sets the encoding for the converter.
[ "Sets", "the", "encoding", "for", "the", "converter", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/io/i18n/ByteToCharBase.java#L72-L83
43,917
baratine/baratine
web/src/main/java/com/caucho/v5/io/i18n/ByteToCharBase.java
ByteToCharBase.addByte
public void addByte(int b) throws IOException { int nextHead = (_byteHead + 1) % _byteBuffer.length; while (nextHead == _byteTail) { int ch = readChar(); if (ch < 0) { break; } outputChar(ch); } _byteBuffer[_byteHead] = (byte) b; _byteHead = nextHead; }
java
public void addByte(int b) throws IOException { int nextHead = (_byteHead + 1) % _byteBuffer.length; while (nextHead == _byteTail) { int ch = readChar(); if (ch < 0) { break; } outputChar(ch); } _byteBuffer[_byteHead] = (byte) b; _byteHead = nextHead; }
[ "public", "void", "addByte", "(", "int", "b", ")", "throws", "IOException", "{", "int", "nextHead", "=", "(", "_byteHead", "+", "1", ")", "%", "_byteBuffer", ".", "length", ";", "while", "(", "nextHead", "==", "_byteTail", ")", "{", "int", "ch", "=", ...
Adds the next byte. @param b the byte to write
[ "Adds", "the", "next", "byte", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/io/i18n/ByteToCharBase.java#L99-L116
43,918
baratine/baratine
web/src/main/java/com/caucho/v5/io/i18n/ByteToCharBase.java
ByteToCharBase.addChar
public void addChar(char nextCh) throws IOException { int ch; while ((ch = readChar()) >= 0) { outputChar((char) ch); } outputChar(nextCh); }
java
public void addChar(char nextCh) throws IOException { int ch; while ((ch = readChar()) >= 0) { outputChar((char) ch); } outputChar(nextCh); }
[ "public", "void", "addChar", "(", "char", "nextCh", ")", "throws", "IOException", "{", "int", "ch", ";", "while", "(", "(", "ch", "=", "readChar", "(", ")", ")", ">=", "0", ")", "{", "outputChar", "(", "(", "char", ")", "ch", ")", ";", "}", "outp...
Adds the next character. @param nextCh the character to write
[ "Adds", "the", "next", "character", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/io/i18n/ByteToCharBase.java#L123-L133
43,919
baratine/baratine
web/src/main/java/com/caucho/v5/io/i18n/ByteToCharBase.java
ByteToCharBase.readChar
private int readChar() throws IOException { Reader readEncoding = _readEncoding; if (readEncoding == null) return read(); else { if (readEncoding.read(_charBuffer, 0, 1) == 1) { return _charBuffer[0]; } else { return -1; } } }
java
private int readChar() throws IOException { Reader readEncoding = _readEncoding; if (readEncoding == null) return read(); else { if (readEncoding.read(_charBuffer, 0, 1) == 1) { return _charBuffer[0]; } else { return -1; } } }
[ "private", "int", "readChar", "(", ")", "throws", "IOException", "{", "Reader", "readEncoding", "=", "_readEncoding", ";", "if", "(", "readEncoding", "==", "null", ")", "return", "read", "(", ")", ";", "else", "{", "if", "(", "readEncoding", ".", "read", ...
Reads the next converted character.
[ "Reads", "the", "next", "converted", "character", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/io/i18n/ByteToCharBase.java#L151-L166
43,920
baratine/baratine
web/src/main/java/com/caucho/v5/io/i18n/ByteToCharBase.java
ByteToCharBase.read
public int read() throws IOException { if (_byteHead == _byteTail) { return -1; } int b = _byteBuffer[_byteTail] & 0xff; _byteTail = (_byteTail + 1) % _byteBuffer.length; return b; }
java
public int read() throws IOException { if (_byteHead == _byteTail) { return -1; } int b = _byteBuffer[_byteTail] & 0xff; _byteTail = (_byteTail + 1) % _byteBuffer.length; return b; }
[ "public", "int", "read", "(", ")", "throws", "IOException", "{", "if", "(", "_byteHead", "==", "_byteTail", ")", "{", "return", "-", "1", ";", "}", "int", "b", "=", "_byteBuffer", "[", "_byteTail", "]", "&", "0xff", ";", "_byteTail", "=", "(", "_byte...
For internal use only. Reads the next byte from the byte buffer. @return the next byte
[ "For", "internal", "use", "only", ".", "Reads", "the", "next", "byte", "from", "the", "byte", "buffer", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/io/i18n/ByteToCharBase.java#L173-L184
43,921
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/cpool/InterfaceMethodRefConstant.java
InterfaceMethodRefConstant.setNameAndType
public void setNameAndType(String name, String type) { _nameAndTypeIndex = getConstantPool().addNameAndType(name, type).getIndex(); }
java
public void setNameAndType(String name, String type) { _nameAndTypeIndex = getConstantPool().addNameAndType(name, type).getIndex(); }
[ "public", "void", "setNameAndType", "(", "String", "name", ",", "String", "type", ")", "{", "_nameAndTypeIndex", "=", "getConstantPool", "(", ")", ".", "addNameAndType", "(", "name", ",", "type", ")", ".", "getIndex", "(", ")", ";", "}" ]
Sets the method name and type
[ "Sets", "the", "method", "name", "and", "type" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/cpool/InterfaceMethodRefConstant.java#L81-L84
43,922
baratine/baratine
kraken/src/main/java/com/caucho/v5/kelp/TableKelp.java
TableKelp.putWithVersion
public void putWithVersion(RowCursor cursor, Result<Boolean> cont) { _tableService.put(cursor, PutType.PUT, cont); }
java
public void putWithVersion(RowCursor cursor, Result<Boolean> cont) { _tableService.put(cursor, PutType.PUT, cont); }
[ "public", "void", "putWithVersion", "(", "RowCursor", "cursor", ",", "Result", "<", "Boolean", ">", "cont", ")", "{", "_tableService", ".", "put", "(", "cursor", ",", "PutType", ".", "PUT", ",", "cont", ")", ";", "}" ]
Put using the version in the cursor, instead of clearing it.
[ "Put", "using", "the", "version", "in", "the", "cursor", "instead", "of", "clearing", "it", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/TableKelp.java#L403-L406
43,923
baratine/baratine
web/src/main/java/com/caucho/v5/log/DateFormatter.java
DateFormatter.format
void format(StringBuilder sb, Temporal localDate) { //Instant localDate = ClockCurrent.GMT.instant(); int len = _timestamp.length; for (int j = 0; j < len; j++) { _timestamp[j].format(sb, localDate); } }
java
void format(StringBuilder sb, Temporal localDate) { //Instant localDate = ClockCurrent.GMT.instant(); int len = _timestamp.length; for (int j = 0; j < len; j++) { _timestamp[j].format(sb, localDate); } }
[ "void", "format", "(", "StringBuilder", "sb", ",", "Temporal", "localDate", ")", "{", "//Instant localDate = ClockCurrent.GMT.instant();", "int", "len", "=", "_timestamp", ".", "length", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "len", ";", "j", ...
Formats the timestamp
[ "Formats", "the", "timestamp" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/DateFormatter.java#L80-L88
43,924
baratine/baratine
kraken/src/main/java/com/caucho/v5/kelp/TableWriterServiceImpl.java
TableWriterServiceImpl.writePage
@InService(TableWriterService.class) public void writePage(Page page, SegmentStream sOut, long oldSequence, int saveLength, int saveTail, int sequenceWrite, Result<Integer> ...
java
@InService(TableWriterService.class) public void writePage(Page page, SegmentStream sOut, long oldSequence, int saveLength, int saveTail, int sequenceWrite, Result<Integer> ...
[ "@", "InService", "(", "TableWriterService", ".", "class", ")", "public", "void", "writePage", "(", "Page", "page", ",", "SegmentStream", "sOut", ",", "long", "oldSequence", ",", "int", "saveLength", ",", "int", "saveTail", ",", "int", "sequenceWrite", ",", ...
Writes a page to the current segment @param page @param sOut @param oldSequence @param saveLength @param saveTail @param sequenceWrite page sequence to correlate write requests with flush completions
[ "Writes", "a", "page", "to", "the", "current", "segment" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/TableWriterServiceImpl.java#L419-L434
43,925
baratine/baratine
kraken/src/main/java/com/caucho/v5/kelp/TableWriterServiceImpl.java
TableWriterServiceImpl.writeBlobPage
@InService(TableWriterService.class) public void writeBlobPage(PageBlob page, int saveSequence, Result<Integer> result) { SegmentStream sOut = getBlobStream(); int saveLength = 0; int saveTail = 0; if (_blobSizeMax < page.getLen...
java
@InService(TableWriterService.class) public void writeBlobPage(PageBlob page, int saveSequence, Result<Integer> result) { SegmentStream sOut = getBlobStream(); int saveLength = 0; int saveTail = 0; if (_blobSizeMax < page.getLen...
[ "@", "InService", "(", "TableWriterService", ".", "class", ")", "public", "void", "writeBlobPage", "(", "PageBlob", "page", ",", "int", "saveSequence", ",", "Result", "<", "Integer", ">", "result", ")", "{", "SegmentStream", "sOut", "=", "getBlobStream", "(", ...
Writes a blob page to the current output segment. @param page the blob to be written @param saveSequence @return true on completion
[ "Writes", "a", "blob", "page", "to", "the", "current", "output", "segment", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/TableWriterServiceImpl.java#L443-L461
43,926
baratine/baratine
kraken/src/main/java/com/caucho/v5/kelp/TableWriterServiceImpl.java
TableWriterServiceImpl.openWriter
public OutSegment openWriter() { if (isGcRequired()) { // _gcSequence = _seqGen.get(); _table.getGcService().gc(_seqGen.get()); _seqSinceGcCount = 0; } _seqSinceGcCount++; long sequence = _seqGen.get(); return openWriterSeq(sequence); }
java
public OutSegment openWriter() { if (isGcRequired()) { // _gcSequence = _seqGen.get(); _table.getGcService().gc(_seqGen.get()); _seqSinceGcCount = 0; } _seqSinceGcCount++; long sequence = _seqGen.get(); return openWriterSeq(sequence); }
[ "public", "OutSegment", "openWriter", "(", ")", "{", "if", "(", "isGcRequired", "(", ")", ")", "{", "// _gcSequence = _seqGen.get();", "_table", ".", "getGcService", "(", ")", ".", "gc", "(", "_seqGen", ".", "get", "(", ")", ")", ";", "_seqSinceGcCount", "...
Opens a new segment writer. The segment's sequence id will be the next sequence number. @return the new segment writer
[ "Opens", "a", "new", "segment", "writer", ".", "The", "segment", "s", "sequence", "id", "will", "be", "the", "next", "sequence", "number", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/TableWriterServiceImpl.java#L503-L515
43,927
baratine/baratine
kraken/src/main/java/com/caucho/v5/kelp/TableWriterServiceImpl.java
TableWriterServiceImpl.calculateSegmentSize
private void calculateSegmentSize() { DatabaseKelp db = _table.database(); _segmentSizeNew = calculateSegmentSize(db.getSegmentSizeFactorNew(), _segmentSizeNew); _segmentSizeGc = calculateSegmentSize(db.getSegmentSizeFactorGc(), ...
java
private void calculateSegmentSize() { DatabaseKelp db = _table.database(); _segmentSizeNew = calculateSegmentSize(db.getSegmentSizeFactorNew(), _segmentSizeNew); _segmentSizeGc = calculateSegmentSize(db.getSegmentSizeFactorGc(), ...
[ "private", "void", "calculateSegmentSize", "(", ")", "{", "DatabaseKelp", "db", "=", "_table", ".", "database", "(", ")", ";", "_segmentSizeNew", "=", "calculateSegmentSize", "(", "db", ".", "getSegmentSizeFactorNew", "(", ")", ",", "_segmentSizeNew", ")", ";", ...
Calculates the dynamic segment size based on the current table size. Small tables use small segments and large tables use large segments to improve efficiency. A small table will have about 5 active segments because of GC, which means a table with 64k live entries will still use 5 * minSegmentSize. new segments: 1/64...
[ "Calculates", "the", "dynamic", "segment", "size", "based", "on", "the", "current", "table", "size", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/TableWriterServiceImpl.java#L581-L590
43,928
baratine/baratine
kraken/src/main/java/com/caucho/v5/kelp/TableWriterServiceImpl.java
TableWriterServiceImpl.calculateSegmentSize
private int calculateSegmentSize(int factor, int segmentSizeOld) { DatabaseKelp db = _table.database(); long segmentFactor = _tableLength / db.getSegmentSizeMin(); long segmentFactorNew = segmentFactor / factor; // segment size is (tableSize / factor), restricted to a power of 4 // ov...
java
private int calculateSegmentSize(int factor, int segmentSizeOld) { DatabaseKelp db = _table.database(); long segmentFactor = _tableLength / db.getSegmentSizeMin(); long segmentFactorNew = segmentFactor / factor; // segment size is (tableSize / factor), restricted to a power of 4 // ov...
[ "private", "int", "calculateSegmentSize", "(", "int", "factor", ",", "int", "segmentSizeOld", ")", "{", "DatabaseKelp", "db", "=", "_table", ".", "database", "(", ")", ";", "long", "segmentFactor", "=", "_tableLength", "/", "db", ".", "getSegmentSizeMin", "(",...
Calculate the dynamic segment size. The new segment size is a fraction of the current table size. @param factor the target ratio compared to the table size @param segmentSizeOld the previous segment size
[ "Calculate", "the", "dynamic", "segment", "size", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/TableWriterServiceImpl.java#L600-L635
43,929
baratine/baratine
kraken/src/main/java/com/caucho/v5/kelp/TableWriterServiceImpl.java
TableWriterServiceImpl.fsync
public void fsync(Result<Boolean> result) throws IOException { SegmentStream nodeStream = _nodeStream; // FlushCompletion cont = new FlushCompletion(result, nodeStream, blobStream); if (nodeStream != null) { nodeStream.fsync(result); } else { result.ok(true); } ...
java
public void fsync(Result<Boolean> result) throws IOException { SegmentStream nodeStream = _nodeStream; // FlushCompletion cont = new FlushCompletion(result, nodeStream, blobStream); if (nodeStream != null) { nodeStream.fsync(result); } else { result.ok(true); } ...
[ "public", "void", "fsync", "(", "Result", "<", "Boolean", ">", "result", ")", "throws", "IOException", "{", "SegmentStream", "nodeStream", "=", "_nodeStream", ";", "// FlushCompletion cont = new FlushCompletion(result, nodeStream, blobStream);", "if", "(", "nodeStream", "...
sync the output stream with the filesystem when possible.
[ "sync", "the", "output", "stream", "with", "the", "filesystem", "when", "possible", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/TableWriterServiceImpl.java#L667-L680
43,930
baratine/baratine
kraken/src/main/java/com/caucho/v5/kelp/TableWriterServiceImpl.java
TableWriterServiceImpl.afterDeliver
@AfterBatch public void afterDeliver() { SegmentStream nodeStream = _nodeStream; if (nodeStream != null) { if (_isBlobDirty) { _isBlobDirty = false; // nodeStream.flush(null); nodeStream.fsync(Result.ignore()); } else { nodeStream.flush(Result.ignore()...
java
@AfterBatch public void afterDeliver() { SegmentStream nodeStream = _nodeStream; if (nodeStream != null) { if (_isBlobDirty) { _isBlobDirty = false; // nodeStream.flush(null); nodeStream.fsync(Result.ignore()); } else { nodeStream.flush(Result.ignore()...
[ "@", "AfterBatch", "public", "void", "afterDeliver", "(", ")", "{", "SegmentStream", "nodeStream", "=", "_nodeStream", ";", "if", "(", "nodeStream", "!=", "null", ")", "{", "if", "(", "_isBlobDirty", ")", "{", "_isBlobDirty", "=", "false", ";", "// nodeStrea...
Flushes the stream after a batch of writes. If the writes included a blob write, the segment must be fsynced because the blob is not saved in the journal.
[ "Flushes", "the", "stream", "after", "a", "batch", "of", "writes", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/TableWriterServiceImpl.java#L695-L721
43,931
baratine/baratine
kraken/src/main/java/com/caucho/v5/kelp/TableWriterServiceImpl.java
TableWriterServiceImpl.close
public void close(Result<Boolean> result) { _lifecycle.toDestroy(); SegmentStream nodeStream = _nodeStream; _nodeStream = null; if (nodeStream != null) { nodeStream.closeFsync(result.then(v->closeImpl())); } else { result.ok(true); } }
java
public void close(Result<Boolean> result) { _lifecycle.toDestroy(); SegmentStream nodeStream = _nodeStream; _nodeStream = null; if (nodeStream != null) { nodeStream.closeFsync(result.then(v->closeImpl())); } else { result.ok(true); } }
[ "public", "void", "close", "(", "Result", "<", "Boolean", ">", "result", ")", "{", "_lifecycle", ".", "toDestroy", "(", ")", ";", "SegmentStream", "nodeStream", "=", "_nodeStream", ";", "_nodeStream", "=", "null", ";", "if", "(", "nodeStream", "!=", "null"...
Closes the store.
[ "Closes", "the", "store", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/TableWriterServiceImpl.java#L726-L739
43,932
baratine/baratine
kraken/src/main/java/com/caucho/v5/kelp/segment/OutSegment.java
OutSegment.writePage
@InService(SegmentServiceImpl.class) public Page writePage(Page page, long oldSequence, int saveLength, int saveTail, int saveSequence, Result<Integer> result) { if (isClosed()) { return null; } // Type typ...
java
@InService(SegmentServiceImpl.class) public Page writePage(Page page, long oldSequence, int saveLength, int saveTail, int saveSequence, Result<Integer> result) { if (isClosed()) { return null; } // Type typ...
[ "@", "InService", "(", "SegmentServiceImpl", ".", "class", ")", "public", "Page", "writePage", "(", "Page", "page", ",", "long", "oldSequence", ",", "int", "saveLength", ",", "int", "saveTail", ",", "int", "saveSequence", ",", "Result", "<", "Integer", ">", ...
Writes the page to the segment. @param page @param oldSequence @param saveLength @param saveTail @param saveSequence @return
[ "Writes", "the", "page", "to", "the", "segment", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/segment/OutSegment.java#L228-L282
43,933
baratine/baratine
kraken/src/main/java/com/caucho/v5/kelp/segment/OutSegment.java
OutSegment.flushData
public void flushData() { if (isClosed()) { if (_pendingFlushEntries.size() > 0) { System.out.println("PENDING_FLUSH"); } return; } WriteStream out = _out; if (out != null) { try { out.flush(); } catch (Exception e) { log.log(Level.FINER, e.t...
java
public void flushData() { if (isClosed()) { if (_pendingFlushEntries.size() > 0) { System.out.println("PENDING_FLUSH"); } return; } WriteStream out = _out; if (out != null) { try { out.flush(); } catch (Exception e) { log.log(Level.FINER, e.t...
[ "public", "void", "flushData", "(", ")", "{", "if", "(", "isClosed", "(", ")", ")", "{", "if", "(", "_pendingFlushEntries", ".", "size", "(", ")", ">", "0", ")", "{", "System", ".", "out", ".", "println", "(", "\"PENDING_FLUSH\"", ")", ";", "}", "r...
Flushes the buffered data to the segment. After the flush, pending entries are notified, allowing page stubs to replace buffered pages. Since the written data is now in the mmap, the buffered page can be gc'ed and replaced with a stub read.
[ "Flushes", "the", "buffered", "data", "to", "the", "segment", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/segment/OutSegment.java#L359-L380
43,934
baratine/baratine
kraken/src/main/java/com/caucho/v5/kelp/segment/OutSegment.java
OutSegment.write
@Override public void write(byte []buffer, int offset, int length, boolean isEnd) throws IOException { int position = _position; if (length < 0) { throw new IllegalArgumentException(); } if (_indexAddress < position + length) { throw new IllegalArgumentE...
java
@Override public void write(byte []buffer, int offset, int length, boolean isEnd) throws IOException { int position = _position; if (length < 0) { throw new IllegalArgumentException(); } if (_indexAddress < position + length) { throw new IllegalArgumentE...
[ "@", "Override", "public", "void", "write", "(", "byte", "[", "]", "buffer", ",", "int", "offset", ",", "int", "length", ",", "boolean", "isEnd", ")", "throws", "IOException", "{", "int", "position", "=", "_position", ";", "if", "(", "length", "<", "0"...
Writes to the file from the WriteStream flush. After the write, a read from the mmap will succeed, but the headers cannot be written until after the fsync.
[ "Writes", "to", "the", "file", "from", "the", "WriteStream", "flush", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/segment/OutSegment.java#L388-L417
43,935
baratine/baratine
kraken/src/main/java/com/caucho/v5/kelp/segment/OutSegment.java
OutSegment.completePendingFlush
private void completePendingFlush() { int size = _pendingFlushEntries.size(); if (size == 0) { return; } // ArrayList<TableService.PageFlush> pageList = new ArrayList<>(); for (int i = 0; i < size; i++) { PendingEntry entry = _pendingFlushEntries.get(i); entry.a...
java
private void completePendingFlush() { int size = _pendingFlushEntries.size(); if (size == 0) { return; } // ArrayList<TableService.PageFlush> pageList = new ArrayList<>(); for (int i = 0; i < size; i++) { PendingEntry entry = _pendingFlushEntries.get(i); entry.a...
[ "private", "void", "completePendingFlush", "(", ")", "{", "int", "size", "=", "_pendingFlushEntries", ".", "size", "(", ")", ";", "if", "(", "size", "==", "0", ")", "{", "return", ";", "}", "// ArrayList<TableService.PageFlush> pageList = new ArrayList<>();", "for...
Notifies the calling service after the entry is written to the mmap. The entries will be added to the pending sync list.
[ "Notifies", "the", "calling", "service", "after", "the", "entry", "is", "written", "to", "the", "mmap", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/segment/OutSegment.java#L424-L445
43,936
baratine/baratine
kraken/src/main/java/com/caucho/v5/kelp/segment/OutSegment.java
OutSegment.fsyncImpl
private void fsyncImpl(Result<Boolean> result, FsyncType fsyncType) { try { flushData(); ArrayList<SegmentFsyncCallback> fsyncListeners = new ArrayList<>(_fsyncListeners); _fsyncListeners.clear(); Result<Boolean> resultNext = result.then((v,r)-> afterDataFsync...
java
private void fsyncImpl(Result<Boolean> result, FsyncType fsyncType) { try { flushData(); ArrayList<SegmentFsyncCallback> fsyncListeners = new ArrayList<>(_fsyncListeners); _fsyncListeners.clear(); Result<Boolean> resultNext = result.then((v,r)-> afterDataFsync...
[ "private", "void", "fsyncImpl", "(", "Result", "<", "Boolean", ">", "result", ",", "FsyncType", "fsyncType", ")", "{", "try", "{", "flushData", "(", ")", ";", "ArrayList", "<", "SegmentFsyncCallback", ">", "fsyncListeners", "=", "new", "ArrayList", "<>", "("...
Syncs the segment to the disk. After the segment's data is synced, the headers can be written. A second sync is needed to complete the header writes.
[ "Syncs", "the", "segment", "to", "the", "disk", ".", "After", "the", "segment", "s", "data", "is", "synced", "the", "headers", "can", "be", "written", ".", "A", "second", "sync", "is", "needed", "to", "complete", "the", "header", "writes", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/segment/OutSegment.java#L476-L507
43,937
baratine/baratine
kraken/src/main/java/com/caucho/v5/kelp/segment/OutSegment.java
OutSegment.afterDataFsync
private void afterDataFsync(Result<Boolean> result, int position, FsyncType fsyncType, ArrayList<SegmentFsyncCallback> listeners) { try { completeIndex(position); Result<Boolean> cont = result.then((v,r)->...
java
private void afterDataFsync(Result<Boolean> result, int position, FsyncType fsyncType, ArrayList<SegmentFsyncCallback> listeners) { try { completeIndex(position); Result<Boolean> cont = result.then((v,r)->...
[ "private", "void", "afterDataFsync", "(", "Result", "<", "Boolean", ">", "result", ",", "int", "position", ",", "FsyncType", "fsyncType", ",", "ArrayList", "<", "SegmentFsyncCallback", ">", "listeners", ")", "{", "try", "{", "completeIndex", "(", "position", "...
Callback after the page data has been fynced, so the index can be written. The page write is split in two, so the index is always written after the data is guaranteed to be flushed to disk.
[ "Callback", "after", "the", "page", "data", "has", "been", "fynced", "so", "the", "index", "can", "be", "written", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/segment/OutSegment.java#L516-L537
43,938
baratine/baratine
kraken/src/main/java/com/caucho/v5/kelp/segment/OutSegment.java
OutSegment.afterIndexFsync
private void afterIndexFsync(Result<Boolean> result, FsyncType fsyncType, ArrayList<SegmentFsyncCallback> fsyncListeners) { try { // completePendingEntries(_position); if (fsyncType.isClose()) { _isClosed = true; _segment.fi...
java
private void afterIndexFsync(Result<Boolean> result, FsyncType fsyncType, ArrayList<SegmentFsyncCallback> fsyncListeners) { try { // completePendingEntries(_position); if (fsyncType.isClose()) { _isClosed = true; _segment.fi...
[ "private", "void", "afterIndexFsync", "(", "Result", "<", "Boolean", ">", "result", ",", "FsyncType", "fsyncType", ",", "ArrayList", "<", "SegmentFsyncCallback", ">", "fsyncListeners", ")", "{", "try", "{", "// completePendingEntries(_position);", "if", "(", "fsyncT...
Callback after the index has been flushed.
[ "Callback", "after", "the", "index", "has", "been", "flushed", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/segment/OutSegment.java#L542-L570
43,939
baratine/baratine
kraken/src/main/java/com/caucho/v5/kelp/segment/OutSegment.java
OutSegment.writeIndex
private void writeIndex(int entryAddress, byte []entryBuffer, int offset, int length) { long address = _segment.getAddress() + entryAddress; if (_segment.length() < entryAddress + length) { throw new IllegalStateException(L.l("offset=0x{0} length={1}", entryAddress, length)); ...
java
private void writeIndex(int entryAddress, byte []entryBuffer, int offset, int length) { long address = _segment.getAddress() + entryAddress; if (_segment.length() < entryAddress + length) { throw new IllegalStateException(L.l("offset=0x{0} length={1}", entryAddress, length)); ...
[ "private", "void", "writeIndex", "(", "int", "entryAddress", ",", "byte", "[", "]", "entryBuffer", ",", "int", "offset", ",", "int", "length", ")", "{", "long", "address", "=", "_segment", ".", "getAddress", "(", ")", "+", "entryAddress", ";", "if", "(",...
Write the current header to the output.
[ "Write", "the", "current", "header", "to", "the", "output", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/segment/OutSegment.java#L687-L700
43,940
baratine/baratine
core/src/main/java/com/caucho/v5/amp/vault/ClassGeneratorVault.java
ClassGeneratorVault.createImpl
private static Constructor<?> createImpl(Class<?> cl, ClassLoader loader) { /** if (! Modifier.isAbstract(cl.getModifiers())) { throw new IllegalArgumentException(); } */ ClassGeneratorVault<?> generator = new ClassGeneratorVault<>(cl, lo...
java
private static Constructor<?> createImpl(Class<?> cl, ClassLoader loader) { /** if (! Modifier.isAbstract(cl.getModifiers())) { throw new IllegalArgumentException(); } */ ClassGeneratorVault<?> generator = new ClassGeneratorVault<>(cl, lo...
[ "private", "static", "Constructor", "<", "?", ">", "createImpl", "(", "Class", "<", "?", ">", "cl", ",", "ClassLoader", "loader", ")", "{", "/**\n if (! Modifier.isAbstract(cl.getModifiers())) {\n throw new IllegalArgumentException();\n }\n */", "ClassGeneratorVau...
Must return Constructor, not MethodHandle because MethodHandles cache the type in the permgen.
[ "Must", "return", "Constructor", "not", "MethodHandle", "because", "MethodHandles", "cache", "the", "type", "in", "the", "permgen", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/amp/vault/ClassGeneratorVault.java#L160-L175
43,941
baratine/baratine
core/src/main/java/com/caucho/v5/amp/vault/ClassGeneratorVault.java
ClassGeneratorVault.introspectMethods
private void introspectMethods(JavaClass jClass) { for (Method method : getMethods()) { Class<?> []paramTypes = method.getParameterTypes(); int paramLen = paramTypes.length; if (! Modifier.isAbstract(method.getModifiers())) { continue; } if (Modifier.isStatic(method.g...
java
private void introspectMethods(JavaClass jClass) { for (Method method : getMethods()) { Class<?> []paramTypes = method.getParameterTypes(); int paramLen = paramTypes.length; if (! Modifier.isAbstract(method.getModifiers())) { continue; } if (Modifier.isStatic(method.g...
[ "private", "void", "introspectMethods", "(", "JavaClass", "jClass", ")", "{", "for", "(", "Method", "method", ":", "getMethods", "(", ")", ")", "{", "Class", "<", "?", ">", "[", "]", "paramTypes", "=", "method", ".", "getParameterTypes", "(", ")", ";", ...
Introspect the methods to find abstract methods.
[ "Introspect", "the", "methods", "to", "find", "abstract", "methods", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/amp/vault/ClassGeneratorVault.java#L363-L440
43,942
baratine/baratine
framework/src/main/java/com/caucho/v5/loader/CompilingLoader.java
CompilingLoader.create
public static DynamicClassLoader create(PathImpl path) { DynamicClassLoader loader = new DynamicClassLoader(null); CompilingLoader compilingLoader = new CompilingLoader(loader, path); compilingLoader.init(); loader.init(); return loader; }
java
public static DynamicClassLoader create(PathImpl path) { DynamicClassLoader loader = new DynamicClassLoader(null); CompilingLoader compilingLoader = new CompilingLoader(loader, path); compilingLoader.init(); loader.init(); return loader; }
[ "public", "static", "DynamicClassLoader", "create", "(", "PathImpl", "path", ")", "{", "DynamicClassLoader", "loader", "=", "new", "DynamicClassLoader", "(", "null", ")", ";", "CompilingLoader", "compilingLoader", "=", "new", "CompilingLoader", "(", "loader", ",", ...
Create a class loader based on the compiling loader @param path traditional classpath @return the new ClassLoader
[ "Create", "a", "class", "loader", "based", "on", "the", "compiling", "loader" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/loader/CompilingLoader.java#L160-L170
43,943
baratine/baratine
framework/src/main/java/com/caucho/v5/loader/CompilingLoader.java
CompilingLoader.create
public static DynamicClassLoader create(ClassLoader parent, PathImpl classDir, PathImpl sourceDir, String args, String encoding) { DynamicClassLoader loader = new DynamicClassLoader(parent); loader.addLoader(new CompilingLoade...
java
public static DynamicClassLoader create(ClassLoader parent, PathImpl classDir, PathImpl sourceDir, String args, String encoding) { DynamicClassLoader loader = new DynamicClassLoader(parent); loader.addLoader(new CompilingLoade...
[ "public", "static", "DynamicClassLoader", "create", "(", "ClassLoader", "parent", ",", "PathImpl", "classDir", ",", "PathImpl", "sourceDir", ",", "String", "args", ",", "String", "encoding", ")", "{", "DynamicClassLoader", "loader", "=", "new", "DynamicClassLoader",...
Creates a new compiling class loader @param classDir generated class directory root @param sourceDir Java source directory root @param args Javac arguments @param encoding javac encoding
[ "Creates", "a", "new", "compiling", "class", "loader" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/loader/CompilingLoader.java#L180-L190
43,944
baratine/baratine
framework/src/main/java/com/caucho/v5/loader/CompilingLoader.java
CompilingLoader.make
@Override public void make() { synchronized (this) { if (CurrentTime.currentTime() < _lastMakeTime + 2000) return; try { makeImpl(); } catch (Exception e) { log.log(Level.FINER, e.toString(), e); } _lastMakeTime = CurrentTime.currentTime(); } }
java
@Override public void make() { synchronized (this) { if (CurrentTime.currentTime() < _lastMakeTime + 2000) return; try { makeImpl(); } catch (Exception e) { log.log(Level.FINER, e.toString(), e); } _lastMakeTime = CurrentTime.currentTime(); } }
[ "@", "Override", "public", "void", "make", "(", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "CurrentTime", ".", "currentTime", "(", ")", "<", "_lastMakeTime", "+", "2000", ")", "return", ";", "try", "{", "makeImpl", "(", ")", ";", "}"...
Compiles all changed files in the class directory.
[ "Compiles", "all", "changed", "files", "in", "the", "class", "directory", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/loader/CompilingLoader.java#L380-L395
43,945
baratine/baratine
framework/src/main/java/com/caucho/v5/loader/CompilingLoader.java
CompilingLoader.findAllModifiedClasses
private void findAllModifiedClasses(String name, PathImpl sourceDir, PathImpl classDir, String sourcePath, ArrayList<String> sources) throws IOException, ClassNotFo...
java
private void findAllModifiedClasses(String name, PathImpl sourceDir, PathImpl classDir, String sourcePath, ArrayList<String> sources) throws IOException, ClassNotFo...
[ "private", "void", "findAllModifiedClasses", "(", "String", "name", ",", "PathImpl", "sourceDir", ",", "PathImpl", "classDir", ",", "String", "sourcePath", ",", "ArrayList", "<", "String", ">", "sources", ")", "throws", "IOException", ",", "ClassNotFoundException", ...
Returns the classes which need compilation.
[ "Returns", "the", "classes", "which", "need", "compilation", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/loader/CompilingLoader.java#L430-L511
43,946
baratine/baratine
framework/src/main/java/com/caucho/v5/loader/CompilingLoader.java
CompilingLoader.getClassEntry
@Override protected ClassEntry getClassEntry(String name, String pathName) throws ClassNotFoundException { PathImpl classFile = _classDir.lookup(pathName); /* Path classDir = classFile.getParent(); if (! classDir.isDirectory()) return null; */ String javaName = name.repla...
java
@Override protected ClassEntry getClassEntry(String name, String pathName) throws ClassNotFoundException { PathImpl classFile = _classDir.lookup(pathName); /* Path classDir = classFile.getParent(); if (! classDir.isDirectory()) return null; */ String javaName = name.repla...
[ "@", "Override", "protected", "ClassEntry", "getClassEntry", "(", "String", "name", ",", "String", "pathName", ")", "throws", "ClassNotFoundException", "{", "PathImpl", "classFile", "=", "_classDir", ".", "lookup", "(", "pathName", ")", ";", "/*\n Path classDir =...
Loads the specified class, compiling if necessary.
[ "Loads", "the", "specified", "class", "compiling", "if", "necessary", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/loader/CompilingLoader.java#L516-L569
43,947
baratine/baratine
framework/src/main/java/com/caucho/v5/loader/CompilingLoader.java
CompilingLoader.checkSource
boolean checkSource(PathImpl sourceDir, String javaName) { try { while (javaName != null && ! javaName.equals("")) { int p = javaName.indexOf('/'); String head; if (p >= 0) { head = javaName.substring(0, p); javaName = javaName.substring(p + 1); } ...
java
boolean checkSource(PathImpl sourceDir, String javaName) { try { while (javaName != null && ! javaName.equals("")) { int p = javaName.indexOf('/'); String head; if (p >= 0) { head = javaName.substring(0, p); javaName = javaName.substring(p + 1); } ...
[ "boolean", "checkSource", "(", "PathImpl", "sourceDir", ",", "String", "javaName", ")", "{", "try", "{", "while", "(", "javaName", "!=", "null", "&&", "!", "javaName", ".", "equals", "(", "\"\"", ")", ")", "{", "int", "p", "=", "javaName", ".", "indexO...
Checks that the case is okay for the source.
[ "Checks", "that", "the", "case", "is", "okay", "for", "the", "source", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/loader/CompilingLoader.java#L584-L619
43,948
baratine/baratine
framework/src/main/java/com/caucho/v5/loader/CompilingLoader.java
CompilingLoader.getPath
@Override public PathImpl getPath(String name) { PathImpl path = _classDir.lookup(name); if (path != null && path.exists()) return path; path = _sourceDir.lookup(name); if (path != null && path.exists()) return path; return null; }
java
@Override public PathImpl getPath(String name) { PathImpl path = _classDir.lookup(name); if (path != null && path.exists()) return path; path = _sourceDir.lookup(name); if (path != null && path.exists()) return path; return null; }
[ "@", "Override", "public", "PathImpl", "getPath", "(", "String", "name", ")", "{", "PathImpl", "path", "=", "_classDir", ".", "lookup", "(", "name", ")", ";", "if", "(", "path", "!=", "null", "&&", "path", ".", "exists", "(", ")", ")", "return", "pat...
Returns the path for the given name. @param name the name of the class
[ "Returns", "the", "path", "for", "the", "given", "name", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/loader/CompilingLoader.java#L715-L729
43,949
baratine/baratine
framework/src/main/java/com/caucho/v5/loader/CompilingLoader.java
CompilingLoader.buildClassPath
@Override protected void buildClassPath(ArrayList<String> pathList) { if (! _classDir.getScheme().equals("file")) return; try { if (! _classDir.isDirectory() && _sourceDir.isDirectory()) { try { _classDir.mkdirs(); } catch (IOException e) { } } if ...
java
@Override protected void buildClassPath(ArrayList<String> pathList) { if (! _classDir.getScheme().equals("file")) return; try { if (! _classDir.isDirectory() && _sourceDir.isDirectory()) { try { _classDir.mkdirs(); } catch (IOException e) { } } if ...
[ "@", "Override", "protected", "void", "buildClassPath", "(", "ArrayList", "<", "String", ">", "pathList", ")", "{", "if", "(", "!", "_classDir", ".", "getScheme", "(", ")", ".", "equals", "(", "\"file\"", ")", ")", "return", ";", "try", "{", "if", "(",...
Adds the classpath we're responsible for to the classpath @param head the overriding classpath @return the new classpath
[ "Adds", "the", "classpath", "we", "re", "responsible", "for", "to", "the", "classpath" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/loader/CompilingLoader.java#L745-L775
43,950
baratine/baratine
web/src/main/java/com/caucho/v5/web/webapp/RequestBaratineImpl.java
RequestBaratineImpl.session
@Override public ServiceRefAmp session(String name) { String address = "session:///" + name + "/"; return sessionImpl(address); }
java
@Override public ServiceRefAmp session(String name) { String address = "session:///" + name + "/"; return sessionImpl(address); }
[ "@", "Override", "public", "ServiceRefAmp", "session", "(", "String", "name", ")", "{", "String", "address", "=", "\"session:///\"", "+", "name", "+", "\"/\"", ";", "return", "sessionImpl", "(", "address", ")", ";", "}" ]
Find the session by its service name. If the session doesn't exist, create it.
[ "Find", "the", "session", "by", "its", "service", "name", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/web/webapp/RequestBaratineImpl.java#L257-L263
43,951
baratine/baratine
web/src/main/java/com/caucho/v5/web/webapp/RequestBaratineImpl.java
RequestBaratineImpl.session
@Override public <X> X session(Class<X> type) { String address = services().address(type); if (address.startsWith("/")) { address = "session://" + address; } return sessionImpl(address + "/").as(type); }
java
@Override public <X> X session(Class<X> type) { String address = services().address(type); if (address.startsWith("/")) { address = "session://" + address; } return sessionImpl(address + "/").as(type); }
[ "@", "Override", "public", "<", "X", ">", "X", "session", "(", "Class", "<", "X", ">", "type", ")", "{", "String", "address", "=", "services", "(", ")", ".", "address", "(", "type", ")", ";", "if", "(", "address", ".", "startsWith", "(", "\"/\"", ...
Find the session by its service type. If the session doesn't exist, create it.
[ "Find", "the", "session", "by", "its", "service", "type", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/web/webapp/RequestBaratineImpl.java#L270-L280
43,952
baratine/baratine
web/src/main/java/com/caucho/v5/web/webapp/RequestBaratineImpl.java
RequestBaratineImpl.sessionImpl
private ServiceRefAmp sessionImpl(String address) { if (! address.startsWith("session:") || ! address.endsWith("/")) { throw new IllegalArgumentException(address); } String sessionId = cookie("JSESSIONID"); if (sessionId == null) { sessionId = generateSessionId(); cookie("JSESSION...
java
private ServiceRefAmp sessionImpl(String address) { if (! address.startsWith("session:") || ! address.endsWith("/")) { throw new IllegalArgumentException(address); } String sessionId = cookie("JSESSIONID"); if (sessionId == null) { sessionId = generateSessionId(); cookie("JSESSION...
[ "private", "ServiceRefAmp", "sessionImpl", "(", "String", "address", ")", "{", "if", "(", "!", "address", ".", "startsWith", "(", "\"session:\"", ")", "||", "!", "address", ".", "endsWith", "(", "\"/\"", ")", ")", "{", "throw", "new", "IllegalArgumentExcepti...
Find or create a session cookie as the session id and find or create a session with the generated address.
[ "Find", "or", "create", "a", "session", "cookie", "as", "the", "session", "id", "and", "find", "or", "create", "a", "session", "with", "the", "generated", "address", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/web/webapp/RequestBaratineImpl.java#L286-L301
43,953
baratine/baratine
web/src/main/java/com/caucho/v5/web/webapp/RequestBaratineImpl.java
RequestBaratineImpl.upgrade
@Override public void upgrade(Object protocol) { Objects.requireNonNull(protocol); if (protocol instanceof ServiceWebSocket) { ServiceWebSocket<?,?> webSocket = (ServiceWebSocket<?,?>) protocol; upgradeWebSocket(webSocket); } else { throw new IllegalArgumentException(protocol.toS...
java
@Override public void upgrade(Object protocol) { Objects.requireNonNull(protocol); if (protocol instanceof ServiceWebSocket) { ServiceWebSocket<?,?> webSocket = (ServiceWebSocket<?,?>) protocol; upgradeWebSocket(webSocket); } else { throw new IllegalArgumentException(protocol.toS...
[ "@", "Override", "public", "void", "upgrade", "(", "Object", "protocol", ")", "{", "Objects", ".", "requireNonNull", "(", "protocol", ")", ";", "if", "(", "protocol", "instanceof", "ServiceWebSocket", ")", "{", "ServiceWebSocket", "<", "?", ",", "?", ">", ...
Starts an upgrade of the HTTP request to a protocol on raw TCP.
[ "Starts", "an", "upgrade", "of", "the", "HTTP", "request", "to", "a", "protocol", "on", "raw", "TCP", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/web/webapp/RequestBaratineImpl.java#L363-L376
43,954
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JClassWrapper.java
JClassWrapper.getMethods
public JMethod []getMethods() { Method []methods = _class.getMethods(); JMethod []jMethods = new JMethod[methods.length]; for (int i = 0; i < methods.length; i++) { jMethods[i] = new JMethodWrapper(methods[i], getClassLoader()); } return jMethods; }
java
public JMethod []getMethods() { Method []methods = _class.getMethods(); JMethod []jMethods = new JMethod[methods.length]; for (int i = 0; i < methods.length; i++) { jMethods[i] = new JMethodWrapper(methods[i], getClassLoader()); } return jMethods; }
[ "public", "JMethod", "[", "]", "getMethods", "(", ")", "{", "Method", "[", "]", "methods", "=", "_class", ".", "getMethods", "(", ")", ";", "JMethod", "[", "]", "jMethods", "=", "new", "JMethod", "[", "methods", ".", "length", "]", ";", "for", "(", ...
Returns the public methods.
[ "Returns", "the", "public", "methods", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JClassWrapper.java#L241-L252
43,955
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JClassWrapper.java
JClassWrapper.getMethod
public JMethod getMethod(String name, JClass []types) { JClassLoader jClassLoader = getClassLoader(); return getMethod(_class, name, types, jClassLoader); }
java
public JMethod getMethod(String name, JClass []types) { JClassLoader jClassLoader = getClassLoader(); return getMethod(_class, name, types, jClassLoader); }
[ "public", "JMethod", "getMethod", "(", "String", "name", ",", "JClass", "[", "]", "types", ")", "{", "JClassLoader", "jClassLoader", "=", "getClassLoader", "(", ")", ";", "return", "getMethod", "(", "_class", ",", "name", ",", "types", ",", "jClassLoader", ...
Returns the matching methods.
[ "Returns", "the", "matching", "methods", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JClassWrapper.java#L257-L262
43,956
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JClassWrapper.java
JClassWrapper.getConstructors
public JMethod []getConstructors() { Constructor []methods = _class.getConstructors(); JMethod []jMethods = new JMethod[methods.length]; for (int i = 0; i < methods.length; i++) { jMethods[i] = new JConstructorWrapper(methods[i], getClassLoader()); } return jMethods; }
java
public JMethod []getConstructors() { Constructor []methods = _class.getConstructors(); JMethod []jMethods = new JMethod[methods.length]; for (int i = 0; i < methods.length; i++) { jMethods[i] = new JConstructorWrapper(methods[i], getClassLoader()); } return jMethods; }
[ "public", "JMethod", "[", "]", "getConstructors", "(", ")", "{", "Constructor", "[", "]", "methods", "=", "_class", ".", "getConstructors", "(", ")", ";", "JMethod", "[", "]", "jMethods", "=", "new", "JMethod", "[", "methods", ".", "length", "]", ";", ...
Returns the public constructors.
[ "Returns", "the", "public", "constructors", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JClassWrapper.java#L300-L311
43,957
baratine/baratine
kraken/src/main/java/com/caucho/v5/h3/io/InRawH3Impl.java
InRawH3Impl.scan
@Override public void scan(InH3Amp in, PathH3Amp path, Object[] values) { int ch = read(); switch (ch) { case 0xd0: readDefinition(in); scan(in, path, values); return; case 0xd1: case 0xd2: case 0xd3: case 0xd4: case 0xd5: case 0xd6: case 0xd7: case 0xd8: case ...
java
@Override public void scan(InH3Amp in, PathH3Amp path, Object[] values) { int ch = read(); switch (ch) { case 0xd0: readDefinition(in); scan(in, path, values); return; case 0xd1: case 0xd2: case 0xd3: case 0xd4: case 0xd5: case 0xd6: case 0xd7: case 0xd8: case ...
[ "@", "Override", "public", "void", "scan", "(", "InH3Amp", "in", ",", "PathH3Amp", "path", ",", "Object", "[", "]", "values", ")", "{", "int", "ch", "=", "read", "(", ")", ";", "switch", "(", "ch", ")", "{", "case", "0xd0", ":", "readDefinition", "...
Scan for a query.
[ "Scan", "for", "a", "query", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/h3/io/InRawH3Impl.java#L415-L452
43,958
baratine/baratine
web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java
EnvironmentLogger.setParent
@Override public void setParent(Logger parent) { if (parent.equals(_parent)) return; super.setParent(parent); if (parent instanceof EnvironmentLogger) { _parent = (EnvironmentLogger) parent; _parent.addChild(this); } updateEffectiveLevel(_systemClassLoader); }
java
@Override public void setParent(Logger parent) { if (parent.equals(_parent)) return; super.setParent(parent); if (parent instanceof EnvironmentLogger) { _parent = (EnvironmentLogger) parent; _parent.addChild(this); } updateEffectiveLevel(_systemClassLoader); }
[ "@", "Override", "public", "void", "setParent", "(", "Logger", "parent", ")", "{", "if", "(", "parent", ".", "equals", "(", "_parent", ")", ")", "return", ";", "super", ".", "setParent", "(", "parent", ")", ";", "if", "(", "parent", "instanceof", "Envi...
Sets the logger's parent. This should only be called by the LogManager code.
[ "Sets", "the", "logger", "s", "parent", ".", "This", "should", "only", "be", "called", "by", "the", "LogManager", "code", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java#L104-L119
43,959
baratine/baratine
web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java
EnvironmentLogger.getLevel
@Override public Level getLevel() { if (_localLevel != null) { Level level = _localLevel.get(); if (level != null) { return level; } } return _systemLevel; }
java
@Override public Level getLevel() { if (_localLevel != null) { Level level = _localLevel.get(); if (level != null) { return level; } } return _systemLevel; }
[ "@", "Override", "public", "Level", "getLevel", "(", ")", "{", "if", "(", "_localLevel", "!=", "null", ")", "{", "Level", "level", "=", "_localLevel", ".", "get", "(", ")", ";", "if", "(", "level", "!=", "null", ")", "{", "return", "level", ";", "}...
Returns the logger's assigned level.
[ "Returns", "the", "logger", "s", "assigned", "level", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java#L128-L140
43,960
baratine/baratine
web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java
EnvironmentLogger.setLevel
@Override public void setLevel(Level level) { ClassLoader loader = Thread.currentThread().getContextClassLoader(); if (loader == null) { loader = _systemClassLoader; } if (loader != _systemClassLoader) { if (_localLevel == null) _localLevel = new EnvironmentLocal<Level>(); ...
java
@Override public void setLevel(Level level) { ClassLoader loader = Thread.currentThread().getContextClassLoader(); if (loader == null) { loader = _systemClassLoader; } if (loader != _systemClassLoader) { if (_localLevel == null) _localLevel = new EnvironmentLocal<Level>(); ...
[ "@", "Override", "public", "void", "setLevel", "(", "Level", "level", ")", "{", "ClassLoader", "loader", "=", "Thread", ".", "currentThread", "(", ")", ".", "getContextClassLoader", "(", ")", ";", "if", "(", "loader", "==", "null", ")", "{", "loader", "=...
Application API to set the level. @param level the logging level to set for the logger.
[ "Application", "API", "to", "set", "the", "level", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java#L147-L171
43,961
baratine/baratine
web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java
EnvironmentLogger.getHandlers
@Override public Handler []getHandlers() { Handler []handlers = _localHandlers.get(); if (handlers != null) return handlers; else return EMPTY_HANDLERS; }
java
@Override public Handler []getHandlers() { Handler []handlers = _localHandlers.get(); if (handlers != null) return handlers; else return EMPTY_HANDLERS; }
[ "@", "Override", "public", "Handler", "[", "]", "getHandlers", "(", ")", "{", "Handler", "[", "]", "handlers", "=", "_localHandlers", ".", "get", "(", ")", ";", "if", "(", "handlers", "!=", "null", ")", "return", "handlers", ";", "else", "return", "EMP...
Returns the handlers.
[ "Returns", "the", "handlers", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java#L180-L189
43,962
baratine/baratine
web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java
EnvironmentLogger.removeHandler
@Override public void removeHandler(Handler handler) { synchronized (this) { ClassLoader loader = Thread.currentThread().getContextClassLoader(); if (loader == null) { loader = _systemClassLoader; } for (int i = _loaders.size() - 1; i >= 0; i--) { WeakReference<Cl...
java
@Override public void removeHandler(Handler handler) { synchronized (this) { ClassLoader loader = Thread.currentThread().getContextClassLoader(); if (loader == null) { loader = _systemClassLoader; } for (int i = _loaders.size() - 1; i >= 0; i--) { WeakReference<Cl...
[ "@", "Override", "public", "void", "removeHandler", "(", "Handler", "handler", ")", "{", "synchronized", "(", "this", ")", "{", "ClassLoader", "loader", "=", "Thread", ".", "currentThread", "(", ")", ".", "getContextClassLoader", "(", ")", ";", "if", "(", ...
Removes a handler.
[ "Removes", "a", "handler", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java#L238-L265
43,963
baratine/baratine
web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java
EnvironmentLogger.isLoggable
@Override public final boolean isLoggable(Level level) { if (level == null) return false; int intValue = level.intValue(); if (intValue < _finestEffectiveLevelValue) return false; else if (! _hasLocalEffectiveLevel) { return true; } else { Integer localValue = _...
java
@Override public final boolean isLoggable(Level level) { if (level == null) return false; int intValue = level.intValue(); if (intValue < _finestEffectiveLevelValue) return false; else if (! _hasLocalEffectiveLevel) { return true; } else { Integer localValue = _...
[ "@", "Override", "public", "final", "boolean", "isLoggable", "(", "Level", "level", ")", "{", "if", "(", "level", "==", "null", ")", "return", "false", ";", "int", "intValue", "=", "level", ".", "intValue", "(", ")", ";", "if", "(", "intValue", "<", ...
True if the level is loggable
[ "True", "if", "the", "level", "is", "loggable" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java#L274-L305
43,964
baratine/baratine
web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java
EnvironmentLogger.getUseParentHandlers
@Override public boolean getUseParentHandlers() { Boolean value = _useParentHandlers.get(); if (value != null) return Boolean.TRUE.equals(value); else return true; }
java
@Override public boolean getUseParentHandlers() { Boolean value = _useParentHandlers.get(); if (value != null) return Boolean.TRUE.equals(value); else return true; }
[ "@", "Override", "public", "boolean", "getUseParentHandlers", "(", ")", "{", "Boolean", "value", "=", "_useParentHandlers", ".", "get", "(", ")", ";", "if", "(", "value", "!=", "null", ")", "return", "Boolean", ".", "TRUE", ".", "equals", "(", "value", "...
Returns the use-parent-handlers
[ "Returns", "the", "use", "-", "parent", "-", "handlers" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java#L310-L319
43,965
baratine/baratine
web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java
EnvironmentLogger.log
@Override public void log(LogRecord record) { if (record == null) return; Level recordLevel = record.getLevel(); if (! isLoggable(recordLevel)) return; for (Logger ptr = this; ptr != null; ptr = ptr.getParent()) { Handler handlers[] = ptr.getHandlers(); if (handle...
java
@Override public void log(LogRecord record) { if (record == null) return; Level recordLevel = record.getLevel(); if (! isLoggable(recordLevel)) return; for (Logger ptr = this; ptr != null; ptr = ptr.getParent()) { Handler handlers[] = ptr.getHandlers(); if (handle...
[ "@", "Override", "public", "void", "log", "(", "LogRecord", "record", ")", "{", "if", "(", "record", "==", "null", ")", "return", ";", "Level", "recordLevel", "=", "record", ".", "getLevel", "(", ")", ";", "if", "(", "!", "isLoggable", "(", "recordLeve...
Logs the message.
[ "Logs", "the", "message", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java#L333-L356
43,966
baratine/baratine
web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java
EnvironmentLogger.addHandler
private void addHandler(Handler handler, ClassLoader loader) { // handlers ordered by level ArrayList<Handler> handlers = new ArrayList<Handler>(); handlers.add(handler); for (ClassLoader ptr = loader; ptr != null; ptr = ptr.getParent()) { Handler []localHandlers = _localHandlers.getLevel(ptr)...
java
private void addHandler(Handler handler, ClassLoader loader) { // handlers ordered by level ArrayList<Handler> handlers = new ArrayList<Handler>(); handlers.add(handler); for (ClassLoader ptr = loader; ptr != null; ptr = ptr.getParent()) { Handler []localHandlers = _localHandlers.getLevel(ptr)...
[ "private", "void", "addHandler", "(", "Handler", "handler", ",", "ClassLoader", "loader", ")", "{", "// handlers ordered by level", "ArrayList", "<", "Handler", ">", "handlers", "=", "new", "ArrayList", "<", "Handler", ">", "(", ")", ";", "handlers", ".", "add...
Adds a new handler with a given classloader context.
[ "Adds", "a", "new", "handler", "with", "a", "given", "classloader", "context", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java#L375-L411
43,967
baratine/baratine
web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java
EnvironmentLogger.isParentLoader
private boolean isParentLoader(ClassLoader parent, ClassLoader child) { for (; child != null; child = child.getParent()) { if (child == parent) return true; } return false; }
java
private boolean isParentLoader(ClassLoader parent, ClassLoader child) { for (; child != null; child = child.getParent()) { if (child == parent) return true; } return false; }
[ "private", "boolean", "isParentLoader", "(", "ClassLoader", "parent", ",", "ClassLoader", "child", ")", "{", "for", "(", ";", "child", "!=", "null", ";", "child", "=", "child", ".", "getParent", "(", ")", ")", "{", "if", "(", "child", "==", "parent", "...
Returns true if 'parent' is a parent classloader of 'child'. @param parent the classloader to test as a parent. @param child the classloader to test as a child.
[ "Returns", "true", "if", "parent", "is", "a", "parent", "classloader", "of", "child", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java#L453-L461
43,968
baratine/baratine
web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java
EnvironmentLogger.addCustomLogger
public boolean addCustomLogger(Logger logger) { if (logger.getClass().getName().startsWith("java")) return false; Logger oldLogger = _localLoggers.get(); if (oldLogger != null) return false; _localLoggers.set(logger); if (_parent != null) { logger.setParent(_parent); ...
java
public boolean addCustomLogger(Logger logger) { if (logger.getClass().getName().startsWith("java")) return false; Logger oldLogger = _localLoggers.get(); if (oldLogger != null) return false; _localLoggers.set(logger); if (_parent != null) { logger.setParent(_parent); ...
[ "public", "boolean", "addCustomLogger", "(", "Logger", "logger", ")", "{", "if", "(", "logger", ".", "getClass", "(", ")", ".", "getName", "(", ")", ".", "startsWith", "(", "\"java\"", ")", ")", "return", "false", ";", "Logger", "oldLogger", "=", "_local...
Sets a custom logger if possible
[ "Sets", "a", "custom", "logger", "if", "possible" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java#L466-L483
43,969
baratine/baratine
web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java
EnvironmentLogger.addLoader
private void addLoader(ClassLoader loader) { for (int i = _loaders.size() - 1; i >= 0; i--) { WeakReference<ClassLoader> ref = _loaders.get(i); ClassLoader refLoader = ref.get(); if (refLoader == null) _loaders.remove(i); if (refLoader == loader) return; } _loade...
java
private void addLoader(ClassLoader loader) { for (int i = _loaders.size() - 1; i >= 0; i--) { WeakReference<ClassLoader> ref = _loaders.get(i); ClassLoader refLoader = ref.get(); if (refLoader == null) _loaders.remove(i); if (refLoader == loader) return; } _loade...
[ "private", "void", "addLoader", "(", "ClassLoader", "loader", ")", "{", "for", "(", "int", "i", "=", "_loaders", ".", "size", "(", ")", "-", "1", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "WeakReference", "<", "ClassLoader", ">", "ref", "=", ...
Adds a class loader to the list of dependency loaders.
[ "Adds", "a", "class", "loader", "to", "the", "list", "of", "dependency", "loaders", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java#L496-L511
43,970
baratine/baratine
web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java
EnvironmentLogger.updateEffectiveLevel
private synchronized void updateEffectiveLevel(ClassLoader loader) { if (loader == null) loader = _systemClassLoader; int oldEffectiveLevel = getEffectiveLevel(loader); Level newEffectiveLevel = calculateEffectiveLevel(loader); /* if (loader == _systemClassLoader) { _finestEffec...
java
private synchronized void updateEffectiveLevel(ClassLoader loader) { if (loader == null) loader = _systemClassLoader; int oldEffectiveLevel = getEffectiveLevel(loader); Level newEffectiveLevel = calculateEffectiveLevel(loader); /* if (loader == _systemClassLoader) { _finestEffec...
[ "private", "synchronized", "void", "updateEffectiveLevel", "(", "ClassLoader", "loader", ")", "{", "if", "(", "loader", "==", "null", ")", "loader", "=", "_systemClassLoader", ";", "int", "oldEffectiveLevel", "=", "getEffectiveLevel", "(", "loader", ")", ";", "L...
Recalculate the dynamic assigned levels.
[ "Recalculate", "the", "dynamic", "assigned", "levels", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java#L534-L575
43,971
baratine/baratine
web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java
EnvironmentLogger.getFinestLevel
private Level getFinestLevel() { Level level; if (_parent == null) level = Level.INFO; else if (_parent.isLocalLevel()) level = selectFinestLevel(_systemLevel, _parent.getFinestLevel()); else if (_systemLevel != null) level = _systemLevel; else level = _parent.getFines...
java
private Level getFinestLevel() { Level level; if (_parent == null) level = Level.INFO; else if (_parent.isLocalLevel()) level = selectFinestLevel(_systemLevel, _parent.getFinestLevel()); else if (_systemLevel != null) level = _systemLevel; else level = _parent.getFines...
[ "private", "Level", "getFinestLevel", "(", ")", "{", "Level", "level", ";", "if", "(", "_parent", "==", "null", ")", "level", "=", "Level", ".", "INFO", ";", "else", "if", "(", "_parent", ".", "isLocalLevel", "(", ")", ")", "level", "=", "selectFinestL...
Returns the finest assigned level for any classloader environment.
[ "Returns", "the", "finest", "assigned", "level", "for", "any", "classloader", "environment", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java#L689-L716
43,972
baratine/baratine
web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java
EnvironmentLogger.selectFinestLevel
private Level selectFinestLevel(Level a, Level b) { if (a == null) return b; else if (b == null) return a; else if (b.intValue() < a.intValue()) return b; else return a; }
java
private Level selectFinestLevel(Level a, Level b) { if (a == null) return b; else if (b == null) return a; else if (b.intValue() < a.intValue()) return b; else return a; }
[ "private", "Level", "selectFinestLevel", "(", "Level", "a", ",", "Level", "b", ")", "{", "if", "(", "a", "==", "null", ")", "return", "b", ";", "else", "if", "(", "b", "==", "null", ")", "return", "a", ";", "else", "if", "(", "b", ".", "intValue"...
Returns the finest of the two levels.
[ "Returns", "the", "finest", "of", "the", "two", "levels", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java#L731-L741
43,973
baratine/baratine
web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java
EnvironmentLogger.getAssignedLevel
private Level getAssignedLevel(ClassLoader loader) { Level level = null; if (_localLevel != null) { return _localLevel.get(loader); } return null; }
java
private Level getAssignedLevel(ClassLoader loader) { Level level = null; if (_localLevel != null) { return _localLevel.get(loader); } return null; }
[ "private", "Level", "getAssignedLevel", "(", "ClassLoader", "loader", ")", "{", "Level", "level", "=", "null", ";", "if", "(", "_localLevel", "!=", "null", ")", "{", "return", "_localLevel", ".", "get", "(", "loader", ")", ";", "}", "return", "null", ";"...
Returns the most specific assigned level for the given classloader, i.e. children override parents.
[ "Returns", "the", "most", "specific", "assigned", "level", "for", "the", "given", "classloader", "i", ".", "e", ".", "children", "override", "parents", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java#L747-L756
43,974
baratine/baratine
web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java
EnvironmentLogger.removeLoader
private synchronized void removeLoader(ClassLoader loader) { int i; for (i = _loaders.size() - 1; i >= 0; i--) { WeakReference<ClassLoader> ref = _loaders.get(i); ClassLoader refLoader = ref.get(); if (refLoader == null) _loaders.remove(i); else if (refLoader == loader) ...
java
private synchronized void removeLoader(ClassLoader loader) { int i; for (i = _loaders.size() - 1; i >= 0; i--) { WeakReference<ClassLoader> ref = _loaders.get(i); ClassLoader refLoader = ref.get(); if (refLoader == null) _loaders.remove(i); else if (refLoader == loader) ...
[ "private", "synchronized", "void", "removeLoader", "(", "ClassLoader", "loader", ")", "{", "int", "i", ";", "for", "(", "i", "=", "_loaders", ".", "size", "(", ")", "-", "1", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "WeakReference", "<", "Cla...
Removes the specified loader.
[ "Removes", "the", "specified", "loader", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java#L794-L806
43,975
baratine/baratine
web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java
EnvironmentLogger.classLoaderDestroy
@Override public void classLoaderDestroy(DynamicClassLoader loader) { removeLoader(loader); _localHandlers.remove(loader); HandlerEntry ownHandlers = _ownHandlers.getLevel(loader); if (ownHandlers != null) _ownHandlers.remove(loader); if (ownHandlers != null) ownHandlers.destroy()...
java
@Override public void classLoaderDestroy(DynamicClassLoader loader) { removeLoader(loader); _localHandlers.remove(loader); HandlerEntry ownHandlers = _ownHandlers.getLevel(loader); if (ownHandlers != null) _ownHandlers.remove(loader); if (ownHandlers != null) ownHandlers.destroy()...
[ "@", "Override", "public", "void", "classLoaderDestroy", "(", "DynamicClassLoader", "loader", ")", "{", "removeLoader", "(", "loader", ")", ";", "_localHandlers", ".", "remove", "(", "loader", ")", ";", "HandlerEntry", "ownHandlers", "=", "_ownHandlers", ".", "g...
Classloader destroy callback
[ "Classloader", "destroy", "callback" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java#L818-L836
43,976
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/TempCharReader.java
TempCharReader.init
public void init(TempCharBuffer head) { _top = head; _head = head; if (head != null) { _buffer = head.buffer(); _length = head.getLength(); } else _length = 0; _offset = 0; }
java
public void init(TempCharBuffer head) { _top = head; _head = head; if (head != null) { _buffer = head.buffer(); _length = head.getLength(); } else _length = 0; _offset = 0; }
[ "public", "void", "init", "(", "TempCharBuffer", "head", ")", "{", "_top", "=", "head", ";", "_head", "=", "head", ";", "if", "(", "head", "!=", "null", ")", "{", "_buffer", "=", "head", ".", "buffer", "(", ")", ";", "_length", "=", "head", ".", ...
Initialize the reader.
[ "Initialize", "the", "reader", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/TempCharReader.java#L70-L83
43,977
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/TempCharReader.java
TempCharReader.close
public void close() { if (_isFree) TempCharBuffer.freeAll(_head); _head = null; _buffer = null; _offset = 0; _length = 0; }
java
public void close() { if (_isFree) TempCharBuffer.freeAll(_head); _head = null; _buffer = null; _offset = 0; _length = 0; }
[ "public", "void", "close", "(", ")", "{", "if", "(", "_isFree", ")", "TempCharBuffer", ".", "freeAll", "(", "_head", ")", ";", "_head", "=", "null", ";", "_buffer", "=", "null", ";", "_offset", "=", "0", ";", "_length", "=", "0", ";", "}" ]
Closes the reader.
[ "Closes", "the", "reader", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/TempCharReader.java#L176-L185
43,978
baratine/baratine
core/src/main/java/com/caucho/v5/amp/service/ValidatorVault.java
ValidatorVault.createValidation
private void createValidation(Class<?> vaultClass, Class<?> assetClass, Class<?> idClass) { for (Method method : vaultClass.getMethods()) { if (! method.getName().startsWith("create")) { continue; } if (! Modifier.is...
java
private void createValidation(Class<?> vaultClass, Class<?> assetClass, Class<?> idClass) { for (Method method : vaultClass.getMethods()) { if (! method.getName().startsWith("create")) { continue; } if (! Modifier.is...
[ "private", "void", "createValidation", "(", "Class", "<", "?", ">", "vaultClass", ",", "Class", "<", "?", ">", "assetClass", ",", "Class", "<", "?", ">", "idClass", ")", "{", "for", "(", "Method", "method", ":", "vaultClass", ".", "getMethods", "(", ")...
Validate the create methods.
[ "Validate", "the", "create", "methods", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/amp/service/ValidatorVault.java#L116-L157
43,979
baratine/baratine
core/src/main/java/com/caucho/v5/amp/service/ValidatorVault.java
ValidatorVault.findValidation
private void findValidation(Class<?> vaultClass, Class<?> assetClass, Class<?> idClass) { for (Method method : vaultClass.getMethods()) { if (! method.getName().startsWith("find")) { continue; } if (! Modifier.isAbst...
java
private void findValidation(Class<?> vaultClass, Class<?> assetClass, Class<?> idClass) { for (Method method : vaultClass.getMethods()) { if (! method.getName().startsWith("find")) { continue; } if (! Modifier.isAbst...
[ "private", "void", "findValidation", "(", "Class", "<", "?", ">", "vaultClass", ",", "Class", "<", "?", ">", "assetClass", ",", "Class", "<", "?", ">", "idClass", ")", "{", "for", "(", "Method", "method", ":", "vaultClass", ".", "getMethods", "(", ")",...
Validate the find methods.
[ "Validate", "the", "find", "methods", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/amp/service/ValidatorVault.java#L162-L202
43,980
baratine/baratine
web/src/main/java/com/caucho/v5/deploy2/Strategy2StartManualRedeployManual.java
Strategy2StartManualRedeployManual.startOnInit
@Override public void startOnInit(DeployService2Impl<I> deploy, Result<I> result) { deploy.startImpl(result); }
java
@Override public void startOnInit(DeployService2Impl<I> deploy, Result<I> result) { deploy.startImpl(result); }
[ "@", "Override", "public", "void", "startOnInit", "(", "DeployService2Impl", "<", "I", ">", "deploy", ",", "Result", "<", "I", ">", "result", ")", "{", "deploy", ".", "startImpl", "(", "result", ")", ";", "}" ]
Called at initialization time for automatic start. @param deploy the owning controller
[ "Called", "at", "initialization", "time", "for", "automatic", "start", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/deploy2/Strategy2StartManualRedeployManual.java#L83-L87
43,981
baratine/baratine
web/src/main/java/com/caucho/v5/deploy2/Strategy2StartManualRedeployManual.java
Strategy2StartManualRedeployManual.update
@Override public void update(DeployService2Impl<I> deploy, Result<I> result) { LifecycleState state = deploy.getState(); if (state.isStopped()) { deploy.startImpl(result); } else if (state.isError()) { deploy.restartImpl(result); } else if (deploy.isModifiedNow()) { de...
java
@Override public void update(DeployService2Impl<I> deploy, Result<I> result) { LifecycleState state = deploy.getState(); if (state.isStopped()) { deploy.startImpl(result); } else if (state.isError()) { deploy.restartImpl(result); } else if (deploy.isModifiedNow()) { de...
[ "@", "Override", "public", "void", "update", "(", "DeployService2Impl", "<", "I", ">", "deploy", ",", "Result", "<", "I", ">", "result", ")", "{", "LifecycleState", "state", "=", "deploy", ".", "getState", "(", ")", ";", "if", "(", "state", ".", "isSto...
Checks for updates from an admin command. The target state will be the initial state, i.e. update will not start a lazy instance. @param deploy the owning controller
[ "Checks", "for", "updates", "from", "an", "admin", "command", ".", "The", "target", "state", "will", "be", "the", "initial", "state", "i", ".", "e", ".", "update", "will", "not", "start", "a", "lazy", "instance", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/deploy2/Strategy2StartManualRedeployManual.java#L95-L112
43,982
baratine/baratine
web/src/main/java/com/caucho/v5/deploy2/Strategy2StartManualRedeployManual.java
Strategy2StartManualRedeployManual.request
@Override public void request(DeployService2Impl<I> deploy, Result<I> result) { result.ok(deploy.get()); }
java
@Override public void request(DeployService2Impl<I> deploy, Result<I> result) { result.ok(deploy.get()); }
[ "@", "Override", "public", "void", "request", "(", "DeployService2Impl", "<", "I", ">", "deploy", ",", "Result", "<", "I", ">", "result", ")", "{", "result", ".", "ok", "(", "deploy", ".", "get", "(", ")", ")", ";", "}" ]
Returns the current instance. This strategy does not lazily restart the instance. @param deploy the owning controller @return the current deploy instance
[ "Returns", "the", "current", "instance", ".", "This", "strategy", "does", "not", "lazily", "restart", "the", "instance", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/deploy2/Strategy2StartManualRedeployManual.java#L122-L127
43,983
baratine/baratine
kraken/src/main/java/com/caucho/v5/kraken/table/TableKraken.java
TableKraken.getPodHash
public static int getPodHash(String key) { byte []buffer = new byte[16]; int sublen = Math.min(key.length(), 8); for (int i = 0; i < sublen; i++) { buffer[i] = (byte) key.charAt(i); } long hash = Murmur64.generate(Murmur64.SEED, key); BitsUtil.writeLong(buffer, 8, has...
java
public static int getPodHash(String key) { byte []buffer = new byte[16]; int sublen = Math.min(key.length(), 8); for (int i = 0; i < sublen; i++) { buffer[i] = (byte) key.charAt(i); } long hash = Murmur64.generate(Murmur64.SEED, key); BitsUtil.writeLong(buffer, 8, has...
[ "public", "static", "int", "getPodHash", "(", "String", "key", ")", "{", "byte", "[", "]", "buffer", "=", "new", "byte", "[", "16", "]", ";", "int", "sublen", "=", "Math", ".", "min", "(", "key", ".", "length", "(", ")", ",", "8", ")", ";", "fo...
Convenience for calculating the pod hash for a string.
[ "Convenience", "for", "calculating", "the", "pod", "hash", "for", "a", "string", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kraken/table/TableKraken.java#L215-L230
43,984
baratine/baratine
kraken/src/main/java/com/caucho/v5/kraken/table/TableKraken.java
TableKraken.get
public void get(RowCursor cursor, Result<Boolean> result) { TablePod tablePod = getTablePod(); int hash = getPodHash(cursor); if (tablePod.getNode(hash).isSelfCopy()) { _tableKelp.getDirect(cursor, result); } else { getTablePod().get(cursor.getKey(), r...
java
public void get(RowCursor cursor, Result<Boolean> result) { TablePod tablePod = getTablePod(); int hash = getPodHash(cursor); if (tablePod.getNode(hash).isSelfCopy()) { _tableKelp.getDirect(cursor, result); } else { getTablePod().get(cursor.getKey(), r...
[ "public", "void", "get", "(", "RowCursor", "cursor", ",", "Result", "<", "Boolean", ">", "result", ")", "{", "TablePod", "tablePod", "=", "getTablePod", "(", ")", ";", "int", "hash", "=", "getPodHash", "(", "cursor", ")", ";", "if", "(", "tablePod", "....
Gets a row from the table when the primary key is known. @param cursor the request cursor containing the key @param result return true when the row exists.
[ "Gets", "a", "row", "from", "the", "table", "when", "the", "primary", "key", "is", "known", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kraken/table/TableKraken.java#L420-L433
43,985
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/InContentLength.java
InContentLength.read
@Override public int read(byte []buffer, int offset, int length) throws IOException { try { if (_length < length) length = (int) _length; if (length <= 0) return -1; int len = _next.read(buffer, offset, length); if (len > 0) { _length -= len; } else { ...
java
@Override public int read(byte []buffer, int offset, int length) throws IOException { try { if (_length < length) length = (int) _length; if (length <= 0) return -1; int len = _next.read(buffer, offset, length); if (len > 0) { _length -= len; } else { ...
[ "@", "Override", "public", "int", "read", "(", "byte", "[", "]", "buffer", ",", "int", "offset", ",", "int", "length", ")", "throws", "IOException", "{", "try", "{", "if", "(", "_length", "<", "length", ")", "length", "=", "(", "int", ")", "_length",...
Reads from the buffer, limiting to the content length. @param buffer the buffer containing the results. @param offset the offset into the result buffer @param length the length of the buffer. @return the number of bytes read or -1 for the end of the file.
[ "Reads", "from", "the", "buffer", "limiting", "to", "the", "content", "length", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/InContentLength.java#L92-L116
43,986
baratine/baratine
web/src/main/java/com/caucho/v5/log/PatternFormatter.java
PatternFormatter.format
@Override public String format(LogRecord log) { StringBuilder sb = new StringBuilder(); int mark = 0; for (FormatItem item : _formatList) { item.format(sb, log, mark); if (item instanceof PrettyPrintMarkItem) { mark = sb.length(); } } return sb.toStrin...
java
@Override public String format(LogRecord log) { StringBuilder sb = new StringBuilder(); int mark = 0; for (FormatItem item : _formatList) { item.format(sb, log, mark); if (item instanceof PrettyPrintMarkItem) { mark = sb.length(); } } return sb.toStrin...
[ "@", "Override", "public", "String", "format", "(", "LogRecord", "log", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "int", "mark", "=", "0", ";", "for", "(", "FormatItem", "item", ":", "_formatList", ")", "{", "item", "...
Formats the record
[ "Formats", "the", "record" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/PatternFormatter.java#L105-L121
43,987
baratine/baratine
core/src/main/java/com/caucho/v5/amp/stream/StreamBuilderImpl.java
StreamBuilderImpl.reduce
@Override public StreamBuilderImpl<T,U> reduce(T init, BinaryOperatorSync<T> op) { return new ReduceOpInitSync<>(this, init, op); }
java
@Override public StreamBuilderImpl<T,U> reduce(T init, BinaryOperatorSync<T> op) { return new ReduceOpInitSync<>(this, init, op); }
[ "@", "Override", "public", "StreamBuilderImpl", "<", "T", ",", "U", ">", "reduce", "(", "T", "init", ",", "BinaryOperatorSync", "<", "T", ">", "op", ")", "{", "return", "new", "ReduceOpInitSync", "<>", "(", "this", ",", "init", ",", "op", ")", ";", "...
Reduce with a binary function <code><pre> s = init; s = op(s, t1); s = op(s, t2); result = s; </pre></code>
[ "Reduce", "with", "a", "binary", "function" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/amp/stream/StreamBuilderImpl.java#L214-L219
43,988
baratine/baratine
core/src/main/java/com/caucho/v5/amp/stream/StreamBuilderImpl.java
StreamBuilderImpl.reduce
@Override public <R> StreamBuilderImpl<R,U> reduce(R identity, BiFunctionSync<R, ? super T, R> accumulator, BinaryOperatorSync<R> combiner) { return new ReduceAccumSync<>(this, identity, accumulator, combiner); }
java
@Override public <R> StreamBuilderImpl<R,U> reduce(R identity, BiFunctionSync<R, ? super T, R> accumulator, BinaryOperatorSync<R> combiner) { return new ReduceAccumSync<>(this, identity, accumulator, combiner); }
[ "@", "Override", "public", "<", "R", ">", "StreamBuilderImpl", "<", "R", ",", "U", ">", "reduce", "(", "R", "identity", ",", "BiFunctionSync", "<", "R", ",", "?", "super", "T", ",", "R", ">", "accumulator", ",", "BinaryOperatorSync", "<", "R", ">", "...
Reduce with an accumulator and combiner
[ "Reduce", "with", "an", "accumulator", "and", "combiner" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/amp/stream/StreamBuilderImpl.java#L240-L247
43,989
baratine/baratine
core/src/main/java/com/caucho/v5/loader/DependencyContainer.java
DependencyContainer.setModified
public void setModified(boolean isModified) { _isModified = isModified; if (_isModified) _checkExpiresTime = Long.MAX_VALUE / 2; else _checkExpiresTime = CurrentTime.currentTime() + _checkInterval; if (! isModified) _isModifiedLog = false; }
java
public void setModified(boolean isModified) { _isModified = isModified; if (_isModified) _checkExpiresTime = Long.MAX_VALUE / 2; else _checkExpiresTime = CurrentTime.currentTime() + _checkInterval; if (! isModified) _isModifiedLog = false; }
[ "public", "void", "setModified", "(", "boolean", "isModified", ")", "{", "_isModified", "=", "isModified", ";", "if", "(", "_isModified", ")", "_checkExpiresTime", "=", "Long", ".", "MAX_VALUE", "/", "2", ";", "else", "_checkExpiresTime", "=", "CurrentTime", "...
Sets the modified.
[ "Sets", "the", "modified", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/loader/DependencyContainer.java#L195-L206
43,990
baratine/baratine
web/src/main/java/com/caucho/v5/web/builder/IncludeWebClass.java
IncludeWebClass.buildWebService
private static ServiceWeb buildWebService(WebBuilder builder, Function<RequestWeb,Object> beanFactory, Method method) { Parameter []params = method.getParameters(); WebParam []webParam = new WebParam[params.length]; for (int i = 0; i < params.length; i++) { we...
java
private static ServiceWeb buildWebService(WebBuilder builder, Function<RequestWeb,Object> beanFactory, Method method) { Parameter []params = method.getParameters(); WebParam []webParam = new WebParam[params.length]; for (int i = 0; i < params.length; i++) { we...
[ "private", "static", "ServiceWeb", "buildWebService", "(", "WebBuilder", "builder", ",", "Function", "<", "RequestWeb", ",", "Object", ">", "beanFactory", ",", "Method", "method", ")", "{", "Parameter", "[", "]", "params", "=", "method", ".", "getParameters", ...
Builds a HTTP service from a method. <pre><code> &#64;Get void myMethod(&64;Query("id") id, Result&lt;String&gt; result); </code></pre> Method parameters are filled from the request. @param builder called to create the service @param beanFactory factory for the bean instance @param method method for the service
[ "Builds", "a", "HTTP", "service", "from", "a", "method", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/web/builder/IncludeWebClass.java#L402-L416
43,991
baratine/baratine
web/src/main/java/com/caucho/v5/io/MultipartStream.java
MultipartStream.getAttribute
public String getAttribute(String key) { List<String> values = _headers.get(key.toLowerCase(Locale.ENGLISH)); if (values != null && values.size() > 0) return values.get(0); return null; }
java
public String getAttribute(String key) { List<String> values = _headers.get(key.toLowerCase(Locale.ENGLISH)); if (values != null && values.size() > 0) return values.get(0); return null; }
[ "public", "String", "getAttribute", "(", "String", "key", ")", "{", "List", "<", "String", ">", "values", "=", "_headers", ".", "get", "(", "key", ".", "toLowerCase", "(", "Locale", ".", "ENGLISH", ")", ")", ";", "if", "(", "values", "!=", "null", "&...
Returns a read attribute from the multipart mime.
[ "Returns", "a", "read", "attribute", "from", "the", "multipart", "mime", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/io/MultipartStream.java#L196-L204
43,992
baratine/baratine
web/src/main/java/com/caucho/v5/io/MultipartStream.java
MultipartStream.getAvailable
public int getAvailable() throws IOException { if (_isPartDone) return 0; else if (_peekOffset < _peekLength) return _peekLength - _peekOffset; else { int ch = read(); if (ch < 0) return 0; _peekOffset = 0; _peekLength = 1; _peek[0] = (byte) ch; ...
java
public int getAvailable() throws IOException { if (_isPartDone) return 0; else if (_peekOffset < _peekLength) return _peekLength - _peekOffset; else { int ch = read(); if (ch < 0) return 0; _peekOffset = 0; _peekLength = 1; _peek[0] = (byte) ch; ...
[ "public", "int", "getAvailable", "(", ")", "throws", "IOException", "{", "if", "(", "_isPartDone", ")", "return", "0", ";", "else", "if", "(", "_peekOffset", "<", "_peekLength", ")", "return", "_peekLength", "-", "_peekOffset", ";", "else", "{", "int", "ch...
Returns the number of available bytes.
[ "Returns", "the", "number", "of", "available", "bytes", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/io/MultipartStream.java#L291-L308
43,993
baratine/baratine
web/src/main/java/com/caucho/v5/io/MultipartStream.java
MultipartStream.read
@Override public int read(byte[] buffer, int offset, int length) throws IOException { int b = -1; if (_isPartDone) return -1; int i = 0; // Need the last peek or would miss the initial '\n' while (_peekOffset + 1 < _peekLength && length > 0) { buffer[offset + i++] = _peek[_peekOffs...
java
@Override public int read(byte[] buffer, int offset, int length) throws IOException { int b = -1; if (_isPartDone) return -1; int i = 0; // Need the last peek or would miss the initial '\n' while (_peekOffset + 1 < _peekLength && length > 0) { buffer[offset + i++] = _peek[_peekOffs...
[ "@", "Override", "public", "int", "read", "(", "byte", "[", "]", "buffer", ",", "int", "offset", ",", "int", "length", ")", "throws", "IOException", "{", "int", "b", "=", "-", "1", ";", "if", "(", "_isPartDone", ")", "return", "-", "1", ";", "int",...
Reads from the multipart mime buffer.
[ "Reads", "from", "the", "multipart", "mime", "buffer", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/io/MultipartStream.java#L313-L408
43,994
baratine/baratine
core/src/main/java/com/caucho/v5/amp/service/ServiceBuilderImpl.java
ServiceBuilderImpl.ref
@Override public ServiceRefAmp ref() { if (_isForeign) { return null; } if (workers() > 1) { return buildWorkers(); } if (_worker != null) { return buildWorker(); } else { //throw new IllegalStateException(L.l("build() requires a worker or resource.")); ...
java
@Override public ServiceRefAmp ref() { if (_isForeign) { return null; } if (workers() > 1) { return buildWorkers(); } if (_worker != null) { return buildWorker(); } else { //throw new IllegalStateException(L.l("build() requires a worker or resource.")); ...
[ "@", "Override", "public", "ServiceRefAmp", "ref", "(", ")", "{", "if", "(", "_isForeign", ")", "{", "return", "null", ";", "}", "if", "(", "workers", "(", ")", ">", "1", ")", "{", "return", "buildWorkers", "(", ")", ";", "}", "if", "(", "_worker",...
Build the service and return the service ref.
[ "Build", "the", "service", "and", "return", "the", "service", "ref", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/amp/service/ServiceBuilderImpl.java#L758-L776
43,995
baratine/baratine
core/src/main/java/com/caucho/v5/amp/service/ServiceBuilderImpl.java
ServiceBuilderImpl.service
private ServiceRefAmp service(StubFactoryAmp stubFactory) { validateOpen(); Thread thread = Thread.currentThread(); ClassLoader oldLoader = thread.getContextClassLoader(); OutboxAmp outbox = OutboxAmp.current(); Object oldContext = null; try { thread.setContextClassLoader(_serv...
java
private ServiceRefAmp service(StubFactoryAmp stubFactory) { validateOpen(); Thread thread = Thread.currentThread(); ClassLoader oldLoader = thread.getContextClassLoader(); OutboxAmp outbox = OutboxAmp.current(); Object oldContext = null; try { thread.setContextClassLoader(_serv...
[ "private", "ServiceRefAmp", "service", "(", "StubFactoryAmp", "stubFactory", ")", "{", "validateOpen", "(", ")", ";", "Thread", "thread", "=", "Thread", ".", "currentThread", "(", ")", ";", "ClassLoader", "oldLoader", "=", "thread", ".", "getContextClassLoader", ...
Main service builder. Called from ServiceBuilder and ServiceRefBean.
[ "Main", "service", "builder", ".", "Called", "from", "ServiceBuilder", "and", "ServiceRefBean", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/amp/service/ServiceBuilderImpl.java#L943-L981
43,996
baratine/baratine
core/src/main/java/com/caucho/v5/amp/service/ServiceBuilderImpl.java
ServiceBuilderImpl.service
ServiceRefAmp service(QueueServiceFactoryInbox serviceFactory, ServiceConfig config) { QueueDeliverBuilderImpl<MessageAmp> queueBuilder = new QueueDeliverBuilderImpl<>(); //queueBuilder.setOutboxFactory(OutboxAmpFactory.newFactory()); queueBuilder.setClassLoader(_service...
java
ServiceRefAmp service(QueueServiceFactoryInbox serviceFactory, ServiceConfig config) { QueueDeliverBuilderImpl<MessageAmp> queueBuilder = new QueueDeliverBuilderImpl<>(); //queueBuilder.setOutboxFactory(OutboxAmpFactory.newFactory()); queueBuilder.setClassLoader(_service...
[ "ServiceRefAmp", "service", "(", "QueueServiceFactoryInbox", "serviceFactory", ",", "ServiceConfig", "config", ")", "{", "QueueDeliverBuilderImpl", "<", "MessageAmp", ">", "queueBuilder", "=", "new", "QueueDeliverBuilderImpl", "<>", "(", ")", ";", "//queueBuilder.setOutbo...
Used by journal builder.
[ "Used", "by", "journal", "builder", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/amp/service/ServiceBuilderImpl.java#L1101-L1119
43,997
baratine/baratine
kraken/src/main/java/com/caucho/v5/kraken/query/QueryParserKraken.java
QueryParserKraken.parse
public QueryBuilderKraken parse() { Token token = scanToken(); switch (token) { case CREATE: return parseCreate(); case EXPLAIN: return parseExplain(); case INSERT: return parseInsert(); case REPLACE: return parseReplace(); case SELECT: return...
java
public QueryBuilderKraken parse() { Token token = scanToken(); switch (token) { case CREATE: return parseCreate(); case EXPLAIN: return parseExplain(); case INSERT: return parseInsert(); case REPLACE: return parseReplace(); case SELECT: return...
[ "public", "QueryBuilderKraken", "parse", "(", ")", "{", "Token", "token", "=", "scanToken", "(", ")", ";", "switch", "(", "token", ")", "{", "case", "CREATE", ":", "return", "parseCreate", "(", ")", ";", "case", "EXPLAIN", ":", "return", "parseExplain", ...
Parses the query.
[ "Parses", "the", "query", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kraken/query/QueryParserKraken.java#L163-L222
43,998
baratine/baratine
kraken/src/main/java/com/caucho/v5/kraken/query/QueryParserKraken.java
QueryParserKraken.parseSelectExpr
private ExprKraken parseSelectExpr() { Token token = scanToken(); if (token == Token.STAR) { // return new UnboundStarExpr(); throw new UnsupportedOperationException(getClass().getName()); } else { _token = token; return parseExpr(); } }
java
private ExprKraken parseSelectExpr() { Token token = scanToken(); if (token == Token.STAR) { // return new UnboundStarExpr(); throw new UnsupportedOperationException(getClass().getName()); } else { _token = token; return parseExpr(); } }
[ "private", "ExprKraken", "parseSelectExpr", "(", ")", "{", "Token", "token", "=", "scanToken", "(", ")", ";", "if", "(", "token", "==", "Token", ".", "STAR", ")", "{", "// return new UnboundStarExpr();", "throw", "new", "UnsupportedOperationException", "(", "get...
Parses a select expression.
[ "Parses", "a", "select", "expression", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kraken/query/QueryParserKraken.java#L792-L806
43,999
baratine/baratine
kraken/src/main/java/com/caucho/v5/kraken/query/QueryParserKraken.java
QueryParserKraken.parseCreate
private QueryBuilderKraken parseCreate() { Token token; // TableBuilderKraken factory = null;// = _database.createTableFactory(); if ((token = scanToken()) != Token.TABLE) throw error("expected TABLE at '{0}'", token); if ((token = scanToken()) != Token.IDENTIFIER) throw error("expected...
java
private QueryBuilderKraken parseCreate() { Token token; // TableBuilderKraken factory = null;// = _database.createTableFactory(); if ((token = scanToken()) != Token.TABLE) throw error("expected TABLE at '{0}'", token); if ((token = scanToken()) != Token.IDENTIFIER) throw error("expected...
[ "private", "QueryBuilderKraken", "parseCreate", "(", ")", "{", "Token", "token", ";", "// TableBuilderKraken factory = null;// = _database.createTableFactory();", "if", "(", "(", "token", "=", "scanToken", "(", ")", ")", "!=", "Token", ".", "TABLE", ")", "throw", "e...
Parses the create.
[ "Parses", "the", "create", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kraken/query/QueryParserKraken.java#L984-L1108