repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
baratine/baratine
web/src/main/java/com/caucho/v5/web/webapp/MultiMapImpl.java
MultiMapImpl.containsKey
@Override public boolean containsKey(Object key) { if (key == null) { return false; } K []keys = _keys; for (int i = _size - 1 ; i >= 0; i--) { K testKey = keys[i]; if (key.equals(testKey)) { return true; } } return false; }
java
@Override public boolean containsKey(Object key) { if (key == null) { return false; } K []keys = _keys; for (int i = _size - 1 ; i >= 0; i--) { K testKey = keys[i]; if (key.equals(testKey)) { return true; } } return false; }
[ "@", "Override", "public", "boolean", "containsKey", "(", "Object", "key", ")", "{", "if", "(", "key", "==", "null", ")", "{", "return", "false", ";", "}", "K", "[", "]", "keys", "=", "_keys", ";", "for", "(", "int", "i", "=", "_size", "-", "1", ...
Returns true if the map contains the value.
[ "Returns", "true", "if", "the", "map", "contains", "the", "value", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/web/webapp/MultiMapImpl.java#L125-L143
train
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/OutHttpApp.java
OutHttpApp.start
public void start() { _state = _state.toStart(); _bufferCapacity = DEFAULT_SIZE; _tBuf = TempBuffer.create(); _buffer = _tBuf.buffer(); _startOffset = bufferStart(); _offset = _startOffset; _contentLength = 0; }
java
public void start() { _state = _state.toStart(); _bufferCapacity = DEFAULT_SIZE; _tBuf = TempBuffer.create(); _buffer = _tBuf.buffer(); _startOffset = bufferStart(); _offset = _startOffset; _contentLength = 0; }
[ "public", "void", "start", "(", ")", "{", "_state", "=", "_state", ".", "toStart", "(", ")", ";", "_bufferCapacity", "=", "DEFAULT_SIZE", ";", "_tBuf", "=", "TempBuffer", ".", "create", "(", ")", ";", "_buffer", "=", "_tBuf", ".", "buffer", "(", ")", ...
Starts the response stream.
[ "Starts", "the", "response", "stream", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/OutHttpApp.java#L132-L145
train
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/OutHttpApp.java
OutHttpApp.write
@Override public void write(int ch) throws IOException { if (isClosed() || isHead()) { return; } int offset = _offset; if (SIZE <= offset) { flushByteBuffer(); offset = _offset; } _buffer[offset++] = (byte) ch; _offset = offset; }
java
@Override public void write(int ch) throws IOException { if (isClosed() || isHead()) { return; } int offset = _offset; if (SIZE <= offset) { flushByteBuffer(); offset = _offset; } _buffer[offset++] = (byte) ch; _offset = offset; }
[ "@", "Override", "public", "void", "write", "(", "int", "ch", ")", "throws", "IOException", "{", "if", "(", "isClosed", "(", ")", "||", "isHead", "(", ")", ")", "{", "return", ";", "}", "int", "offset", "=", "_offset", ";", "if", "(", "SIZE", "<=",...
Writes a byte to the output.
[ "Writes", "a", "byte", "to", "the", "output", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/OutHttpApp.java#L193-L210
train
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/OutHttpApp.java
OutHttpApp.write
@Override public void write(byte []buffer, int offset, int length) { if (isClosed() || isHead()) { return; } int byteLength = _offset; while (true) { int sublen = Math.min(length, SIZE - byteLength); System.arraycopy(buffer, offset, _buffer, byteLength, sublen); offset...
java
@Override public void write(byte []buffer, int offset, int length) { if (isClosed() || isHead()) { return; } int byteLength = _offset; while (true) { int sublen = Math.min(length, SIZE - byteLength); System.arraycopy(buffer, offset, _buffer, byteLength, sublen); offset...
[ "@", "Override", "public", "void", "write", "(", "byte", "[", "]", "buffer", ",", "int", "offset", ",", "int", "length", ")", "{", "if", "(", "isClosed", "(", ")", "||", "isHead", "(", ")", ")", "{", "return", ";", "}", "int", "byteLength", "=", ...
Writes a chunk of bytes to the stream.
[ "Writes", "a", "chunk", "of", "bytes", "to", "the", "stream", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/OutHttpApp.java#L215-L242
train
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/OutHttpApp.java
OutHttpApp.nextBuffer
@Override public byte []nextBuffer(int offset) throws IOException { if (offset < 0 || SIZE < offset) { throw new IllegalStateException(L.l("Invalid offset: " + offset)); } if (_bufferCapacity <= SIZE || _bufferCapacity <= offset + _bufferSize) { _offset = offset; flush...
java
@Override public byte []nextBuffer(int offset) throws IOException { if (offset < 0 || SIZE < offset) { throw new IllegalStateException(L.l("Invalid offset: " + offset)); } if (_bufferCapacity <= SIZE || _bufferCapacity <= offset + _bufferSize) { _offset = offset; flush...
[ "@", "Override", "public", "byte", "[", "]", "nextBuffer", "(", "int", "offset", ")", "throws", "IOException", "{", "if", "(", "offset", "<", "0", "||", "SIZE", "<", "offset", ")", "{", "throw", "new", "IllegalStateException", "(", "L", ".", "l", "(", ...
Returns the next byte buffer.
[ "Returns", "the", "next", "byte", "buffer", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/OutHttpApp.java#L270-L298
train
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/OutHttpApp.java
OutHttpApp.close
@Override public final void close() throws IOException { State state = _state; if (state.isClosing()) { return; } _state = state.toClosing(); try { flush(true); } finally { try { _state = _state.toClose(); } catch (RuntimeException e) { ...
java
@Override public final void close() throws IOException { State state = _state; if (state.isClosing()) { return; } _state = state.toClosing(); try { flush(true); } finally { try { _state = _state.toClose(); } catch (RuntimeException e) { ...
[ "@", "Override", "public", "final", "void", "close", "(", ")", "throws", "IOException", "{", "State", "state", "=", "_state", ";", "if", "(", "state", ".", "isClosing", "(", ")", ")", "{", "return", ";", "}", "_state", "=", "state", ".", "toClosing", ...
Closes the response stream
[ "Closes", "the", "response", "stream" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/OutHttpApp.java#L348-L369
train
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/OutHttpApp.java
OutHttpApp.flush
private void flush(boolean isEnd) { if (_startOffset == _offset && _bufferSize == 0) { if (! isCommitted() || isEnd) { flush(null, isEnd); _startOffset = bufferStart(); _offset = _startOffset; } return; } int sublen = _offset - _startOffset; _tBuf.length(_off...
java
private void flush(boolean isEnd) { if (_startOffset == _offset && _bufferSize == 0) { if (! isCommitted() || isEnd) { flush(null, isEnd); _startOffset = bufferStart(); _offset = _startOffset; } return; } int sublen = _offset - _startOffset; _tBuf.length(_off...
[ "private", "void", "flush", "(", "boolean", "isEnd", ")", "{", "if", "(", "_startOffset", "==", "_offset", "&&", "_bufferSize", "==", "0", ")", "{", "if", "(", "!", "isCommitted", "(", ")", "||", "isEnd", ")", "{", "flush", "(", "null", ",", "isEnd",...
Flushes the buffered response to the output stream.
[ "Flushes", "the", "buffered", "response", "to", "the", "output", "stream", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/OutHttpApp.java#L374-L409
train
baratine/baratine
framework/src/main/java/com/caucho/v5/ramp/hamp/InHamp.java
InHamp.readSend
private boolean readSend(InH3 hIn, OutboxAmp outbox, HeadersAmp headers) throws IOException { MethodRefHamp methodHamp = null; try { methodHamp = readMethod(hIn); } catch (Throwable e) { log.log(Level.FINER, e.toString(), e); ...
java
private boolean readSend(InH3 hIn, OutboxAmp outbox, HeadersAmp headers) throws IOException { MethodRefHamp methodHamp = null; try { methodHamp = readMethod(hIn); } catch (Throwable e) { log.log(Level.FINER, e.toString(), e); ...
[ "private", "boolean", "readSend", "(", "InH3", "hIn", ",", "OutboxAmp", "outbox", ",", "HeadersAmp", "headers", ")", "throws", "IOException", "{", "MethodRefHamp", "methodHamp", "=", "null", ";", "try", "{", "methodHamp", "=", "readMethod", "(", "hIn", ")", ...
The send message is a on-way call to a service.
[ "The", "send", "message", "is", "a", "on", "-", "way", "call", "to", "a", "service", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/ramp/hamp/InHamp.java#L362-L417
train
baratine/baratine
framework/src/main/java/com/caucho/v5/ramp/hamp/InHamp.java
InHamp.readQuery
private void readQuery(InH3 hIn, OutboxAmp outbox, HeadersAmp headers) throws IOException { GatewayReply from = readFromAddress(hIn); long qid = hIn.readLong(); long timeout = 120 * 1000L; /* AmpQueryRef queryRef = new Qu...
java
private void readQuery(InH3 hIn, OutboxAmp outbox, HeadersAmp headers) throws IOException { GatewayReply from = readFromAddress(hIn); long qid = hIn.readLong(); long timeout = 120 * 1000L; /* AmpQueryRef queryRef = new Qu...
[ "private", "void", "readQuery", "(", "InH3", "hIn", ",", "OutboxAmp", "outbox", ",", "HeadersAmp", "headers", ")", "throws", "IOException", "{", "GatewayReply", "from", "=", "readFromAddress", "(", "hIn", ")", ";", "long", "qid", "=", "hIn", ".", "readLong",...
The query message is a RPC call to a service.
[ "The", "query", "message", "is", "a", "RPC", "call", "to", "a", "service", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/ramp/hamp/InHamp.java#L422-L526
train
baratine/baratine
framework/src/main/java/com/caucho/v5/ramp/hamp/InHamp.java
InHamp.readQueryResult
private void readQueryResult(InH3 hIn, HeadersAmp headers) throws IOException { ServiceRefAmp serviceRef = readToAddress(hIn); long id = hIn.readLong(); QueryRefAmp queryRef = serviceRef.removeQueryRef(id); if (queryRef != null) { ClassLoader loader = queryRef.getClassLoader(); ...
java
private void readQueryResult(InH3 hIn, HeadersAmp headers) throws IOException { ServiceRefAmp serviceRef = readToAddress(hIn); long id = hIn.readLong(); QueryRefAmp queryRef = serviceRef.removeQueryRef(id); if (queryRef != null) { ClassLoader loader = queryRef.getClassLoader(); ...
[ "private", "void", "readQueryResult", "(", "InH3", "hIn", ",", "HeadersAmp", "headers", ")", "throws", "IOException", "{", "ServiceRefAmp", "serviceRef", "=", "readToAddress", "(", "hIn", ")", ";", "long", "id", "=", "hIn", ".", "readLong", "(", ")", ";", ...
query reply parsing <pre><code> ["reply", {headers}, "from", qid, value] </code></pre> @param hIn the hessian input stream @param headers the message's headers
[ "query", "reply", "parsing" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/ramp/hamp/InHamp.java#L538-L572
train
baratine/baratine
framework/src/main/java/com/caucho/v5/config/types/FileSetType.java
FileSetType.addInclude
public void addInclude(PathPatternType pattern) { if (_includeList == null) _includeList = new ArrayList<PathPatternType>(); _includeList.add(pattern); }
java
public void addInclude(PathPatternType pattern) { if (_includeList == null) _includeList = new ArrayList<PathPatternType>(); _includeList.add(pattern); }
[ "public", "void", "addInclude", "(", "PathPatternType", "pattern", ")", "{", "if", "(", "_includeList", "==", "null", ")", "_includeList", "=", "new", "ArrayList", "<", "PathPatternType", ">", "(", ")", ";", "_includeList", ".", "add", "(", "pattern", ")", ...
Adds an include pattern.
[ "Adds", "an", "include", "pattern", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/config/types/FileSetType.java#L85-L91
train
baratine/baratine
framework/src/main/java/com/caucho/v5/config/types/FileSetType.java
FileSetType.setUserPathPrefix
public void setUserPathPrefix(String prefix) { if (prefix != null && ! prefix.equals("") && ! prefix.endsWith("/")) _userPathPrefix = prefix + "/"; else _userPathPrefix = prefix; }
java
public void setUserPathPrefix(String prefix) { if (prefix != null && ! prefix.equals("") && ! prefix.endsWith("/")) _userPathPrefix = prefix + "/"; else _userPathPrefix = prefix; }
[ "public", "void", "setUserPathPrefix", "(", "String", "prefix", ")", "{", "if", "(", "prefix", "!=", "null", "&&", "!", "prefix", ".", "equals", "(", "\"\"", ")", "&&", "!", "prefix", ".", "endsWith", "(", "\"/\"", ")", ")", "_userPathPrefix", "=", "pr...
Sets the user-path prefix for better error reporting.
[ "Sets", "the", "user", "-", "path", "prefix", "for", "better", "error", "reporting", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/config/types/FileSetType.java#L191-L197
train
baratine/baratine
kraken/src/main/java/com/caucho/v5/kraken/query/BinaryHashKeyExpr.java
BinaryHashKeyExpr.getKeyExpr
@Override public ExprKraken getKeyExpr(String name) { if (name.equals(_column.getColumn().name())) { return getRight(); } else { return null; } }
java
@Override public ExprKraken getKeyExpr(String name) { if (name.equals(_column.getColumn().name())) { return getRight(); } else { return null; } }
[ "@", "Override", "public", "ExprKraken", "getKeyExpr", "(", "String", "name", ")", "{", "if", "(", "name", ".", "equals", "(", "_column", ".", "getColumn", "(", ")", ".", "name", "(", ")", ")", ")", "{", "return", "getRight", "(", ")", ";", "}", "e...
Returns the assigned key expression
[ "Returns", "the", "assigned", "key", "expression" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kraken/query/BinaryHashKeyExpr.java#L75-L84
train
baratine/baratine
web/src/main/java/com/caucho/v5/log/impl/EnvironmentStream.java
EnvironmentStream.write
@Override public void write(byte []buf, int offset, int length, boolean isEnd) throws IOException { OutputStream stream = getStream(); if (stream == null) { return; } synchronized (stream) { stream.write(buf, offset, length); if (isEnd) { stream.flush(); ...
java
@Override public void write(byte []buf, int offset, int length, boolean isEnd) throws IOException { OutputStream stream = getStream(); if (stream == null) { return; } synchronized (stream) { stream.write(buf, offset, length); if (isEnd) { stream.flush(); ...
[ "@", "Override", "public", "void", "write", "(", "byte", "[", "]", "buf", ",", "int", "offset", ",", "int", "length", ",", "boolean", "isEnd", ")", "throws", "IOException", "{", "OutputStream", "stream", "=", "getStream", "(", ")", ";", "if", "(", "str...
Write data to the stream.
[ "Write", "data", "to", "the", "stream", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/impl/EnvironmentStream.java#L145-L162
train
baratine/baratine
web/src/main/java/com/caucho/v5/log/impl/EnvironmentStream.java
EnvironmentStream.flush
@Override public void flush() throws IOException { OutputStream stream = getStream(); if (stream == null) { return; } synchronized (stream) { stream.flush(); } }
java
@Override public void flush() throws IOException { OutputStream stream = getStream(); if (stream == null) { return; } synchronized (stream) { stream.flush(); } }
[ "@", "Override", "public", "void", "flush", "(", ")", "throws", "IOException", "{", "OutputStream", "stream", "=", "getStream", "(", ")", ";", "if", "(", "stream", "==", "null", ")", "{", "return", ";", "}", "synchronized", "(", "stream", ")", "{", "st...
Flush data to the stream.
[ "Flush", "data", "to", "the", "stream", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/impl/EnvironmentStream.java#L167-L180
train
baratine/baratine
web/src/main/java/com/caucho/v5/log/impl/EnvironmentStream.java
EnvironmentStream.setStdout
public synchronized static void setStdout(OutputStream os) { if (_stdoutStream == null) { initStdout(); } if (os == _systemErr || os == _systemOut) { return; } if (os instanceof WriteStream) { WriteStream out = (WriteStream) os; /* if (out.getSource() == StdoutStre...
java
public synchronized static void setStdout(OutputStream os) { if (_stdoutStream == null) { initStdout(); } if (os == _systemErr || os == _systemOut) { return; } if (os instanceof WriteStream) { WriteStream out = (WriteStream) os; /* if (out.getSource() == StdoutStre...
[ "public", "synchronized", "static", "void", "setStdout", "(", "OutputStream", "os", ")", "{", "if", "(", "_stdoutStream", "==", "null", ")", "{", "initStdout", "(", ")", ";", "}", "if", "(", "os", "==", "_systemErr", "||", "os", "==", "_systemOut", ")", ...
Sets the backing stream for System.out
[ "Sets", "the", "backing", "stream", "for", "System", ".", "out" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/impl/EnvironmentStream.java#L203-L225
train
baratine/baratine
web/src/main/java/com/caucho/v5/log/impl/EnvironmentStream.java
EnvironmentStream.setStderr
public static synchronized void setStderr(OutputStream os) { if (_stderrStream == null) { initStderr(); } if (os == _systemErr || os == _systemOut) { return; } if (os instanceof WriteStream) { WriteStream out = (WriteStream) os; /* if (out.getSource() == StdoutStre...
java
public static synchronized void setStderr(OutputStream os) { if (_stderrStream == null) { initStderr(); } if (os == _systemErr || os == _systemOut) { return; } if (os instanceof WriteStream) { WriteStream out = (WriteStream) os; /* if (out.getSource() == StdoutStre...
[ "public", "static", "synchronized", "void", "setStderr", "(", "OutputStream", "os", ")", "{", "if", "(", "_stderrStream", "==", "null", ")", "{", "initStderr", "(", ")", ";", "}", "if", "(", "os", "==", "_systemErr", "||", "os", "==", "_systemOut", ")", ...
Sets path as the backing stream for System.err
[ "Sets", "path", "as", "the", "backing", "stream", "for", "System", ".", "err" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/impl/EnvironmentStream.java#L254-L276
train
baratine/baratine
web/src/main/java/com/caucho/v5/subsystem/SubSystemBase.java
SubSystemBase.preCreate
protected static <E extends SubSystemBase> SystemManager preCreate(Class<E> serviceClass) { SystemManager system = SystemManager.getCurrent(); if (system == null) throw new IllegalStateException(L.l("{0} must be created before {1}", SystemManager.class.getSi...
java
protected static <E extends SubSystemBase> SystemManager preCreate(Class<E> serviceClass) { SystemManager system = SystemManager.getCurrent(); if (system == null) throw new IllegalStateException(L.l("{0} must be created before {1}", SystemManager.class.getSi...
[ "protected", "static", "<", "E", "extends", "SubSystemBase", ">", "SystemManager", "preCreate", "(", "Class", "<", "E", ">", "serviceClass", ")", "{", "SystemManager", "system", "=", "SystemManager", ".", "getCurrent", "(", ")", ";", "if", "(", "system", "==...
convenience method for subclass's create methods
[ "convenience", "method", "for", "subclass", "s", "create", "methods" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/subsystem/SubSystemBase.java#L113-L127
train
SeaCloudsEU/SeaCloudsPlatform
planner/aamwriter/src/main/java/eu/seaclouds/platform/planner/aamwriter/modelaam/NodeTemplate.java
NodeTemplate.addConnectionRequirement
public String addConnectionRequirement(NodeTemplate target, String type, String varName) { Map<String, Object> requirement = new LinkedHashMap(); String requirementName = "endpoint"; Map requirementMap = new LinkedHashMap<String, Object>(); requirement.put(requirementName, ...
java
public String addConnectionRequirement(NodeTemplate target, String type, String varName) { Map<String, Object> requirement = new LinkedHashMap(); String requirementName = "endpoint"; Map requirementMap = new LinkedHashMap<String, Object>(); requirement.put(requirementName, ...
[ "public", "String", "addConnectionRequirement", "(", "NodeTemplate", "target", ",", "String", "type", ",", "String", "varName", ")", "{", "Map", "<", "String", ",", "Object", ">", "requirement", "=", "new", "LinkedHashMap", "(", ")", ";", "String", "requiremen...
Add an endpoint requirement to a NodeTemplate @return name given to the requirement
[ "Add", "an", "endpoint", "requirement", "to", "a", "NodeTemplate" ]
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/planner/aamwriter/src/main/java/eu/seaclouds/platform/planner/aamwriter/modelaam/NodeTemplate.java#L98-L114
train
baratine/baratine
web/src/main/java/com/caucho/v5/network/port/PollTcpManagerNio.java
PollTcpManagerNio.stop
@Override public boolean stop() { if (! _lifecycle.toStopping()) return false; log.finest(this + " stopping"); closeConnections(); destroy(); return true; }
java
@Override public boolean stop() { if (! _lifecycle.toStopping()) return false; log.finest(this + " stopping"); closeConnections(); destroy(); return true; }
[ "@", "Override", "public", "boolean", "stop", "(", ")", "{", "if", "(", "!", "_lifecycle", ".", "toStopping", "(", ")", ")", "return", "false", ";", "log", ".", "finest", "(", "this", "+", "\" stopping\"", ")", ";", "closeConnections", "(", ")", ";", ...
Closing the manager.
[ "Closing", "the", "manager", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/network/port/PollTcpManagerNio.java#L424-L437
train
baratine/baratine
kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentKelp.java
SegmentKelp.writePageIndex
int writePageIndex(byte []buffer, int head, int type, int pid, int nextPid, int entryOffset, int entryLength) { int sublen = 1 + 4 * 4; if (BLOCK_SIZE - 8 < head + sublen) { ...
java
int writePageIndex(byte []buffer, int head, int type, int pid, int nextPid, int entryOffset, int entryLength) { int sublen = 1 + 4 * 4; if (BLOCK_SIZE - 8 < head + sublen) { ...
[ "int", "writePageIndex", "(", "byte", "[", "]", "buffer", ",", "int", "head", ",", "int", "type", ",", "int", "pid", ",", "int", "nextPid", ",", "int", "entryOffset", ",", "int", "entryLength", ")", "{", "int", "sublen", "=", "1", "+", "4", "*", "4...
Writes a page index.
[ "Writes", "a", "page", "index", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentKelp.java#L181-L211
train
baratine/baratine
kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentKelp.java
SegmentKelp.readEntries
public void readEntries(TableKelp table, InSegment reader, SegmentEntryCallback cb) { TempBuffer tBuf = TempBuffer.createLarge(); byte []buffer = tBuf.buffer(); InStore sIn = reader.getStoreRead(); byte []tableKey = new byte[TableKelp.TABLE_KEY...
java
public void readEntries(TableKelp table, InSegment reader, SegmentEntryCallback cb) { TempBuffer tBuf = TempBuffer.createLarge(); byte []buffer = tBuf.buffer(); InStore sIn = reader.getStoreRead(); byte []tableKey = new byte[TableKelp.TABLE_KEY...
[ "public", "void", "readEntries", "(", "TableKelp", "table", ",", "InSegment", "reader", ",", "SegmentEntryCallback", "cb", ")", "{", "TempBuffer", "tBuf", "=", "TempBuffer", ".", "createLarge", "(", ")", ";", "byte", "[", "]", "buffer", "=", "tBuf", ".", "...
Reads index entries from the segment. The index is at the tail of the segment, written backwards in blocks. The final block has the first entries, and the next to last has the second set of entries.
[ "Reads", "index", "entries", "from", "the", "segment", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentKelp.java#L235-L295
train
baratine/baratine
kraken/src/main/java/com/caucho/v5/kelp/RowCursor.java
RowCursor.getSize
public int getSize() { int size = length(); if (_blobs == null) { return size; } for (BlobOutputStream blob : _blobs) { if (blob != null) { size += blob.getSize(); } } return size; }
java
public int getSize() { int size = length(); if (_blobs == null) { return size; } for (BlobOutputStream blob : _blobs) { if (blob != null) { size += blob.getSize(); } } return size; }
[ "public", "int", "getSize", "(", ")", "{", "int", "size", "=", "length", "(", ")", ";", "if", "(", "_blobs", "==", "null", ")", "{", "return", "size", ";", "}", "for", "(", "BlobOutputStream", "blob", ":", "_blobs", ")", "{", "if", "(", "blob", "...
The size includes the dynamic size from any blobs
[ "The", "size", "includes", "the", "dynamic", "size", "from", "any", "blobs" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/RowCursor.java#L120-L135
train
baratine/baratine
kraken/src/main/java/com/caucho/v5/kelp/RowCursor.java
RowCursor.openOutputStream
public final OutputStream openOutputStream(int index) { Column column = _row.columns()[index]; return column.openOutputStream(this); }
java
public final OutputStream openOutputStream(int index) { Column column = _row.columns()[index]; return column.openOutputStream(this); }
[ "public", "final", "OutputStream", "openOutputStream", "(", "int", "index", ")", "{", "Column", "column", "=", "_row", ".", "columns", "(", ")", "[", "index", "]", ";", "return", "column", ".", "openOutputStream", "(", "this", ")", ";", "}" ]
Set a blob value with an open blob stream.
[ "Set", "a", "blob", "value", "with", "an", "open", "blob", "stream", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/RowCursor.java#L326-L331
train
baratine/baratine
web/src/main/java/com/caucho/v5/subsystem/RootDirectorySystem.java
RootDirectorySystem.currentDataDirectory
public static Path currentDataDirectory() { RootDirectorySystem rootService = getCurrent(); if (rootService == null) throw new IllegalStateException(L.l("{0} must be active for getCurrentDataDirectory().", RootDirectorySystem.class.getSimpleName())); ...
java
public static Path currentDataDirectory() { RootDirectorySystem rootService = getCurrent(); if (rootService == null) throw new IllegalStateException(L.l("{0} must be active for getCurrentDataDirectory().", RootDirectorySystem.class.getSimpleName())); ...
[ "public", "static", "Path", "currentDataDirectory", "(", ")", "{", "RootDirectorySystem", "rootService", "=", "getCurrent", "(", ")", ";", "if", "(", "rootService", "==", "null", ")", "throw", "new", "IllegalStateException", "(", "L", ".", "l", "(", "\"{0} mus...
Returns the data directory for current active directory service.
[ "Returns", "the", "data", "directory", "for", "current", "active", "directory", "service", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/subsystem/RootDirectorySystem.java#L118-L127
train
baratine/baratine
kraken/src/main/java/com/caucho/v5/db/journal/JournalStore.java
JournalStore.create
public static JournalStore create(Path path, boolean isMmap) throws IOException { // RampManager rampManager = Ramp.newManager(); long segmentSize = 4 * 1024 * 1024; JournalStore.Builder builder = JournalStore.Builder.create(path); builder.segmentSize(segmentSize); // builder.ra...
java
public static JournalStore create(Path path, boolean isMmap) throws IOException { // RampManager rampManager = Ramp.newManager(); long segmentSize = 4 * 1024 * 1024; JournalStore.Builder builder = JournalStore.Builder.create(path); builder.segmentSize(segmentSize); // builder.ra...
[ "public", "static", "JournalStore", "create", "(", "Path", "path", ",", "boolean", "isMmap", ")", "throws", "IOException", "{", "// RampManager rampManager = Ramp.newManager();", "long", "segmentSize", "=", "4", "*", "1024", "*", "1024", ";", "JournalStore", ".", ...
Creates an independent store.
[ "Creates", "an", "independent", "store", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/db/journal/JournalStore.java#L153-L169
train
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/Jar.java
Jar.clearJarCache
public static void clearJarCache() { LruCache<PathImpl,Jar> jarCache = _jarCache; if (jarCache == null) return; ArrayList<Jar> jars = new ArrayList<Jar>(); synchronized (jarCache) { Iterator<Jar> iter = jarCache.values(); while (iter.hasNext()) jars.add(iter...
java
public static void clearJarCache() { LruCache<PathImpl,Jar> jarCache = _jarCache; if (jarCache == null) return; ArrayList<Jar> jars = new ArrayList<Jar>(); synchronized (jarCache) { Iterator<Jar> iter = jarCache.values(); while (iter.hasNext()) jars.add(iter...
[ "public", "static", "void", "clearJarCache", "(", ")", "{", "LruCache", "<", "PathImpl", ",", "Jar", ">", "jarCache", "=", "_jarCache", ";", "if", "(", "jarCache", "==", "null", ")", "return", ";", "ArrayList", "<", "Jar", ">", "jars", "=", "new", "Arr...
Clears all the cached files in the jar. Needed to avoid some windows NT issues.
[ "Clears", "all", "the", "cached", "files", "in", "the", "jar", ".", "Needed", "to", "avoid", "some", "windows", "NT", "issues", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/Jar.java#L519-L541
train
baratine/baratine
web/src/main/java/com/caucho/v5/network/ssl/SSLFactoryJsse.java
SSLFactoryJsse.keyStoreFile
private Path keyStoreFile() { String fileName = _config.get(_prefix + ".ssl.key-store"); if (fileName == null) { return null; } return Vfs.path(fileName); }
java
private Path keyStoreFile() { String fileName = _config.get(_prefix + ".ssl.key-store"); if (fileName == null) { return null; } return Vfs.path(fileName); }
[ "private", "Path", "keyStoreFile", "(", ")", "{", "String", "fileName", "=", "_config", ".", "get", "(", "_prefix", "+", "\".ssl.key-store\"", ")", ";", "if", "(", "fileName", "==", "null", ")", "{", "return", "null", ";", "}", "return", "Vfs", ".", "p...
Returns the certificate file.
[ "Returns", "the", "certificate", "file", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/network/ssl/SSLFactoryJsse.java#L134-L143
train
baratine/baratine
web/src/main/java/com/caucho/v5/network/ssl/SSLFactoryJsse.java
SSLFactoryJsse.keyStorePassword
private String keyStorePassword() { String password = _config.get(_prefix + ".ssl.key-store-password"); if (password != null) { return password; } else { return _config.get(_prefix + ".ssl.password"); } }
java
private String keyStorePassword() { String password = _config.get(_prefix + ".ssl.key-store-password"); if (password != null) { return password; } else { return _config.get(_prefix + ".ssl.password"); } }
[ "private", "String", "keyStorePassword", "(", ")", "{", "String", "password", "=", "_config", ".", "get", "(", "_prefix", "+", "\".ssl.key-store-password\"", ")", ";", "if", "(", "password", "!=", "null", ")", "{", "return", "password", ";", "}", "else", "...
Returns the key-store password
[ "Returns", "the", "key", "-", "store", "password" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/network/ssl/SSLFactoryJsse.java#L156-L166
train
baratine/baratine
web/src/main/java/com/caucho/v5/network/ssl/SSLFactoryJsse.java
SSLFactoryJsse.createFactory
private SSLSocketFactory createFactory() throws Exception { SSLSocketFactory ssFactory = null; String host = "localhost"; int port = 8086; if (_keyStore == null) { return createAnonymousFactory(null, port); } SSLContext sslContext = SSLContext.getInstance(_sslContext);...
java
private SSLSocketFactory createFactory() throws Exception { SSLSocketFactory ssFactory = null; String host = "localhost"; int port = 8086; if (_keyStore == null) { return createAnonymousFactory(null, port); } SSLContext sslContext = SSLContext.getInstance(_sslContext);...
[ "private", "SSLSocketFactory", "createFactory", "(", ")", "throws", "Exception", "{", "SSLSocketFactory", "ssFactory", "=", "null", ";", "String", "host", "=", "\"localhost\"", ";", "int", "port", "=", "8086", ";", "if", "(", "_keyStore", "==", "null", ")", ...
Creates the SSLSocketFactory
[ "Creates", "the", "SSLSocketFactory" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/network/ssl/SSLFactoryJsse.java#L373-L408
train
baratine/baratine
core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java
InjectorImpl.current
public static InjectorImpl current(ClassLoader loader) { if (loader instanceof DynamicClassLoader) { return _localManager.getLevel(loader); } else { SoftReference<InjectorImpl> injectRef = _loaderManagerMap.get(loader); if (injectRef != null) { return injectRef.get(); } ...
java
public static InjectorImpl current(ClassLoader loader) { if (loader instanceof DynamicClassLoader) { return _localManager.getLevel(loader); } else { SoftReference<InjectorImpl> injectRef = _loaderManagerMap.get(loader); if (injectRef != null) { return injectRef.get(); } ...
[ "public", "static", "InjectorImpl", "current", "(", "ClassLoader", "loader", ")", "{", "if", "(", "loader", "instanceof", "DynamicClassLoader", ")", "{", "return", "_localManager", ".", "getLevel", "(", "loader", ")", ";", "}", "else", "{", "SoftReference", "<...
Returns the current inject manager.
[ "Returns", "the", "current", "inject", "manager", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L167-L182
train
baratine/baratine
core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java
InjectorImpl.instance
@Override public <T> T instance(Class<T> type) { Key<T> key = Key.of(type); return instance(key); }
java
@Override public <T> T instance(Class<T> type) { Key<T> key = Key.of(type); return instance(key); }
[ "@", "Override", "public", "<", "T", ">", "T", "instance", "(", "Class", "<", "T", ">", "type", ")", "{", "Key", "<", "T", ">", "key", "=", "Key", ".", "of", "(", "type", ")", ";", "return", "instance", "(", "key", ")", ";", "}" ]
Creates a new instance for a given type.
[ "Creates", "a", "new", "instance", "for", "a", "given", "type", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L277-L283
train
baratine/baratine
core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java
InjectorImpl.instance
@Override public <T> T instance(Key<T> key) { Objects.requireNonNull(key); Class<T> type = (Class) key.rawClass(); if (type.equals(Provider.class)) { TypeRef typeRef = TypeRef.of(key.type()); TypeRef param = typeRef.param(0); return (T) provider(Key.of(param.type())); } Pro...
java
@Override public <T> T instance(Key<T> key) { Objects.requireNonNull(key); Class<T> type = (Class) key.rawClass(); if (type.equals(Provider.class)) { TypeRef typeRef = TypeRef.of(key.type()); TypeRef param = typeRef.param(0); return (T) provider(Key.of(param.type())); } Pro...
[ "@", "Override", "public", "<", "T", ">", "T", "instance", "(", "Key", "<", "T", ">", "key", ")", "{", "Objects", ".", "requireNonNull", "(", "key", ")", ";", "Class", "<", "T", ">", "type", "=", "(", "Class", ")", "key", ".", "rawClass", "(", ...
Creates a new instance for a given key.
[ "Creates", "a", "new", "instance", "for", "a", "given", "key", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L288-L310
train
baratine/baratine
core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java
InjectorImpl.instance
@Override public <T> T instance(InjectionPoint<T> ip) { Objects.requireNonNull(ip); Provider<T> provider = provider(ip); if (provider != null) { return provider.get(); } else { return null; } }
java
@Override public <T> T instance(InjectionPoint<T> ip) { Objects.requireNonNull(ip); Provider<T> provider = provider(ip); if (provider != null) { return provider.get(); } else { return null; } }
[ "@", "Override", "public", "<", "T", ">", "T", "instance", "(", "InjectionPoint", "<", "T", ">", "ip", ")", "{", "Objects", ".", "requireNonNull", "(", "ip", ")", ";", "Provider", "<", "T", ">", "provider", "=", "provider", "(", "ip", ")", ";", "if...
Creates a new bean instance for a given InjectionPoint, such as a method or field.
[ "Creates", "a", "new", "bean", "instance", "for", "a", "given", "InjectionPoint", "such", "as", "a", "method", "or", "field", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L316-L329
train
baratine/baratine
core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java
InjectorImpl.provider
@Override public <T> Provider<T> provider(InjectionPoint<T> ip) { Objects.requireNonNull(ip); Provider<T> provider = lookupProvider(ip); if (provider != null) { return provider; } provider = autoProvider(ip); if (provider != null) { return provider; } return new Prov...
java
@Override public <T> Provider<T> provider(InjectionPoint<T> ip) { Objects.requireNonNull(ip); Provider<T> provider = lookupProvider(ip); if (provider != null) { return provider; } provider = autoProvider(ip); if (provider != null) { return provider; } return new Prov...
[ "@", "Override", "public", "<", "T", ">", "Provider", "<", "T", ">", "provider", "(", "InjectionPoint", "<", "T", ">", "ip", ")", "{", "Objects", ".", "requireNonNull", "(", "ip", ")", ";", "Provider", "<", "T", ">", "provider", "=", "lookupProvider", ...
Creates an instance provider for a given InjectionPoint, such as a method or field.
[ "Creates", "an", "instance", "provider", "for", "a", "given", "InjectionPoint", "such", "as", "a", "method", "or", "field", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L336-L354
train
baratine/baratine
core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java
InjectorImpl.provider
@Override public <T> Provider<T> provider(Key<T> key) { Objects.requireNonNull(key); Provider<T> provider = (Provider) _providerMap.get(key); if (provider == null) { provider = lookupProvider(key); if (provider == null) { provider = autoProvider(key); } _providerMap.p...
java
@Override public <T> Provider<T> provider(Key<T> key) { Objects.requireNonNull(key); Provider<T> provider = (Provider) _providerMap.get(key); if (provider == null) { provider = lookupProvider(key); if (provider == null) { provider = autoProvider(key); } _providerMap.p...
[ "@", "Override", "public", "<", "T", ">", "Provider", "<", "T", ">", "provider", "(", "Key", "<", "T", ">", "key", ")", "{", "Objects", ".", "requireNonNull", "(", "key", ")", ";", "Provider", "<", "T", ">", "provider", "=", "(", "Provider", ")", ...
Returns a bean instance provider for a key.
[ "Returns", "a", "bean", "instance", "provider", "for", "a", "key", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L359-L379
train
baratine/baratine
core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java
InjectorImpl.lookupProvider
private <T> Provider<T> lookupProvider(Key<T> key) { BindingInject<T> bean = findBean(key); if (bean != null) { return bean.provider(); } BindingAmp<T> binding = findBinding(key); if (binding != null) { return binding.provider(); } binding = findObjectBinding(key); if ...
java
private <T> Provider<T> lookupProvider(Key<T> key) { BindingInject<T> bean = findBean(key); if (bean != null) { return bean.provider(); } BindingAmp<T> binding = findBinding(key); if (binding != null) { return binding.provider(); } binding = findObjectBinding(key); if ...
[ "private", "<", "T", ">", "Provider", "<", "T", ">", "lookupProvider", "(", "Key", "<", "T", ">", "key", ")", "{", "BindingInject", "<", "T", ">", "bean", "=", "findBean", "(", "key", ")", ";", "if", "(", "bean", "!=", "null", ")", "{", "return",...
Search for a matching provider for a key.
[ "Search", "for", "a", "matching", "provider", "for", "a", "key", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L384-L406
train
baratine/baratine
core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java
InjectorImpl.lookupProvider
private <T> Provider<T> lookupProvider(InjectionPoint<T> ip) { Key<T> key = ip.key(); BindingInject<T> bean = findBean(key); if (bean != null) { return bean.provider(ip); } BindingAmp<T> provider = findBinding(key); if (provider != null) { return provider.provider(ip); } ...
java
private <T> Provider<T> lookupProvider(InjectionPoint<T> ip) { Key<T> key = ip.key(); BindingInject<T> bean = findBean(key); if (bean != null) { return bean.provider(ip); } BindingAmp<T> provider = findBinding(key); if (provider != null) { return provider.provider(ip); } ...
[ "private", "<", "T", ">", "Provider", "<", "T", ">", "lookupProvider", "(", "InjectionPoint", "<", "T", ">", "ip", ")", "{", "Key", "<", "T", ">", "key", "=", "ip", ".", "key", "(", ")", ";", "BindingInject", "<", "T", ">", "bean", "=", "findBean...
Create a provider for an injection point.
[ "Create", "a", "provider", "for", "an", "injection", "point", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L411-L435
train
baratine/baratine
core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java
InjectorImpl.findScope
private <T> InjectScope<T> findScope(AnnotatedElement annElement) { for (Annotation ann : annElement.getAnnotations()) { Class<? extends Annotation> annType = ann.annotationType(); if (annType.isAnnotationPresent(Scope.class)) { Supplier<InjectScope<T>> scopeGen = (Supplier) _scopeMap.get(ann...
java
private <T> InjectScope<T> findScope(AnnotatedElement annElement) { for (Annotation ann : annElement.getAnnotations()) { Class<? extends Annotation> annType = ann.annotationType(); if (annType.isAnnotationPresent(Scope.class)) { Supplier<InjectScope<T>> scopeGen = (Supplier) _scopeMap.get(ann...
[ "private", "<", "T", ">", "InjectScope", "<", "T", ">", "findScope", "(", "AnnotatedElement", "annElement", ")", "{", "for", "(", "Annotation", "ann", ":", "annElement", ".", "getAnnotations", "(", ")", ")", "{", "Class", "<", "?", "extends", "Annotation",...
Finds the scope for a bean producing declaration, either a method or a type.
[ "Finds", "the", "scope", "for", "a", "bean", "producing", "declaration", "either", "a", "method", "or", "a", "type", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L528-L546
train
baratine/baratine
core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java
InjectorImpl.bindings
@Override public <T> Iterable<Binding<T>> bindings(Class<T> type) { BindingSet<T> set = (BindingSet) _bindingSetMap.get(type); if (set != null) { return (Iterable) set; } else { return Collections.EMPTY_LIST; } }
java
@Override public <T> Iterable<Binding<T>> bindings(Class<T> type) { BindingSet<T> set = (BindingSet) _bindingSetMap.get(type); if (set != null) { return (Iterable) set; } else { return Collections.EMPTY_LIST; } }
[ "@", "Override", "public", "<", "T", ">", "Iterable", "<", "Binding", "<", "T", ">", ">", "bindings", "(", "Class", "<", "T", ">", "type", ")", "{", "BindingSet", "<", "T", ">", "set", "=", "(", "BindingSet", ")", "_bindingSetMap", ".", "get", "(",...
Returns all bindings matching a type.
[ "Returns", "all", "bindings", "matching", "a", "type", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L551-L562
train
baratine/baratine
core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java
InjectorImpl.bindings
@Override public <T> List<Binding<T>> bindings(Key<T> key) { BindingSet<T> set = (BindingSet) _bindingSetMap.get(key.rawClass()); if (set != null) { return set.bindings(key); } else { return Collections.EMPTY_LIST; } }
java
@Override public <T> List<Binding<T>> bindings(Key<T> key) { BindingSet<T> set = (BindingSet) _bindingSetMap.get(key.rawClass()); if (set != null) { return set.bindings(key); } else { return Collections.EMPTY_LIST; } }
[ "@", "Override", "public", "<", "T", ">", "List", "<", "Binding", "<", "T", ">", ">", "bindings", "(", "Key", "<", "T", ">", "key", ")", "{", "BindingSet", "<", "T", ">", "set", "=", "(", "BindingSet", ")", "_bindingSetMap", ".", "get", "(", "key...
Returns all bindings matching a key.
[ "Returns", "all", "bindings", "matching", "a", "key", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L567-L578
train
baratine/baratine
core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java
InjectorImpl.scope
<T> InjectScope<T> scope(Class<? extends Annotation> scopeType) { Supplier<InjectScope<T>> scopeGen = (Supplier) _scopeMap.get(scopeType); if (scopeGen == null) { throw error("{0} is an unknown scope", scopeType.getSimpleName()); } return scopeGen.get(); }
java
<T> InjectScope<T> scope(Class<? extends Annotation> scopeType) { Supplier<InjectScope<T>> scopeGen = (Supplier) _scopeMap.get(scopeType); if (scopeGen == null) { throw error("{0} is an unknown scope", scopeType.getSimpleName()); } return scopeGen.get(); }
[ "<", "T", ">", "InjectScope", "<", "T", ">", "scope", "(", "Class", "<", "?", "extends", "Annotation", ">", "scopeType", ")", "{", "Supplier", "<", "InjectScope", "<", "T", ">>", "scopeGen", "=", "(", "Supplier", ")", "_scopeMap", ".", "get", "(", "s...
Returns the scope given a scope annotation.
[ "Returns", "the", "scope", "given", "a", "scope", "annotation", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L583-L593
train
baratine/baratine
core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java
InjectorImpl.injector
@Override public <T> Consumer<T> injector(Class<T> type) { ArrayList<InjectProgram> injectList = new ArrayList<>(); introspectInject(injectList, type); introspectInit(injectList, type); return new InjectProgramImpl<T>(injectList); }
java
@Override public <T> Consumer<T> injector(Class<T> type) { ArrayList<InjectProgram> injectList = new ArrayList<>(); introspectInject(injectList, type); introspectInit(injectList, type); return new InjectProgramImpl<T>(injectList); }
[ "@", "Override", "public", "<", "T", ">", "Consumer", "<", "T", ">", "injector", "(", "Class", "<", "T", ">", "type", ")", "{", "ArrayList", "<", "InjectProgram", ">", "injectList", "=", "new", "ArrayList", "<>", "(", ")", ";", "introspectInject", "(",...
Create an injector for a bean type. The consumer will inject the bean's fields.
[ "Create", "an", "injector", "for", "a", "bean", "type", ".", "The", "consumer", "will", "inject", "the", "bean", "s", "fields", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L599-L609
train
baratine/baratine
core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java
InjectorImpl.program
@Override public Provider<?> []program(Parameter []params) { Provider<?> []program = new Provider<?>[params.length]; for (int i = 0; i < program.length; i++) { //Key<?> key = Key.of(params[i]); program[i] = provider(InjectionPoint.of(params[i])); } return program; }
java
@Override public Provider<?> []program(Parameter []params) { Provider<?> []program = new Provider<?>[params.length]; for (int i = 0; i < program.length; i++) { //Key<?> key = Key.of(params[i]); program[i] = provider(InjectionPoint.of(params[i])); } return program; }
[ "@", "Override", "public", "Provider", "<", "?", ">", "[", "]", "program", "(", "Parameter", "[", "]", "params", ")", "{", "Provider", "<", "?", ">", "[", "]", "program", "=", "new", "Provider", "<", "?", ">", "[", "params", ".", "length", "]", "...
Create a program for method arguments.
[ "Create", "a", "program", "for", "method", "arguments", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L614-L626
train
baratine/baratine
core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java
InjectorImpl.findBean
private <T> BindingInject<T> findBean(Key<T> key) { for (InjectProvider provider : _providerList) { BindingInject<T> bean = (BindingInject) provider.lookup(key.rawClass()); if (bean != null) { return bean; } } return null; }
java
private <T> BindingInject<T> findBean(Key<T> key) { for (InjectProvider provider : _providerList) { BindingInject<T> bean = (BindingInject) provider.lookup(key.rawClass()); if (bean != null) { return bean; } } return null; }
[ "private", "<", "T", ">", "BindingInject", "<", "T", ">", "findBean", "(", "Key", "<", "T", ">", "key", ")", "{", "for", "(", "InjectProvider", "provider", ":", "_providerList", ")", "{", "BindingInject", "<", "T", ">", "bean", "=", "(", "BindingInject...
Find a binding by the key.
[ "Find", "a", "binding", "by", "the", "key", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L631-L642
train
baratine/baratine
core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java
InjectorImpl.findObjectBinding
private <T> BindingAmp<T> findObjectBinding(Key<T> key) { Objects.requireNonNull(key); if (key.qualifiers().length != 1) { throw new IllegalArgumentException(); } return (BindingAmp) findBinding(Key.of(Object.class, key.qualifiers()[0])); }
java
private <T> BindingAmp<T> findObjectBinding(Key<T> key) { Objects.requireNonNull(key); if (key.qualifiers().length != 1) { throw new IllegalArgumentException(); } return (BindingAmp) findBinding(Key.of(Object.class, key.qualifiers()[0])); }
[ "private", "<", "T", ">", "BindingAmp", "<", "T", ">", "findObjectBinding", "(", "Key", "<", "T", ">", "key", ")", "{", "Objects", ".", "requireNonNull", "(", "key", ")", ";", "if", "(", "key", ".", "qualifiers", "(", ")", ".", "length", "!=", "1",...
Returns an object producer.
[ "Returns", "an", "object", "producer", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L771-L781
train
baratine/baratine
core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java
InjectorImpl.findBinding
private <T> BindingAmp<T> findBinding(Key<T> key) { BindingSet<T> set = (BindingSet) _bindingSetMap.get(key.rawClass()); if (set != null) { BindingAmp<T> binding = set.find(key); if (binding != null) { return binding; } } return null; }
java
private <T> BindingAmp<T> findBinding(Key<T> key) { BindingSet<T> set = (BindingSet) _bindingSetMap.get(key.rawClass()); if (set != null) { BindingAmp<T> binding = set.find(key); if (binding != null) { return binding; } } return null; }
[ "private", "<", "T", ">", "BindingAmp", "<", "T", ">", "findBinding", "(", "Key", "<", "T", ">", "key", ")", "{", "BindingSet", "<", "T", ">", "set", "=", "(", "BindingSet", ")", "_bindingSetMap", ".", "get", "(", "key", ".", "rawClass", "(", ")", ...
Finds a producer for the given target type.
[ "Finds", "a", "producer", "for", "the", "given", "target", "type", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L786-L799
train
baratine/baratine
core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java
Lifecycle.setLevel
public void setLevel(Level level) { _level = level; if (level.intValue() < _lowLevel.intValue()) _lowLevel = level; }
java
public void setLevel(Level level) { _level = level; if (level.intValue() < _lowLevel.intValue()) _lowLevel = level; }
[ "public", "void", "setLevel", "(", "Level", "level", ")", "{", "_level", "=", "level", ";", "if", "(", "level", ".", "intValue", "(", ")", "<", "_lowLevel", ".", "intValue", "(", ")", ")", "_lowLevel", "=", "level", ";", "}" ]
Sets the lifecycle logging level.
[ "Sets", "the", "lifecycle", "logging", "level", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java#L133-L139
train
baratine/baratine
core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java
Lifecycle.waitForActive
public boolean waitForActive(long timeout) { LifecycleState state = getState(); if (state.isActive()) { return true; } else if (state.isAfterActive()) { return false; } // server/1d2j long waitEnd = CurrentTime.getCurrentTimeActual() + timeout; synchronized (this) { ...
java
public boolean waitForActive(long timeout) { LifecycleState state = getState(); if (state.isActive()) { return true; } else if (state.isAfterActive()) { return false; } // server/1d2j long waitEnd = CurrentTime.getCurrentTimeActual() + timeout; synchronized (this) { ...
[ "public", "boolean", "waitForActive", "(", "long", "timeout", ")", "{", "LifecycleState", "state", "=", "getState", "(", ")", ";", "if", "(", "state", ".", "isActive", "(", ")", ")", "{", "return", "true", ";", "}", "else", "if", "(", "state", ".", "...
Wait for a period of time until the service starts.
[ "Wait", "for", "a", "period", "of", "time", "until", "the", "service", "starts", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java#L315-L351
train
baratine/baratine
core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java
Lifecycle.toPostInit
public boolean toPostInit() { synchronized (this) { if (_state == STOPPED) { _state = INIT; _lastChangeTime = CurrentTime.currentTime(); notifyListeners(STOPPED, INIT); return true; } else { return _state.isInit(); } } }
java
public boolean toPostInit() { synchronized (this) { if (_state == STOPPED) { _state = INIT; _lastChangeTime = CurrentTime.currentTime(); notifyListeners(STOPPED, INIT); return true; } else { return _state.isInit(); } } }
[ "public", "boolean", "toPostInit", "(", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "_state", "==", "STOPPED", ")", "{", "_state", "=", "INIT", ";", "_lastChangeTime", "=", "CurrentTime", ".", "currentTime", "(", ")", ";", "notifyListeners"...
Changes to the init from the stopped state. @return true if the transition is allowed
[ "Changes", "to", "the", "init", "from", "the", "stopped", "state", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java#L463-L479
train
baratine/baratine
core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java
Lifecycle.toStarting
public boolean toStarting() { LifecycleState state; synchronized (this) { state = _state; if (state.isAfterStarting() && ! state.isStopped()) { return false; } _state = STARTING; _lastChangeTime = CurrentTime.currentTime(); if (_log != null && _log.is...
java
public boolean toStarting() { LifecycleState state; synchronized (this) { state = _state; if (state.isAfterStarting() && ! state.isStopped()) { return false; } _state = STARTING; _lastChangeTime = CurrentTime.currentTime(); if (_log != null && _log.is...
[ "public", "boolean", "toStarting", "(", ")", "{", "LifecycleState", "state", ";", "synchronized", "(", "this", ")", "{", "state", "=", "_state", ";", "if", "(", "state", ".", "isAfterStarting", "(", ")", "&&", "!", "state", ".", "isStopped", "(", ")", ...
Changes to the starting state. @return true if the transition is allowed
[ "Changes", "to", "the", "starting", "state", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java#L486-L509
train
baratine/baratine
core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java
Lifecycle.toActive
public boolean toActive() { LifecycleState state; synchronized (this) { state = _state; if (state.isAfterActive() && ! state.isStopped()) { return false; } _state = ACTIVE; _lastChangeTime = CurrentTime.currentTime(); } if (_log != null && _log.isLo...
java
public boolean toActive() { LifecycleState state; synchronized (this) { state = _state; if (state.isAfterActive() && ! state.isStopped()) { return false; } _state = ACTIVE; _lastChangeTime = CurrentTime.currentTime(); } if (_log != null && _log.isLo...
[ "public", "boolean", "toActive", "(", ")", "{", "LifecycleState", "state", ";", "synchronized", "(", "this", ")", "{", "state", "=", "_state", ";", "if", "(", "state", ".", "isAfterActive", "(", ")", "&&", "!", "state", ".", "isStopped", "(", ")", ")",...
Changes to the active state. @return true if the transition is allowed
[ "Changes", "to", "the", "active", "state", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java#L516-L538
train
baratine/baratine
core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java
Lifecycle.toFail
public boolean toFail() { LifecycleState state; synchronized (this) { state = _state; if (state.isAfterDestroying()) { return false; } _state = FAILED; _lastChangeTime = CurrentTime.currentTime(); } if (_log != null && _log.isLoggable(_level)) ...
java
public boolean toFail() { LifecycleState state; synchronized (this) { state = _state; if (state.isAfterDestroying()) { return false; } _state = FAILED; _lastChangeTime = CurrentTime.currentTime(); } if (_log != null && _log.isLoggable(_level)) ...
[ "public", "boolean", "toFail", "(", ")", "{", "LifecycleState", "state", ";", "synchronized", "(", "this", ")", "{", "state", "=", "_state", ";", "if", "(", "state", ".", "isAfterDestroying", "(", ")", ")", "{", "return", "false", ";", "}", "_state", "...
Changes to the failed state. @return true if the transition is allowed
[ "Changes", "to", "the", "failed", "state", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java#L562-L586
train
baratine/baratine
core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java
Lifecycle.toStopping
public boolean toStopping() { LifecycleState state; synchronized (this) { state = _state; if (state.isAfterStopping() || state.isStarting()) { return false; } _state = STOPPING; _lastChangeTime = CurrentTime.currentTime(); } if (_log != null &...
java
public boolean toStopping() { LifecycleState state; synchronized (this) { state = _state; if (state.isAfterStopping() || state.isStarting()) { return false; } _state = STOPPING; _lastChangeTime = CurrentTime.currentTime(); } if (_log != null &...
[ "public", "boolean", "toStopping", "(", ")", "{", "LifecycleState", "state", ";", "synchronized", "(", "this", ")", "{", "state", "=", "_state", ";", "if", "(", "state", ".", "isAfterStopping", "(", ")", "||", "state", ".", "isStarting", "(", ")", ")", ...
Changes to the stopping state. @return true if the transition is allowed
[ "Changes", "to", "the", "stopping", "state", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java#L593-L616
train
baratine/baratine
core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java
Lifecycle.addListener
public void addListener(LifecycleListener listener) { synchronized (this) { if (isDestroyed()) { IllegalStateException e = new IllegalStateException("attempted to add listener to a destroyed lifecyle " + this); if (_log != null) _log.log(Level.WARNING, e.toString(), e); el...
java
public void addListener(LifecycleListener listener) { synchronized (this) { if (isDestroyed()) { IllegalStateException e = new IllegalStateException("attempted to add listener to a destroyed lifecyle " + this); if (_log != null) _log.log(Level.WARNING, e.toString(), e); el...
[ "public", "void", "addListener", "(", "LifecycleListener", "listener", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "isDestroyed", "(", ")", ")", "{", "IllegalStateException", "e", "=", "new", "IllegalStateException", "(", "\"attempted to add listen...
Adds a listener to detect lifecycle changes.
[ "Adds", "a", "listener", "to", "detect", "lifecycle", "changes", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/lifecycle/Lifecycle.java#L720-L748
train
optimaize/anythingworks
common/src/main/java/com/optimaize/anythingworks/common/rest/JacksonJsonMarshaller.java
JacksonJsonMarshaller.serialize
@Override public String serialize(Object obj) throws JsonMarshallingException { try { return serializeChecked(obj); } catch (Exception e) { throw new JsonMarshallingException(e); } }
java
@Override public String serialize(Object obj) throws JsonMarshallingException { try { return serializeChecked(obj); } catch (Exception e) { throw new JsonMarshallingException(e); } }
[ "@", "Override", "public", "String", "serialize", "(", "Object", "obj", ")", "throws", "JsonMarshallingException", "{", "try", "{", "return", "serializeChecked", "(", "obj", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "throw", "new", "JsonMarsha...
Serialize the given Java object into JSON string.
[ "Serialize", "the", "given", "Java", "object", "into", "JSON", "string", "." ]
23e5f1c63cd56d935afaac4ad033c7996b32a1f2
https://github.com/optimaize/anythingworks/blob/23e5f1c63cd56d935afaac4ad033c7996b32a1f2/common/src/main/java/com/optimaize/anythingworks/common/rest/JacksonJsonMarshaller.java#L29-L36
train
baratine/baratine
core/src/main/java/com/caucho/v5/amp/thread/ThreadPool.java
ThreadPool.setExecutorTaskMax
public void setExecutorTaskMax(int max) { if (getThreadMax() < max) throw new ConfigException(L.l("<thread-executor-max> ({0}) must be less than <thread-max> ({1})", max, getThreadMax())); if (max == 0) throw new ConfigException(L.l("<thread-executor-max> must ...
java
public void setExecutorTaskMax(int max) { if (getThreadMax() < max) throw new ConfigException(L.l("<thread-executor-max> ({0}) must be less than <thread-max> ({1})", max, getThreadMax())); if (max == 0) throw new ConfigException(L.l("<thread-executor-max> must ...
[ "public", "void", "setExecutorTaskMax", "(", "int", "max", ")", "{", "if", "(", "getThreadMax", "(", ")", "<", "max", ")", "throw", "new", "ConfigException", "(", "L", ".", "l", "(", "\"<thread-executor-max> ({0}) must be less than <thread-max> ({1})\"", ",", "max...
Sets the maximum number of executor threads.
[ "Sets", "the", "maximum", "number", "of", "executor", "threads", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/amp/thread/ThreadPool.java#L132-L142
train
baratine/baratine
core/src/main/java/com/caucho/v5/amp/thread/ThreadPool.java
ThreadPool.scheduleExecutorTask
public boolean scheduleExecutorTask(Runnable task) { ClassLoader loader = Thread.currentThread().getContextClassLoader(); synchronized (_executorLock) { _executorTaskCount++; if (_executorTaskCount <= _executorTaskMax || _executorTaskMax < 0) { boolean isPriority = false; boolean...
java
public boolean scheduleExecutorTask(Runnable task) { ClassLoader loader = Thread.currentThread().getContextClassLoader(); synchronized (_executorLock) { _executorTaskCount++; if (_executorTaskCount <= _executorTaskMax || _executorTaskMax < 0) { boolean isPriority = false; boolean...
[ "public", "boolean", "scheduleExecutorTask", "(", "Runnable", "task", ")", "{", "ClassLoader", "loader", "=", "Thread", ".", "currentThread", "(", ")", ".", "getContextClassLoader", "(", ")", ";", "synchronized", "(", "_executorLock", ")", "{", "_executorTaskCount...
Schedules an executor task.
[ "Schedules", "an", "executor", "task", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/amp/thread/ThreadPool.java#L155-L182
train
baratine/baratine
core/src/main/java/com/caucho/v5/amp/thread/ThreadPool.java
ThreadPool.completeExecutorTask
public void completeExecutorTask() { ExecutorQueueItem item = null; synchronized (_executorLock) { _executorTaskCount--; assert(_executorTaskCount >= 0); if (_executorQueueHead != null) { item = _executorQueueHead; _executorQueueHead = item._next; if (_executorQu...
java
public void completeExecutorTask() { ExecutorQueueItem item = null; synchronized (_executorLock) { _executorTaskCount--; assert(_executorTaskCount >= 0); if (_executorQueueHead != null) { item = _executorQueueHead; _executorQueueHead = item._next; if (_executorQu...
[ "public", "void", "completeExecutorTask", "(", ")", "{", "ExecutorQueueItem", "item", "=", "null", ";", "synchronized", "(", "_executorLock", ")", "{", "_executorTaskCount", "--", ";", "assert", "(", "_executorTaskCount", ">=", "0", ")", ";", "if", "(", "_exec...
Called when an executor task completes
[ "Called", "when", "an", "executor", "task", "completes" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/amp/thread/ThreadPool.java#L187-L216
train
SeaCloudsEU/SeaCloudsPlatform
discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/OfferingManager.java
OfferingManager.getOffering
public Offering getOffering(String offeringName) { BasicDBObject query = new BasicDBObject("offering_name", offeringName); FindIterable<Document> cursor = this.offeringsCollection.find(query); return Offering.fromDB(cursor.first()); }
java
public Offering getOffering(String offeringName) { BasicDBObject query = new BasicDBObject("offering_name", offeringName); FindIterable<Document> cursor = this.offeringsCollection.find(query); return Offering.fromDB(cursor.first()); }
[ "public", "Offering", "getOffering", "(", "String", "offeringName", ")", "{", "BasicDBObject", "query", "=", "new", "BasicDBObject", "(", "\"offering_name\"", ",", "offeringName", ")", ";", "FindIterable", "<", "Document", ">", "cursor", "=", "this", ".", "offer...
Get an offering @param offeringName the name of the offering @return the offering identified by offeringId
[ "Get", "an", "offering" ]
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/OfferingManager.java#L53-L58
train
SeaCloudsEU/SeaCloudsPlatform
discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/OfferingManager.java
OfferingManager.addOffering
public String addOffering(Offering offering) { this.offeringsCollection.insertOne(offering.toDBObject()); this.offeringNames.add(offering.getName()); return offering.getName(); }
java
public String addOffering(Offering offering) { this.offeringsCollection.insertOne(offering.toDBObject()); this.offeringNames.add(offering.getName()); return offering.getName(); }
[ "public", "String", "addOffering", "(", "Offering", "offering", ")", "{", "this", ".", "offeringsCollection", ".", "insertOne", "(", "offering", ".", "toDBObject", "(", ")", ")", ";", "this", ".", "offeringNames", ".", "add", "(", "offering", ".", "getName",...
Add a new offering in the repository @param offering the Offering to add @return the id of the added Offering
[ "Add", "a", "new", "offering", "in", "the", "repository" ]
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/OfferingManager.java#L66-L70
train
SeaCloudsEU/SeaCloudsPlatform
discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/OfferingManager.java
OfferingManager.removeOffering
public boolean removeOffering(String offeringName) { if(offeringName == null) throw new NullPointerException("The parameter \"cloudOfferingId\" cannot be null."); BasicDBObject query = new BasicDBObject("offering_name", offeringName); Document removedOffering = this.offeringsCollect...
java
public boolean removeOffering(String offeringName) { if(offeringName == null) throw new NullPointerException("The parameter \"cloudOfferingId\" cannot be null."); BasicDBObject query = new BasicDBObject("offering_name", offeringName); Document removedOffering = this.offeringsCollect...
[ "public", "boolean", "removeOffering", "(", "String", "offeringName", ")", "{", "if", "(", "offeringName", "==", "null", ")", "throw", "new", "NullPointerException", "(", "\"The parameter \\\"cloudOfferingId\\\" cannot be null.\"", ")", ";", "BasicDBObject", "query", "=...
Remove an offering @param offeringName the name of the offering to remove @return
[ "Remove", "an", "offering" ]
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/OfferingManager.java#L78-L86
train
SeaCloudsEU/SeaCloudsPlatform
discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/OfferingManager.java
OfferingManager.initializeOfferings
public void initializeOfferings() { FindIterable<Document> offerings = this.offeringsCollection.find(); for (Document d : offerings) { offeringNames.add((String) d.get("offering_name")); } }
java
public void initializeOfferings() { FindIterable<Document> offerings = this.offeringsCollection.find(); for (Document d : offerings) { offeringNames.add((String) d.get("offering_name")); } }
[ "public", "void", "initializeOfferings", "(", ")", "{", "FindIterable", "<", "Document", ">", "offerings", "=", "this", ".", "offeringsCollection", ".", "find", "(", ")", ";", "for", "(", "Document", "d", ":", "offerings", ")", "{", "offeringNames", ".", "...
Initialize the list of offerings known by the discoverer
[ "Initialize", "the", "list", "of", "offerings", "known", "by", "the", "discoverer" ]
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/OfferingManager.java#L92-L98
train
SeaCloudsEU/SeaCloudsPlatform
discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/OfferingManager.java
OfferingManager.generateSingleOffering
public void generateSingleOffering(String offeringNodeTemplates) { this.removeOffering("0"); Offering singleOffering = new Offering("all"); singleOffering.toscaString = offeringNodeTemplates; this.addOffering(singleOffering); }
java
public void generateSingleOffering(String offeringNodeTemplates) { this.removeOffering("0"); Offering singleOffering = new Offering("all"); singleOffering.toscaString = offeringNodeTemplates; this.addOffering(singleOffering); }
[ "public", "void", "generateSingleOffering", "(", "String", "offeringNodeTemplates", ")", "{", "this", ".", "removeOffering", "(", "\"0\"", ")", ";", "Offering", "singleOffering", "=", "new", "Offering", "(", "\"all\"", ")", ";", "singleOffering", ".", "toscaString...
Generates a single offering file containing all node templates fetched @param offeringNodeTemplates node templates to write on file
[ "Generates", "a", "single", "offering", "file", "containing", "all", "node", "templates", "fetched" ]
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/OfferingManager.java#L105-L110
train
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JavaClass.java
JavaClass.getSuperClass
public JClass getSuperClass() { lazyLoad(); if (_superClass == null) return null; else return getClassLoader().forName(_superClass.replace('/', '.')); }
java
public JClass getSuperClass() { lazyLoad(); if (_superClass == null) return null; else return getClassLoader().forName(_superClass.replace('/', '.')); }
[ "public", "JClass", "getSuperClass", "(", ")", "{", "lazyLoad", "(", ")", ";", "if", "(", "_superClass", "==", "null", ")", "return", "null", ";", "else", "return", "getClassLoader", "(", ")", ".", "forName", "(", "_superClass", ".", "replace", "(", "'",...
Gets the super class name.
[ "Gets", "the", "super", "class", "name", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaClass.java#L224-L232
train
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JavaClass.java
JavaClass.addInterface
public void addInterface(String className) { _interfaces.add(className); if (_isWrite) getConstantPool().addClass(className); }
java
public void addInterface(String className) { _interfaces.add(className); if (_isWrite) getConstantPool().addClass(className); }
[ "public", "void", "addInterface", "(", "String", "className", ")", "{", "_interfaces", ".", "add", "(", "className", ")", ";", "if", "(", "_isWrite", ")", "getConstantPool", "(", ")", ".", "addClass", "(", "className", ")", ";", "}" ]
Adds an interface.
[ "Adds", "an", "interface", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaClass.java#L274-L280
train
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JavaClass.java
JavaClass.getInterfaces
public JClass []getInterfaces() { lazyLoad(); JClass []interfaces = new JClass[_interfaces.size()]; for (int i = 0; i < _interfaces.size(); i++) { String name = _interfaces.get(i); name = name.replace('/', '.'); interfaces[i] = getClassLoader().forName(name); } ...
java
public JClass []getInterfaces() { lazyLoad(); JClass []interfaces = new JClass[_interfaces.size()]; for (int i = 0; i < _interfaces.size(); i++) { String name = _interfaces.get(i); name = name.replace('/', '.'); interfaces[i] = getClassLoader().forName(name); } ...
[ "public", "JClass", "[", "]", "getInterfaces", "(", ")", "{", "lazyLoad", "(", ")", ";", "JClass", "[", "]", "interfaces", "=", "new", "JClass", "[", "_interfaces", ".", "size", "(", ")", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<",...
Gets the interfaces.
[ "Gets", "the", "interfaces", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaClass.java#L293-L307
train
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JavaClass.java
JavaClass.getField
public JavaField getField(String name) { ArrayList<JavaField> fieldList = getFieldList(); for (int i = 0; i < fieldList.size(); i++) { JavaField field = fieldList.get(i); if (field.getName().equals(name)) return field; } return null; }
java
public JavaField getField(String name) { ArrayList<JavaField> fieldList = getFieldList(); for (int i = 0; i < fieldList.size(); i++) { JavaField field = fieldList.get(i); if (field.getName().equals(name)) return field; } return null; }
[ "public", "JavaField", "getField", "(", "String", "name", ")", "{", "ArrayList", "<", "JavaField", ">", "fieldList", "=", "getFieldList", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "fieldList", ".", "size", "(", ")", ";", "i", ...
Returns a fields.
[ "Returns", "a", "fields", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaClass.java#L352-L364
train
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JavaClass.java
JavaClass.getMethod
public JavaMethod getMethod(String name) { ArrayList<JavaMethod> methodList = getMethodList(); for (int i = 0; i < methodList.size(); i++) { JavaMethod method = methodList.get(i); if (method.getName().equals(name)) return method; } return null; }
java
public JavaMethod getMethod(String name) { ArrayList<JavaMethod> methodList = getMethodList(); for (int i = 0; i < methodList.size(); i++) { JavaMethod method = methodList.get(i); if (method.getName().equals(name)) return method; } return null; }
[ "public", "JavaMethod", "getMethod", "(", "String", "name", ")", "{", "ArrayList", "<", "JavaMethod", ">", "methodList", "=", "getMethodList", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "methodList", ".", "size", "(", ")", ";", "...
Returns a method.
[ "Returns", "a", "method", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaClass.java#L427-L439
train
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JavaClass.java
JavaClass.findMethod
public JavaMethod findMethod(String name, String descriptor) { ArrayList<JavaMethod> methodList = getMethodList(); for (int i = 0; i < methodList.size(); i++) { JavaMethod method = methodList.get(i); if (method.getName().equals(name) && method.getDescriptor().equals(descriptor)) ...
java
public JavaMethod findMethod(String name, String descriptor) { ArrayList<JavaMethod> methodList = getMethodList(); for (int i = 0; i < methodList.size(); i++) { JavaMethod method = methodList.get(i); if (method.getName().equals(name) && method.getDescriptor().equals(descriptor)) ...
[ "public", "JavaMethod", "findMethod", "(", "String", "name", ",", "String", "descriptor", ")", "{", "ArrayList", "<", "JavaMethod", ">", "methodList", "=", "getMethodList", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "methodList", "."...
Finds a method.
[ "Finds", "a", "method", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaClass.java#L444-L457
train
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JavaClass.java
JavaClass.getDeclaredFields
public JField []getDeclaredFields() { ArrayList<JavaField> fieldList = getFieldList(); JField[] fields = new JField[fieldList.size()]; fieldList.toArray(fields); return fields; }
java
public JField []getDeclaredFields() { ArrayList<JavaField> fieldList = getFieldList(); JField[] fields = new JField[fieldList.size()]; fieldList.toArray(fields); return fields; }
[ "public", "JField", "[", "]", "getDeclaredFields", "(", ")", "{", "ArrayList", "<", "JavaField", ">", "fieldList", "=", "getFieldList", "(", ")", ";", "JField", "[", "]", "fields", "=", "new", "JField", "[", "fieldList", ".", "size", "(", ")", "]", ";"...
Returns the array of declared fields.
[ "Returns", "the", "array", "of", "declared", "fields", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaClass.java#L683-L692
train
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JavaClass.java
JavaClass.getFields
public JField []getFields() { ArrayList<JField> fieldList = new ArrayList<JField>(); getFields(fieldList); JField []fields = new JField[fieldList.size()]; fieldList.toArray(fields); return fields; }
java
public JField []getFields() { ArrayList<JField> fieldList = new ArrayList<JField>(); getFields(fieldList); JField []fields = new JField[fieldList.size()]; fieldList.toArray(fields); return fields; }
[ "public", "JField", "[", "]", "getFields", "(", ")", "{", "ArrayList", "<", "JField", ">", "fieldList", "=", "new", "ArrayList", "<", "JField", ">", "(", ")", ";", "getFields", "(", "fieldList", ")", ";", "JField", "[", "]", "fields", "=", "new", "JF...
Returns the array of fields.
[ "Returns", "the", "array", "of", "fields", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaClass.java#L697-L707
train
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JavaClass.java
JavaClass.getFields
private void getFields(ArrayList<JField> fieldList) { for (JField field : getDeclaredFields()) { if (! fieldList.contains(field)) fieldList.add(field); } if (getSuperClass() != null) { for (JField field : getSuperClass().getFields()) { if (! fieldList.contains(field)) ...
java
private void getFields(ArrayList<JField> fieldList) { for (JField field : getDeclaredFields()) { if (! fieldList.contains(field)) fieldList.add(field); } if (getSuperClass() != null) { for (JField field : getSuperClass().getFields()) { if (! fieldList.contains(field)) ...
[ "private", "void", "getFields", "(", "ArrayList", "<", "JField", ">", "fieldList", ")", "{", "for", "(", "JField", "field", ":", "getDeclaredFields", "(", ")", ")", "{", "if", "(", "!", "fieldList", ".", "contains", "(", "field", ")", ")", "fieldList", ...
Returns all the fields
[ "Returns", "all", "the", "fields" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaClass.java#L712-L725
train
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JavaClass.java
JavaClass.lazyLoad
private void lazyLoad() { if (_major > 0) return; try { if (_url == null) throw new IllegalStateException(); try (InputStream is = _url.openStream()) { //ReadStream rs = VfsOld.openRead(is); _major = 1; ByteCodeParser parser = new ByteCodeParser(); ...
java
private void lazyLoad() { if (_major > 0) return; try { if (_url == null) throw new IllegalStateException(); try (InputStream is = _url.openStream()) { //ReadStream rs = VfsOld.openRead(is); _major = 1; ByteCodeParser parser = new ByteCodeParser(); ...
[ "private", "void", "lazyLoad", "(", ")", "{", "if", "(", "_major", ">", "0", ")", "return", ";", "try", "{", "if", "(", "_url", "==", "null", ")", "throw", "new", "IllegalStateException", "(", ")", ";", "try", "(", "InputStream", "is", "=", "_url", ...
Lazily load the class.
[ "Lazily", "load", "the", "class", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaClass.java#L776-L800
train
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JavaClass.java
JavaClass.write
public void write(OutputStream os) throws IOException { ByteCodeWriter out = new ByteCodeWriter(os, this); out.writeInt(MAGIC); out.writeShort(_minor); out.writeShort(_major); _constantPool.write(out); out.writeShort(_accessFlags); out.writeClass(_thisClass); out.writeClass(_sup...
java
public void write(OutputStream os) throws IOException { ByteCodeWriter out = new ByteCodeWriter(os, this); out.writeInt(MAGIC); out.writeShort(_minor); out.writeShort(_major); _constantPool.write(out); out.writeShort(_accessFlags); out.writeClass(_thisClass); out.writeClass(_sup...
[ "public", "void", "write", "(", "OutputStream", "os", ")", "throws", "IOException", "{", "ByteCodeWriter", "out", "=", "new", "ByteCodeWriter", "(", "os", ",", "this", ")", ";", "out", ".", "writeInt", "(", "MAGIC", ")", ";", "out", ".", "writeShort", "(...
Writes the class to the output.
[ "Writes", "the", "class", "to", "the", "output", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaClass.java#L805-L847
train
baratine/baratine
web/src/main/java/com/caucho/v5/http/dispatch/InvocationManager.java
InvocationManager.getInvocation
public final I getInvocation(Object protocolKey) { I invocation = null; // XXX: see if can remove this LruCache<Object,I> invocationCache = _invocationCache; if (invocationCache != null) { invocation = invocationCache.get(protocolKey); } if (invocation == null) { return null; ...
java
public final I getInvocation(Object protocolKey) { I invocation = null; // XXX: see if can remove this LruCache<Object,I> invocationCache = _invocationCache; if (invocationCache != null) { invocation = invocationCache.get(protocolKey); } if (invocation == null) { return null; ...
[ "public", "final", "I", "getInvocation", "(", "Object", "protocolKey", ")", "{", "I", "invocation", "=", "null", ";", "// XXX: see if can remove this", "LruCache", "<", "Object", ",", "I", ">", "invocationCache", "=", "_invocationCache", ";", "if", "(", "invocat...
Returns the cached invocation.
[ "Returns", "the", "cached", "invocation", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/dispatch/InvocationManager.java#L121-L141
train
baratine/baratine
web/src/main/java/com/caucho/v5/http/dispatch/InvocationManager.java
InvocationManager.buildInvocation
public I buildInvocation(Object protocolKey, I invocation) throws ConfigException { Objects.requireNonNull(invocation); invocation = buildInvocation(invocation); // XXX: see if can remove this, and rely on the invocation cache existing LruCache<Object,I> invocationCache = _invocationCache; ...
java
public I buildInvocation(Object protocolKey, I invocation) throws ConfigException { Objects.requireNonNull(invocation); invocation = buildInvocation(invocation); // XXX: see if can remove this, and rely on the invocation cache existing LruCache<Object,I> invocationCache = _invocationCache; ...
[ "public", "I", "buildInvocation", "(", "Object", "protocolKey", ",", "I", "invocation", ")", "throws", "ConfigException", "{", "Objects", ".", "requireNonNull", "(", "invocation", ")", ";", "invocation", "=", "buildInvocation", "(", "invocation", ")", ";", "// X...
Builds the invocation, saving its value keyed by the protocol key. @param protocolKey protocol-specific key to save the invocation in @param invocation the invocation to build.
[ "Builds", "the", "invocation", "saving", "its", "value", "keyed", "by", "the", "protocol", "key", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/dispatch/InvocationManager.java#L157-L182
train
baratine/baratine
web/src/main/java/com/caucho/v5/http/dispatch/InvocationManager.java
InvocationManager.clearCache
public void clearCache() { // XXX: see if can remove this, and rely on the invocation cache existing LruCache<Object,I> invocationCache = _invocationCache; if (invocationCache != null) { invocationCache.clear(); } }
java
public void clearCache() { // XXX: see if can remove this, and rely on the invocation cache existing LruCache<Object,I> invocationCache = _invocationCache; if (invocationCache != null) { invocationCache.clear(); } }
[ "public", "void", "clearCache", "(", ")", "{", "// XXX: see if can remove this, and rely on the invocation cache existing", "LruCache", "<", "Object", ",", "I", ">", "invocationCache", "=", "_invocationCache", ";", "if", "(", "invocationCache", "!=", "null", ")", "{", ...
Clears the invocation cache.
[ "Clears", "the", "invocation", "cache", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/dispatch/InvocationManager.java#L196-L204
train
baratine/baratine
web/src/main/java/com/caucho/v5/http/dispatch/InvocationManager.java
InvocationManager.getInvocations
public ArrayList<I> getInvocations() { LruCache<Object,I> invocationCache = _invocationCache; ArrayList<I> invocationList = new ArrayList<>(); synchronized (invocationCache) { Iterator<I> iter; iter = invocationCache.values(); while (iter.hasNext()) { invocationList.add(...
java
public ArrayList<I> getInvocations() { LruCache<Object,I> invocationCache = _invocationCache; ArrayList<I> invocationList = new ArrayList<>(); synchronized (invocationCache) { Iterator<I> iter; iter = invocationCache.values(); while (iter.hasNext()) { invocationList.add(...
[ "public", "ArrayList", "<", "I", ">", "getInvocations", "(", ")", "{", "LruCache", "<", "Object", ",", "I", ">", "invocationCache", "=", "_invocationCache", ";", "ArrayList", "<", "I", ">", "invocationList", "=", "new", "ArrayList", "<>", "(", ")", ";", ...
Returns the invocations.
[ "Returns", "the", "invocations", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/dispatch/InvocationManager.java#L209-L225
train
baratine/baratine
framework/src/main/java/com/caucho/v5/loader/JarEntry.java
JarEntry.loadManifest
private void loadManifest() { if (_isManifestRead) return; synchronized (this) { if (_isManifestRead) return; try { _manifest = _jarPath.getManifest(); if (_manifest == null) return; Attributes attr = _manifest.getMainAttributes(); if ...
java
private void loadManifest() { if (_isManifestRead) return; synchronized (this) { if (_isManifestRead) return; try { _manifest = _jarPath.getManifest(); if (_manifest == null) return; Attributes attr = _manifest.getMainAttributes(); if ...
[ "private", "void", "loadManifest", "(", ")", "{", "if", "(", "_isManifestRead", ")", "return", ";", "synchronized", "(", "this", ")", "{", "if", "(", "_isManifestRead", ")", "return", ";", "try", "{", "_manifest", "=", "_jarPath", ".", "getManifest", "(", ...
Reads the jar's manifest.
[ "Reads", "the", "jar", "s", "manifest", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/loader/JarEntry.java#L87-L122
train
baratine/baratine
framework/src/main/java/com/caucho/v5/loader/JarEntry.java
JarEntry.addManifestPackage
private void addManifestPackage(String name, Attributes attr) { // only add packages if (! name.endsWith("/") && ! name.equals("")) return; String specTitle = attr.getValue("Specification-Title"); String specVersion = attr.getValue("Specification-Version"); String specVendor = attr.getValue...
java
private void addManifestPackage(String name, Attributes attr) { // only add packages if (! name.endsWith("/") && ! name.equals("")) return; String specTitle = attr.getValue("Specification-Title"); String specVersion = attr.getValue("Specification-Version"); String specVendor = attr.getValue...
[ "private", "void", "addManifestPackage", "(", "String", "name", ",", "Attributes", "attr", ")", "{", "// only add packages", "if", "(", "!", "name", ".", "endsWith", "(", "\"/\"", ")", "&&", "!", "name", ".", "equals", "(", "\"\"", ")", ")", "return", ";...
Adds package information from the manifest.
[ "Adds", "package", "information", "from", "the", "manifest", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/loader/JarEntry.java#L127-L154
train
baratine/baratine
framework/src/main/java/com/caucho/v5/loader/JarEntry.java
JarEntry.validate
public void validate() throws ConfigException { loadManifest(); if (_manifest != null) validateManifest(_jarPath.getContainer().getURL(), _manifest); }
java
public void validate() throws ConfigException { loadManifest(); if (_manifest != null) validateManifest(_jarPath.getContainer().getURL(), _manifest); }
[ "public", "void", "validate", "(", ")", "throws", "ConfigException", "{", "loadManifest", "(", ")", ";", "if", "(", "_manifest", "!=", "null", ")", "validateManifest", "(", "_jarPath", ".", "getContainer", "(", ")", ".", "getURL", "(", ")", ",", "_manifest...
Validates the jar.
[ "Validates", "the", "jar", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/loader/JarEntry.java#L159-L166
train
baratine/baratine
framework/src/main/java/com/caucho/v5/loader/JarEntry.java
JarEntry.validateManifest
public static void validateManifest(String manifestName, Manifest manifest) throws ConfigException { Attributes attr = manifest.getMainAttributes(); if (attr == null) return; String extList = attr.getValue("Extension-List"); if (extList == null) return; Pattern pattern = Pattern....
java
public static void validateManifest(String manifestName, Manifest manifest) throws ConfigException { Attributes attr = manifest.getMainAttributes(); if (attr == null) return; String extList = attr.getValue("Extension-List"); if (extList == null) return; Pattern pattern = Pattern....
[ "public", "static", "void", "validateManifest", "(", "String", "manifestName", ",", "Manifest", "manifest", ")", "throws", "ConfigException", "{", "Attributes", "attr", "=", "manifest", ".", "getMainAttributes", "(", ")", ";", "if", "(", "attr", "==", "null", ...
Validates the manifest.
[ "Validates", "the", "manifest", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/loader/JarEntry.java#L171-L215
train
baratine/baratine
framework/src/main/java/com/caucho/v5/loader/JarEntry.java
JarEntry.getCodeSource
public CodeSource getCodeSource(String path) { try { PathImpl jarPath = _jarPath.lookup(path); Certificate []certificates = jarPath.getCertificates(); URL url = new URL(_jarPath.getContainer().getURL()); return new CodeSource(url, certificates); } catch (Exception e) { ...
java
public CodeSource getCodeSource(String path) { try { PathImpl jarPath = _jarPath.lookup(path); Certificate []certificates = jarPath.getCertificates(); URL url = new URL(_jarPath.getContainer().getURL()); return new CodeSource(url, certificates); } catch (Exception e) { ...
[ "public", "CodeSource", "getCodeSource", "(", "String", "path", ")", "{", "try", "{", "PathImpl", "jarPath", "=", "_jarPath", ".", "lookup", "(", "path", ")", ";", "Certificate", "[", "]", "certificates", "=", "jarPath", ".", "getCertificates", "(", ")", "...
Returns the code source.
[ "Returns", "the", "code", "source", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/loader/JarEntry.java#L246-L261
train
SeaCloudsEU/SeaCloudsPlatform
sla/sla-core/sla-enforcement/src/main/java/eu/atos/sla/evaluation/guarantee/GuaranteeTermEvaluator.java
GuaranteeTermEvaluator.evaluate
public GuaranteeTermEvaluationResult evaluate( IAgreement agreement, IGuaranteeTerm term, List<IMonitoringMetric> metrics, Date now) { /* * throws NullPointerException if not property initialized */ checkInitialized(); logger.debug("evaluate(a...
java
public GuaranteeTermEvaluationResult evaluate( IAgreement agreement, IGuaranteeTerm term, List<IMonitoringMetric> metrics, Date now) { /* * throws NullPointerException if not property initialized */ checkInitialized(); logger.debug("evaluate(a...
[ "public", "GuaranteeTermEvaluationResult", "evaluate", "(", "IAgreement", "agreement", ",", "IGuaranteeTerm", "term", ",", "List", "<", "IMonitoringMetric", ">", "metrics", ",", "Date", "now", ")", "{", "/*\n * throws NullPointerException if not property initialized \...
Evaluate violations and penalties for a given guarantee term and a list of metrics. @param agreement that contains the term to evaluate @param term guarantee term to evaluate @param metrics list of metrics to evaluated if fulfill the service level of the term. @param now the evaluation period ends at <code>now</code>.
[ "Evaluate", "violations", "and", "penalties", "for", "a", "given", "guarantee", "term", "and", "a", "list", "of", "metrics", "." ]
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/sla/sla-core/sla-enforcement/src/main/java/eu/atos/sla/evaluation/guarantee/GuaranteeTermEvaluator.java#L88-L107
train
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/InChunked.java
InChunked.read
@Override public int read(byte []buf, int offset, int len) throws IOException { int available = _available; // The chunk still has more data left if (available > 0) { len = Math.min(len, available); len = _next.read(buf, offset, len); if (len > 0) { _available -= len; ...
java
@Override public int read(byte []buf, int offset, int len) throws IOException { int available = _available; // The chunk still has more data left if (available > 0) { len = Math.min(len, available); len = _next.read(buf, offset, len); if (len > 0) { _available -= len; ...
[ "@", "Override", "public", "int", "read", "(", "byte", "[", "]", "buf", ",", "int", "offset", ",", "int", "len", ")", "throws", "IOException", "{", "int", "available", "=", "_available", ";", "// The chunk still has more data left", "if", "(", "available", "...
Reads more data from the input stream.
[ "Reads", "more", "data", "from", "the", "input", "stream", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/InChunked.java#L90-L129
train
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/InChunked.java
InChunked.readChunkLength
private int readChunkLength() throws IOException { int length = 0; int ch; ReadStream is = _next; // skip whitespace for (ch = is.read(); ch == ' ' || ch == '\t' || ch == '\r' || ch == '\n'; ch = is.read()) { } // XXX: This doesn't properly handle the case when whe...
java
private int readChunkLength() throws IOException { int length = 0; int ch; ReadStream is = _next; // skip whitespace for (ch = is.read(); ch == ' ' || ch == '\t' || ch == '\r' || ch == '\n'; ch = is.read()) { } // XXX: This doesn't properly handle the case when whe...
[ "private", "int", "readChunkLength", "(", ")", "throws", "IOException", "{", "int", "length", "=", "0", ";", "int", "ch", ";", "ReadStream", "is", "=", "_next", ";", "// skip whitespace", "for", "(", "ch", "=", "is", ".", "read", "(", ")", ";", "ch", ...
Reads the next chunk length from the input stream.
[ "Reads", "the", "next", "chunk", "length", "from", "the", "input", "stream", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/InChunked.java#L134-L182
train
SeaCloudsEU/SeaCloudsPlatform
sla/sla-core/sla-service/src/main/java/eu/atos/sla/service/rest/SeacloudsRest.java
SeacloudsRest.getSlaUrl
private String getSlaUrl(String envSlaUrl, UriInfo uriInfo) { String baseUrl = uriInfo.getBaseUri().toString(); if (envSlaUrl == null) { envSlaUrl = ""; } String result = ("".equals(envSlaUrl))? baseUrl : envSlaUrl; logger.debug("getSlaUrl(env={}, supp...
java
private String getSlaUrl(String envSlaUrl, UriInfo uriInfo) { String baseUrl = uriInfo.getBaseUri().toString(); if (envSlaUrl == null) { envSlaUrl = ""; } String result = ("".equals(envSlaUrl))? baseUrl : envSlaUrl; logger.debug("getSlaUrl(env={}, supp...
[ "private", "String", "getSlaUrl", "(", "String", "envSlaUrl", ",", "UriInfo", "uriInfo", ")", "{", "String", "baseUrl", "=", "uriInfo", ".", "getBaseUri", "(", ")", ".", "toString", "(", ")", ";", "if", "(", "envSlaUrl", "==", "null", ")", "{", "envSlaUr...
Returns base url of the sla core. If the SLA_URL env var is set, returns that value. Else, get the base url from the context of the current REST call. This second value may be wrong because this base url must be the value that the MonitoringPlatform needs to use to connect to the SLA Core.
[ "Returns", "base", "url", "of", "the", "sla", "core", "." ]
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/sla/sla-core/sla-service/src/main/java/eu/atos/sla/service/rest/SeacloudsRest.java#L372-L382
train
SeaCloudsEU/SeaCloudsPlatform
sla/sla-core/sla-service/src/main/java/eu/atos/sla/service/rest/SeacloudsRest.java
SeacloudsRest.getMetricsBaseUrl
private String getMetricsBaseUrl(String suppliedBaseUrl, String envBaseUrl) { String result = ("".equals(suppliedBaseUrl))? envBaseUrl : suppliedBaseUrl; logger.debug("getMetricsBaseUrl(env={}, supplied={}) = {}", envBaseUrl, suppliedBaseUrl, result); return result; }
java
private String getMetricsBaseUrl(String suppliedBaseUrl, String envBaseUrl) { String result = ("".equals(suppliedBaseUrl))? envBaseUrl : suppliedBaseUrl; logger.debug("getMetricsBaseUrl(env={}, supplied={}) = {}", envBaseUrl, suppliedBaseUrl, result); return result; }
[ "private", "String", "getMetricsBaseUrl", "(", "String", "suppliedBaseUrl", ",", "String", "envBaseUrl", ")", "{", "String", "result", "=", "(", "\"\"", ".", "equals", "(", "suppliedBaseUrl", ")", ")", "?", "envBaseUrl", ":", "suppliedBaseUrl", ";", "logger", ...
Return base url of the metrics endpoint of the Monitoring Platform. If an url is supplied in the request, use that value. Else, use MODACLOUDS_METRICS_URL env var is set.
[ "Return", "base", "url", "of", "the", "metrics", "endpoint", "of", "the", "Monitoring", "Platform", "." ]
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/sla/sla-core/sla-service/src/main/java/eu/atos/sla/service/rest/SeacloudsRest.java#L389-L395
train
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/StreamImplInputStream.java
StreamImplInputStream.read
public int read(byte []buffer, int offset, int length) throws IOException { return _stream.read(buffer, offset, length); }
java
public int read(byte []buffer, int offset, int length) throws IOException { return _stream.read(buffer, offset, length); }
[ "public", "int", "read", "(", "byte", "[", "]", "buffer", ",", "int", "offset", ",", "int", "length", ")", "throws", "IOException", "{", "return", "_stream", ".", "read", "(", "buffer", ",", "offset", ",", "length", ")", ";", "}" ]
Reads a buffer to the underlying stream. @param buffer the byte array to write. @param offset the offset into the byte array. @param length the number of bytes to write.
[ "Reads", "a", "buffer", "to", "the", "underlying", "stream", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/StreamImplInputStream.java#L73-L77
train
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/FilesystemPath.java
FilesystemPath.getParent
@Override public PathImpl getParent() { if (_pathname.length() <= 1) return lookup("/"); int length = _pathname.length(); int lastSlash = _pathname.lastIndexOf('/'); if (lastSlash < 1) return lookup("/"); if (lastSlash == length - 1) { lastSlash = _pathname.lastIndexOf('/', ...
java
@Override public PathImpl getParent() { if (_pathname.length() <= 1) return lookup("/"); int length = _pathname.length(); int lastSlash = _pathname.lastIndexOf('/'); if (lastSlash < 1) return lookup("/"); if (lastSlash == length - 1) { lastSlash = _pathname.lastIndexOf('/', ...
[ "@", "Override", "public", "PathImpl", "getParent", "(", ")", "{", "if", "(", "_pathname", ".", "length", "(", ")", "<=", "1", ")", "return", "lookup", "(", "\"/\"", ")", ";", "int", "length", "=", "_pathname", ".", "length", "(", ")", ";", "int", ...
Return the parent Path
[ "Return", "the", "parent", "Path" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/FilesystemPath.java#L82-L101
train
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/FilesystemPath.java
FilesystemPath.normalizePath
static protected String normalizePath(String oldPath, String newPath, int offset, char separatorChar) { CharBuffer cb = new CharBuffer(); normalizePath(cb, oldPath, newPath, offset, separato...
java
static protected String normalizePath(String oldPath, String newPath, int offset, char separatorChar) { CharBuffer cb = new CharBuffer(); normalizePath(cb, oldPath, newPath, offset, separato...
[ "static", "protected", "String", "normalizePath", "(", "String", "oldPath", ",", "String", "newPath", ",", "int", "offset", ",", "char", "separatorChar", ")", "{", "CharBuffer", "cb", "=", "new", "CharBuffer", "(", ")", ";", "normalizePath", "(", "cb", ",", ...
wrapper for the real normalize path routine to use CharBuffer. @param oldPath The parent Path's path @param newPath The user's new path @param offset Offset into the user path @return the normalized path
[ "wrapper", "for", "the", "real", "normalize", "path", "routine", "to", "use", "CharBuffer", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/FilesystemPath.java#L153-L161
train
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/FilesystemPath.java
FilesystemPath.normalizePath
static protected void normalizePath(CharBuffer cb, String oldPath, String newPath, int offset, char separatorChar) { cb.clear(); cb.append(oldPath); if (cb.length() == 0 || cb.lastChar() != '/') cb.append('/'); int leng...
java
static protected void normalizePath(CharBuffer cb, String oldPath, String newPath, int offset, char separatorChar) { cb.clear(); cb.append(oldPath); if (cb.length() == 0 || cb.lastChar() != '/') cb.append('/'); int leng...
[ "static", "protected", "void", "normalizePath", "(", "CharBuffer", "cb", ",", "String", "oldPath", ",", "String", "newPath", ",", "int", "offset", ",", "char", "separatorChar", ")", "{", "cb", ".", "clear", "(", ")", ";", "cb", ".", "append", "(", "oldPa...
Normalizes a filesystemPath path. <ul> <li>foo//bar -> foo/bar <li>foo/./bar -> foo/bar <li>foo/../bar -> bar <li>/../bar -> /bar </ul> @param cb charBuffer holding the normalized result @param oldPath the parent path @param newPath the relative path @param offset where in the child path to start
[ "Normalizes", "a", "filesystemPath", "path", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/FilesystemPath.java#L178-L264
train
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/FilesystemPath.java
FilesystemPath.getFullPath
public String getFullPath() { if (_root == this || _root == null) return getPath(); String rootPath = _root.getFullPath(); String path = getPath(); if (rootPath.length() <= 1) return path; else if (path.length() <= 1) return rootPath; else return rootPath + path; }
java
public String getFullPath() { if (_root == this || _root == null) return getPath(); String rootPath = _root.getFullPath(); String path = getPath(); if (rootPath.length() <= 1) return path; else if (path.length() <= 1) return rootPath; else return rootPath + path; }
[ "public", "String", "getFullPath", "(", ")", "{", "if", "(", "_root", "==", "this", "||", "_root", "==", "null", ")", "return", "getPath", "(", ")", ";", "String", "rootPath", "=", "_root", ".", "getFullPath", "(", ")", ";", "String", "path", "=", "g...
For chrooted filesystems return the real system path.
[ "For", "chrooted", "filesystems", "return", "the", "real", "system", "path", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/FilesystemPath.java#L300-L314
train
baratine/baratine
api/src/main/java/io/baratine/jdbc/JdbcRow.java
JdbcRow.getClass
public Class<?> getClass(int index) { Object value = _values[index - 1]; if (value == null) { return null; } else { return value.getClass(); } }
java
public Class<?> getClass(int index) { Object value = _values[index - 1]; if (value == null) { return null; } else { return value.getClass(); } }
[ "public", "Class", "<", "?", ">", "getClass", "(", "int", "index", ")", "{", "Object", "value", "=", "_values", "[", "index", "-", "1", "]", ";", "if", "(", "value", "==", "null", ")", "{", "return", "null", ";", "}", "else", "{", "return", "valu...
Returns the class of the column. @param index 1-based @return class of column
[ "Returns", "the", "class", "of", "the", "column", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/api/src/main/java/io/baratine/jdbc/JdbcRow.java#L66-L76
train
baratine/baratine
api/src/main/java/io/baratine/jdbc/JdbcRow.java
JdbcRow.getString
public String getString(int index) { Object value = _values[index - 1]; if (value != null) { return value.toString(); } else { return null; } }
java
public String getString(int index) { Object value = _values[index - 1]; if (value != null) { return value.toString(); } else { return null; } }
[ "public", "String", "getString", "(", "int", "index", ")", "{", "Object", "value", "=", "_values", "[", "index", "-", "1", "]", ";", "if", "(", "value", "!=", "null", ")", "{", "return", "value", ".", "toString", "(", ")", ";", "}", "else", "{", ...
Returns the column as a String. @param index 1-based @return column as a String
[ "Returns", "the", "column", "as", "a", "String", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/api/src/main/java/io/baratine/jdbc/JdbcRow.java#L95-L105
train
baratine/baratine
api/src/main/java/io/baratine/jdbc/JdbcRow.java
JdbcRow.getLong
public long getLong(int index) { Object value = _values[index - 1]; if (value instanceof Long) { return (Long) value; } else if (value instanceof Integer) { return (Integer) value; } else { return Long.valueOf(value.toString()); } }
java
public long getLong(int index) { Object value = _values[index - 1]; if (value instanceof Long) { return (Long) value; } else if (value instanceof Integer) { return (Integer) value; } else { return Long.valueOf(value.toString()); } }
[ "public", "long", "getLong", "(", "int", "index", ")", "{", "Object", "value", "=", "_values", "[", "index", "-", "1", "]", ";", "if", "(", "value", "instanceof", "Long", ")", "{", "return", "(", "Long", ")", "value", ";", "}", "else", "if", "(", ...
Returns the column as a long. @param index 1-based @return column as a long
[ "Returns", "the", "column", "as", "a", "long", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/api/src/main/java/io/baratine/jdbc/JdbcRow.java#L113-L126
train
baratine/baratine
api/src/main/java/io/baratine/jdbc/JdbcRow.java
JdbcRow.getDouble
public double getDouble(int index) { Object value = _values[index - 1]; if (value instanceof Double) { return (Double) value; } else if (value instanceof Float) { return (Float) value; } else if (value instanceof Number) { return (Double) ((Number) value); } else { ...
java
public double getDouble(int index) { Object value = _values[index - 1]; if (value instanceof Double) { return (Double) value; } else if (value instanceof Float) { return (Float) value; } else if (value instanceof Number) { return (Double) ((Number) value); } else { ...
[ "public", "double", "getDouble", "(", "int", "index", ")", "{", "Object", "value", "=", "_values", "[", "index", "-", "1", "]", ";", "if", "(", "value", "instanceof", "Double", ")", "{", "return", "(", "Double", ")", "value", ";", "}", "else", "if", ...
Returns the column as a double. @param index 1-based @return column as a double
[ "Returns", "the", "column", "as", "a", "double", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/api/src/main/java/io/baratine/jdbc/JdbcRow.java#L134-L150
train
baratine/baratine
api/src/main/java/io/baratine/jdbc/JdbcRow.java
JdbcRow.getBoolean
public boolean getBoolean(int index) { Object value = _values[index - 1]; if (value instanceof Boolean) { return (Boolean) value; } else { return Boolean.valueOf(value.toString()); } }
java
public boolean getBoolean(int index) { Object value = _values[index - 1]; if (value instanceof Boolean) { return (Boolean) value; } else { return Boolean.valueOf(value.toString()); } }
[ "public", "boolean", "getBoolean", "(", "int", "index", ")", "{", "Object", "value", "=", "_values", "[", "index", "-", "1", "]", ";", "if", "(", "value", "instanceof", "Boolean", ")", "{", "return", "(", "Boolean", ")", "value", ";", "}", "else", "{...
Returns the column as a boolean. @param index 1-based @return column as a boolean
[ "Returns", "the", "column", "as", "a", "boolean", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/api/src/main/java/io/baratine/jdbc/JdbcRow.java#L158-L168
train
baratine/baratine
kraken/src/main/java/com/caucho/v5/kelp/Page.java
Page.writeCheckpoint
@InService(SegmentServiceImpl.class) public Page writeCheckpoint(TableKelp table, OutSegment sOut, long oldSequence, int saveLength, int tail, int saveSequence) throws IOException { return n...
java
@InService(SegmentServiceImpl.class) public Page writeCheckpoint(TableKelp table, OutSegment sOut, long oldSequence, int saveLength, int tail, int saveSequence) throws IOException { return n...
[ "@", "InService", "(", "SegmentServiceImpl", ".", "class", ")", "public", "Page", "writeCheckpoint", "(", "TableKelp", "table", ",", "OutSegment", "sOut", ",", "long", "oldSequence", ",", "int", "saveLength", ",", "int", "tail", ",", "int", "saveSequence", ")"...
Called by the segment writing service to write the page to the stream. @param table @param sOut @param oldSequence @param saveLength @param tail @param saveSequence @return @throws IOException
[ "Called", "by", "the", "segment", "writing", "service", "to", "write", "the", "page", "to", "the", "stream", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/Page.java#L385-L396
train