id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
44,100
baratine/baratine
examples/auction/src/mainarena/java/example/auction/AuctionQueryServiceImpl.java
AuctionQueryServiceImpl.createAuction
@Override public Auction createAuction(String userId, long durationMs, long startPrice, String title, String description) { ResourceManager manager = getResourceManager(); ServiceRef ref = manager.create(userId, durationMs, startPrice, title...
java
@Override public Auction createAuction(String userId, long durationMs, long startPrice, String title, String description) { ResourceManager manager = getResourceManager(); ServiceRef ref = manager.create(userId, durationMs, startPrice, title...
[ "@", "Override", "public", "Auction", "createAuction", "(", "String", "userId", ",", "long", "durationMs", ",", "long", "startPrice", ",", "String", "title", ",", "String", "description", ")", "{", "ResourceManager", "manager", "=", "getResourceManager", "(", ")...
private ResourceManager _manager;
[ "private", "ResourceManager", "_manager", ";" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/examples/auction/src/mainarena/java/example/auction/AuctionQueryServiceImpl.java#L28-L42
44,101
baratine/baratine
core/src/main/java/com/caucho/v5/amp/pipe/PipeImpl.java
PipeImpl.read
public void read() { StateInPipe stateOld; StateInPipe stateNew; do { stateOld = _stateInRef.get(); stateNew = stateOld.toActive(); } while (! _stateInRef.compareAndSet(stateOld, stateNew)); while (stateNew.isActive()) { readPipe(); wakeOut(); ...
java
public void read() { StateInPipe stateOld; StateInPipe stateNew; do { stateOld = _stateInRef.get(); stateNew = stateOld.toActive(); } while (! _stateInRef.compareAndSet(stateOld, stateNew)); while (stateNew.isActive()) { readPipe(); wakeOut(); ...
[ "public", "void", "read", "(", ")", "{", "StateInPipe", "stateOld", ";", "StateInPipe", "stateNew", ";", "do", "{", "stateOld", "=", "_stateInRef", ".", "get", "(", ")", ";", "stateNew", "=", "stateOld", ".", "toActive", "(", ")", ";", "}", "while", "(...
Reads data from the pipe.
[ "Reads", "data", "from", "the", "pipe", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/amp/pipe/PipeImpl.java#L361-L389
44,102
baratine/baratine
core/src/main/java/com/caucho/v5/amp/pipe/PipeImpl.java
PipeImpl.wakeIn
private void wakeIn() { StateInPipe stateOld; StateInPipe stateNew; do { stateOld = _stateInRef.get(); if (stateOld.isActive()) { return; } stateNew = stateOld.toWake(); } while (! _stateInRef.compareAndSet(stateOld, stateNew)); if (stateOld ...
java
private void wakeIn() { StateInPipe stateOld; StateInPipe stateNew; do { stateOld = _stateInRef.get(); if (stateOld.isActive()) { return; } stateNew = stateOld.toWake(); } while (! _stateInRef.compareAndSet(stateOld, stateNew)); if (stateOld ...
[ "private", "void", "wakeIn", "(", ")", "{", "StateInPipe", "stateOld", ";", "StateInPipe", "stateNew", ";", "do", "{", "stateOld", "=", "_stateInRef", ".", "get", "(", ")", ";", "if", "(", "stateOld", ".", "isActive", "(", ")", ")", "{", "return", ";",...
Notify the reader of available data in the pipe. If the writer is asleep, wake it.
[ "Notify", "the", "reader", "of", "available", "data", "in", "the", "pipe", ".", "If", "the", "writer", "is", "asleep", "wake", "it", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/amp/pipe/PipeImpl.java#L443-L467
44,103
baratine/baratine
core/src/main/java/com/caucho/v5/amp/pipe/PipeImpl.java
PipeImpl.wakeOut
void wakeOut() { OnAvailable outFlow = _outFlow; if (outFlow == null) { return; } if (_creditsIn <= _queue.head()) { return; } StateOutPipe stateOld; StateOutPipe stateNew; do { stateOld = _stateOutRef.get(); if (! stateOld.isFull()) { ...
java
void wakeOut() { OnAvailable outFlow = _outFlow; if (outFlow == null) { return; } if (_creditsIn <= _queue.head()) { return; } StateOutPipe stateOld; StateOutPipe stateNew; do { stateOld = _stateOutRef.get(); if (! stateOld.isFull()) { ...
[ "void", "wakeOut", "(", ")", "{", "OnAvailable", "outFlow", "=", "_outFlow", ";", "if", "(", "outFlow", "==", "null", ")", "{", "return", ";", "}", "if", "(", "_creditsIn", "<=", "_queue", ".", "head", "(", ")", ")", "{", "return", ";", "}", "State...
Notify the reader of available space in the pipe. If the writer is asleep, wake it.
[ "Notify", "the", "reader", "of", "available", "space", "in", "the", "pipe", ".", "If", "the", "writer", "is", "asleep", "wake", "it", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/amp/pipe/PipeImpl.java#L484-L516
44,104
baratine/baratine
web/src/main/java/com/caucho/v5/log/impl/LevelHandler.java
LevelHandler.flush
public void flush() { int level = getLevel().intValue(); for (int i = 0; i < _handlers.length; i++) { Handler handler = _handlers[i]; if (level <= handler.getLevel().intValue()) handler.flush(); } }
java
public void flush() { int level = getLevel().intValue(); for (int i = 0; i < _handlers.length; i++) { Handler handler = _handlers[i]; if (level <= handler.getLevel().intValue()) handler.flush(); } }
[ "public", "void", "flush", "(", ")", "{", "int", "level", "=", "getLevel", "(", ")", ".", "intValue", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "_handlers", ".", "length", ";", "i", "++", ")", "{", "Handler", "handler", "=...
Flush the handler.
[ "Flush", "the", "handler", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/impl/LevelHandler.java#L69-L79
44,105
baratine/baratine
kraken/src/main/java/com/caucho/v5/db/journal/JournalSegment.java
JournalSegment.checkpointStart
public void checkpointStart() { if (_isWhileCheckpoint) { throw new IllegalStateException(); } _isWhileCheckpoint = true; long sequence = ++_sequence; setSequence(sequence); byte []headerBuffer = _headerBuffer; BitsUtil.writeInt16(headerBuffer, 0, CHECKPOINT_START...
java
public void checkpointStart() { if (_isWhileCheckpoint) { throw new IllegalStateException(); } _isWhileCheckpoint = true; long sequence = ++_sequence; setSequence(sequence); byte []headerBuffer = _headerBuffer; BitsUtil.writeInt16(headerBuffer, 0, CHECKPOINT_START...
[ "public", "void", "checkpointStart", "(", ")", "{", "if", "(", "_isWhileCheckpoint", ")", "{", "throw", "new", "IllegalStateException", "(", ")", ";", "}", "_isWhileCheckpoint", "=", "true", ";", "long", "sequence", "=", "++", "_sequence", ";", "setSequence", ...
Starts checkpoint processing. A checkpoint start changes the epoch ID for new journal entries, but does not yet close the previous epoch. Journal entries written between checkpointStart() and checkpointEnd() belong to the successor epoch.
[ "Starts", "checkpoint", "processing", ".", "A", "checkpoint", "start", "changes", "the", "epoch", "ID", "for", "new", "journal", "entries", "but", "does", "not", "yet", "close", "the", "previous", "epoch", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/db/journal/JournalSegment.java#L314-L331
44,106
baratine/baratine
kraken/src/main/java/com/caucho/v5/db/journal/JournalSegment.java
JournalSegment.checkpointEnd
public void checkpointEnd() { if (! _isWhileCheckpoint) { throw new IllegalStateException(); } _isWhileCheckpoint = false; byte []headerBuffer = _headerBuffer; BitsUtil.writeInt16(headerBuffer, 0, CHECKPOINT_END); writeImpl(headerBuffer, 0, 2); flush(); _lastC...
java
public void checkpointEnd() { if (! _isWhileCheckpoint) { throw new IllegalStateException(); } _isWhileCheckpoint = false; byte []headerBuffer = _headerBuffer; BitsUtil.writeInt16(headerBuffer, 0, CHECKPOINT_END); writeImpl(headerBuffer, 0, 2); flush(); _lastC...
[ "public", "void", "checkpointEnd", "(", ")", "{", "if", "(", "!", "_isWhileCheckpoint", ")", "{", "throw", "new", "IllegalStateException", "(", ")", ";", "}", "_isWhileCheckpoint", "=", "false", ";", "byte", "[", "]", "headerBuffer", "=", "_headerBuffer", ";...
Closes the previous epoch. Journal entries in a closed epoch will not be replayed on a journal restore.
[ "Closes", "the", "previous", "epoch", ".", "Journal", "entries", "in", "a", "closed", "epoch", "will", "not", "be", "replayed", "on", "a", "journal", "restore", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/db/journal/JournalSegment.java#L337-L354
44,107
baratine/baratine
kraken/src/main/java/com/caucho/v5/db/journal/JournalSegment.java
JournalSegment.replay
public void replay(ReplayCallback replayCallback) { TempBuffer tReadBuffer = TempBuffer.createLarge(); byte []readBuffer = tReadBuffer.buffer(); int bufferLength = readBuffer.length; try (InStore jIn = _blockStore.openRead(_startAddress, getSegmentSize())) { Replay replay = readReplay(jIn); ...
java
public void replay(ReplayCallback replayCallback) { TempBuffer tReadBuffer = TempBuffer.createLarge(); byte []readBuffer = tReadBuffer.buffer(); int bufferLength = readBuffer.length; try (InStore jIn = _blockStore.openRead(_startAddress, getSegmentSize())) { Replay replay = readReplay(jIn); ...
[ "public", "void", "replay", "(", "ReplayCallback", "replayCallback", ")", "{", "TempBuffer", "tReadBuffer", "=", "TempBuffer", ".", "createLarge", "(", ")", ";", "byte", "[", "]", "readBuffer", "=", "tReadBuffer", ".", "buffer", "(", ")", ";", "int", "buffer...
Replays all open journal entries. The journal entry will call into the callback listener with an open InputStream to read the entry.
[ "Replays", "all", "open", "journal", "entries", ".", "The", "journal", "entry", "will", "call", "into", "the", "callback", "listener", "with", "an", "open", "InputStream", "to", "read", "the", "entry", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/db/journal/JournalSegment.java#L375-L430
44,108
baratine/baratine
kraken/src/main/java/com/caucho/v5/db/journal/JournalSegment.java
JournalSegment.scanItem
private long scanItem(InStore is, long address, byte []readBuffer, byte []tempBuffer) { startRead(); byte []headerBuffer = _headerBuffer; while (address + 2 < _tailAddress) { readImpl(is, address, readBuffer, headerBuffer, 0, 2); address += 2; ...
java
private long scanItem(InStore is, long address, byte []readBuffer, byte []tempBuffer) { startRead(); byte []headerBuffer = _headerBuffer; while (address + 2 < _tailAddress) { readImpl(is, address, readBuffer, headerBuffer, 0, 2); address += 2; ...
[ "private", "long", "scanItem", "(", "InStore", "is", ",", "long", "address", ",", "byte", "[", "]", "readBuffer", ",", "byte", "[", "]", "tempBuffer", ")", "{", "startRead", "(", ")", ";", "byte", "[", "]", "headerBuffer", "=", "_headerBuffer", ";", "w...
Validates that the item is complete and correct.
[ "Validates", "that", "the", "item", "is", "complete", "and", "correct", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/db/journal/JournalSegment.java#L435-L493
44,109
baratine/baratine
framework/src/main/java/com/caucho/v5/server/main/BaratineServer.java
BaratineServer.main
public static void main(String []argv) { EnvLoader.init(); ArgsServerBase args = new ArgsServerBaratine(argv); args.doMain(); }
java
public static void main(String []argv) { EnvLoader.init(); ArgsServerBase args = new ArgsServerBaratine(argv); args.doMain(); }
[ "public", "static", "void", "main", "(", "String", "[", "]", "argv", ")", "{", "EnvLoader", ".", "init", "(", ")", ";", "ArgsServerBase", "args", "=", "new", "ArgsServerBaratine", "(", "argv", ")", ";", "args", ".", "doMain", "(", ")", ";", "}" ]
The main start of the web server. <pre> -conf resin.xml : alternate configuration file -port port : set the server's portt <pre>
[ "The", "main", "start", "of", "the", "web", "server", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/server/main/BaratineServer.java#L50-L57
44,110
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JavaMethod.java
JavaMethod.getLine
public int getLine() { if (_line >= 0) return _line; Attribute attr = getAttribute("LineNumberTable"); if (attr == null) { _line = 0; return _line; } _line = 0; return _line; }
java
public int getLine() { if (_line >= 0) return _line; Attribute attr = getAttribute("LineNumberTable"); if (attr == null) { _line = 0; return _line; } _line = 0; return _line; }
[ "public", "int", "getLine", "(", ")", "{", "if", "(", "_line", ">=", "0", ")", "return", "_line", ";", "Attribute", "attr", "=", "getAttribute", "(", "\"LineNumberTable\"", ")", ";", "if", "(", "attr", "==", "null", ")", "{", "_line", "=", "0", ";", ...
Returns the line number.
[ "Returns", "the", "line", "number", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaMethod.java#L114-L128
44,111
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JavaMethod.java
JavaMethod.getReturnType
public JClass getReturnType() { String descriptor = getDescriptor(); int i = descriptor.lastIndexOf(')'); return getClassLoader().descriptorToClass(descriptor, i + 1); }
java
public JClass getReturnType() { String descriptor = getDescriptor(); int i = descriptor.lastIndexOf(')'); return getClassLoader().descriptorToClass(descriptor, i + 1); }
[ "public", "JClass", "getReturnType", "(", ")", "{", "String", "descriptor", "=", "getDescriptor", "(", ")", ";", "int", "i", "=", "descriptor", ".", "lastIndexOf", "(", "'", "'", ")", ";", "return", "getClassLoader", "(", ")", ".", "descriptorToClass", "("...
Returns the return types.
[ "Returns", "the", "return", "types", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaMethod.java#L232-L239
44,112
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JavaMethod.java
JavaMethod.removeAttribute
public Attribute removeAttribute(String name) { for (int i = _attributes.size() - 1; i >= 0; i--) { Attribute attr = _attributes.get(i); if (attr.getName().equals(name)) { _attributes.remove(i); return attr; } } return null; }
java
public Attribute removeAttribute(String name) { for (int i = _attributes.size() - 1; i >= 0; i--) { Attribute attr = _attributes.get(i); if (attr.getName().equals(name)) { _attributes.remove(i); return attr; } } return null; }
[ "public", "Attribute", "removeAttribute", "(", "String", "name", ")", "{", "for", "(", "int", "i", "=", "_attributes", ".", "size", "(", ")", "-", "1", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "Attribute", "attr", "=", "_attributes", ".", "ge...
Removes an attribute.
[ "Removes", "an", "attribute", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaMethod.java#L361-L373
44,113
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JavaMethod.java
JavaMethod.getCode
public CodeAttribute getCode() { for (int i = 0; i < _attributes.size(); i++) { Attribute attr = _attributes.get(i); if (attr instanceof CodeAttribute) return (CodeAttribute) attr; } return null; }
java
public CodeAttribute getCode() { for (int i = 0; i < _attributes.size(); i++) { Attribute attr = _attributes.get(i); if (attr instanceof CodeAttribute) return (CodeAttribute) attr; } return null; }
[ "public", "CodeAttribute", "getCode", "(", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "_attributes", ".", "size", "(", ")", ";", "i", "++", ")", "{", "Attribute", "attr", "=", "_attributes", ".", "get", "(", "i", ")", ";", "if", ...
Returns the code attribute.
[ "Returns", "the", "code", "attribute", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaMethod.java#L432-L442
44,114
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JavaMethod.java
JavaMethod.createCode
public CodeAttribute createCode() { CodeAttribute code = new CodeAttribute(); for (int i = 0; i < _attributes.size(); i++) { Attribute attr = _attributes.get(i); if (attr instanceof CodeAttribute) return (CodeAttribute) attr; } return null; }
java
public CodeAttribute createCode() { CodeAttribute code = new CodeAttribute(); for (int i = 0; i < _attributes.size(); i++) { Attribute attr = _attributes.get(i); if (attr instanceof CodeAttribute) return (CodeAttribute) attr; } return null; }
[ "public", "CodeAttribute", "createCode", "(", ")", "{", "CodeAttribute", "code", "=", "new", "CodeAttribute", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "_attributes", ".", "size", "(", ")", ";", "i", "++", ")", "{", "Attribute",...
Create the code attribute.
[ "Create", "the", "code", "attribute", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaMethod.java#L447-L459
44,115
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JavaMethod.java
JavaMethod.export
public JavaMethod export(JavaClass source, JavaClass target) { JavaMethod method = new JavaMethod(_loader); method.setName(_name); method.setDescriptor(_descriptor); method.setAccessFlags(_accessFlags); target.getConstantPool().addUTF8(_name); target.getConstantPool().addUTF8(_descriptor); ...
java
public JavaMethod export(JavaClass source, JavaClass target) { JavaMethod method = new JavaMethod(_loader); method.setName(_name); method.setDescriptor(_descriptor); method.setAccessFlags(_accessFlags); target.getConstantPool().addUTF8(_name); target.getConstantPool().addUTF8(_descriptor); ...
[ "public", "JavaMethod", "export", "(", "JavaClass", "source", ",", "JavaClass", "target", ")", "{", "JavaMethod", "method", "=", "new", "JavaMethod", "(", "_loader", ")", ";", "method", ".", "setName", "(", "_name", ")", ";", "method", ".", "setDescriptor", ...
exports the method.
[ "exports", "the", "method", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaMethod.java#L483-L500
44,116
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JavaMethod.java
JavaMethod.concatenate
public void concatenate(JavaMethod tail) { CodeAttribute codeAttr = getCode(); CodeAttribute tailCodeAttr = tail.getCode(); byte []code = codeAttr.getCode(); byte []tailCode = tailCodeAttr.getCode(); int codeLength = code.length; if ((code[codeLength - 1] & 0xff) == CodeVisitor.RETURN) ...
java
public void concatenate(JavaMethod tail) { CodeAttribute codeAttr = getCode(); CodeAttribute tailCodeAttr = tail.getCode(); byte []code = codeAttr.getCode(); byte []tailCode = tailCodeAttr.getCode(); int codeLength = code.length; if ((code[codeLength - 1] & 0xff) == CodeVisitor.RETURN) ...
[ "public", "void", "concatenate", "(", "JavaMethod", "tail", ")", "{", "CodeAttribute", "codeAttr", "=", "getCode", "(", ")", ";", "CodeAttribute", "tailCodeAttr", "=", "tail", ".", "getCode", "(", ")", ";", "byte", "[", "]", "code", "=", "codeAttr", ".", ...
Concatenates the method.
[ "Concatenates", "the", "method", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaMethod.java#L505-L541
44,117
baratine/baratine
framework/src/main/java/com/caucho/v5/http/pod/PodContainer.java
PodContainer.getPodAppHandle
public PodAppHandle getPodAppHandle(String id) { PodAppHandle handle = _podAppHandleMap.get(id); if (handle == null) { // handle = _podsDeployService.getPodAppHandle(id); _podAppHandleMap.putIfAbsent(id, handle); } return handle; }
java
public PodAppHandle getPodAppHandle(String id) { PodAppHandle handle = _podAppHandleMap.get(id); if (handle == null) { // handle = _podsDeployService.getPodAppHandle(id); _podAppHandleMap.putIfAbsent(id, handle); } return handle; }
[ "public", "PodAppHandle", "getPodAppHandle", "(", "String", "id", ")", "{", "PodAppHandle", "handle", "=", "_podAppHandleMap", ".", "get", "(", "id", ")", ";", "if", "(", "handle", "==", "null", ")", "{", "// handle = _podsDeployService.getPodAppHandle(id);", "_po...
Returns a handle to the PodApp service, specified by the pod-app id.
[ "Returns", "a", "handle", "to", "the", "PodApp", "service", "specified", "by", "the", "pod", "-", "app", "id", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/http/pod/PodContainer.java#L332-L343
44,118
baratine/baratine
framework/src/main/java/com/caucho/v5/http/pod/PodContainer.java
PodContainer.stop
public boolean stop(ShutdownModeAmp mode) { Objects.requireNonNull(mode); if (! _lifecycle.toStop()) { return false; } _shutdownMode = mode; /* if (_podBuilder != null) { ServiceRefAmp.toServiceRef(_podBuilder).shutdown(mode); ServiceRefAmp.toServiceRef(_podsDeploy...
java
public boolean stop(ShutdownModeAmp mode) { Objects.requireNonNull(mode); if (! _lifecycle.toStop()) { return false; } _shutdownMode = mode; /* if (_podBuilder != null) { ServiceRefAmp.toServiceRef(_podBuilder).shutdown(mode); ServiceRefAmp.toServiceRef(_podsDeploy...
[ "public", "boolean", "stop", "(", "ShutdownModeAmp", "mode", ")", "{", "Objects", ".", "requireNonNull", "(", "mode", ")", ";", "if", "(", "!", "_lifecycle", ".", "toStop", "(", ")", ")", "{", "return", "false", ";", "}", "_shutdownMode", "=", "mode", ...
Closes the container. @param mode
[ "Closes", "the", "container", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/http/pod/PodContainer.java#L515-L534
44,119
baratine/baratine
core/src/main/java/com/caucho/v5/loader/EnvironmentLocal.java
EnvironmentLocal.remove
@SuppressWarnings("unchecked") public final E remove() { Thread thread = Thread.currentThread(); ClassLoader loader = thread.getContextClassLoader(); for (; loader != null; loader = loader.getParent()) { if (loader instanceof EnvironmentClassLoader) { EnvironmentClassLoader envLoader = (E...
java
@SuppressWarnings("unchecked") public final E remove() { Thread thread = Thread.currentThread(); ClassLoader loader = thread.getContextClassLoader(); for (; loader != null; loader = loader.getParent()) { if (loader instanceof EnvironmentClassLoader) { EnvironmentClassLoader envLoader = (E...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "final", "E", "remove", "(", ")", "{", "Thread", "thread", "=", "Thread", ".", "currentThread", "(", ")", ";", "ClassLoader", "loader", "=", "thread", ".", "getContextClassLoader", "(", ")", ";", ...
Removes this variable @return the old value
[ "Removes", "this", "variable" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/loader/EnvironmentLocal.java#L207-L222
44,120
baratine/baratine
core/src/main/java/com/caucho/v5/loader/EnvironmentLocal.java
EnvironmentLocal.remove
@SuppressWarnings("unchecked") public final E remove(ClassLoader loader) { for (; loader != null; loader = loader.getParent()) { if (loader instanceof EnvironmentClassLoader) { EnvironmentClassLoader envLoader = (EnvironmentClassLoader) loader; return (E) envLoader.removeAttribute(_varNam...
java
@SuppressWarnings("unchecked") public final E remove(ClassLoader loader) { for (; loader != null; loader = loader.getParent()) { if (loader instanceof EnvironmentClassLoader) { EnvironmentClassLoader envLoader = (EnvironmentClassLoader) loader; return (E) envLoader.removeAttribute(_varNam...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "final", "E", "remove", "(", "ClassLoader", "loader", ")", "{", "for", "(", ";", "loader", "!=", "null", ";", "loader", "=", "loader", ".", "getParent", "(", ")", ")", "{", "if", "(", "loade...
Removes the variable for the context classloader. @return the old value
[ "Removes", "the", "variable", "for", "the", "context", "classloader", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/loader/EnvironmentLocal.java#L229-L241
44,121
baratine/baratine
core/src/main/java/com/caucho/v5/loader/EnvironmentLocal.java
EnvironmentLocal.setGlobal
public E setGlobal(E value) { E oldValue = _globalValue; _globalValue = value; ClassLoader systemLoader = getSystemClassLoader(); if (systemLoader instanceof EnvironmentClassLoader) ((EnvironmentClassLoader) systemLoader).setAttribute(_varName, value); else _globalValue = value; ...
java
public E setGlobal(E value) { E oldValue = _globalValue; _globalValue = value; ClassLoader systemLoader = getSystemClassLoader(); if (systemLoader instanceof EnvironmentClassLoader) ((EnvironmentClassLoader) systemLoader).setAttribute(_varName, value); else _globalValue = value; ...
[ "public", "E", "setGlobal", "(", "E", "value", ")", "{", "E", "oldValue", "=", "_globalValue", ";", "_globalValue", "=", "value", ";", "ClassLoader", "systemLoader", "=", "getSystemClassLoader", "(", ")", ";", "if", "(", "systemLoader", "instanceof", "Environm...
Sets the global value. @param value the new value @return the old value
[ "Sets", "the", "global", "value", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/loader/EnvironmentLocal.java#L251-L265
44,122
baratine/baratine
core/src/main/java/com/caucho/v5/loader/EnvironmentLocal.java
EnvironmentLocal.getGlobal
@SuppressWarnings("unchecked") public E getGlobal() { ClassLoader systemLoader = getSystemClassLoader(); if (systemLoader instanceof EnvironmentClassLoader) return (E) ((EnvironmentClassLoader) systemLoader).getAttribute(_varName); else return _globalValue; }
java
@SuppressWarnings("unchecked") public E getGlobal() { ClassLoader systemLoader = getSystemClassLoader(); if (systemLoader instanceof EnvironmentClassLoader) return (E) ((EnvironmentClassLoader) systemLoader).getAttribute(_varName); else return _globalValue; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "E", "getGlobal", "(", ")", "{", "ClassLoader", "systemLoader", "=", "getSystemClassLoader", "(", ")", ";", "if", "(", "systemLoader", "instanceof", "EnvironmentClassLoader", ")", "return", "(", "E", ...
Returns the global value.
[ "Returns", "the", "global", "value", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/loader/EnvironmentLocal.java#L270-L279
44,123
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JClass.java
JClass.getSimpleName
public String getSimpleName() { String name = getName(); int p = name.lastIndexOf('.'); return name.substring(p + 1); }
java
public String getSimpleName() { String name = getName(); int p = name.lastIndexOf('.'); return name.substring(p + 1); }
[ "public", "String", "getSimpleName", "(", ")", "{", "String", "name", "=", "getName", "(", ")", ";", "int", "p", "=", "name", ".", "lastIndexOf", "(", "'", "'", ")", ";", "return", "name", ".", "substring", "(", "p", "+", "1", ")", ";", "}" ]
Returns the class name.
[ "Returns", "the", "class", "name", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JClass.java#L56-L63
44,124
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JClass.java
JClass.getJavaClass
public Class getJavaClass() { try { ClassLoader loader = Thread.currentThread().getContextClassLoader(); return Class.forName(getName(), false, loader); } catch (Exception e) { throw new RuntimeException(e); } }
java
public Class getJavaClass() { try { ClassLoader loader = Thread.currentThread().getContextClassLoader(); return Class.forName(getName(), false, loader); } catch (Exception e) { throw new RuntimeException(e); } }
[ "public", "Class", "getJavaClass", "(", ")", "{", "try", "{", "ClassLoader", "loader", "=", "Thread", ".", "currentThread", "(", ")", ".", "getContextClassLoader", "(", ")", ";", "return", "Class", ".", "forName", "(", "getName", "(", ")", ",", "false", ...
Returns the Java class.
[ "Returns", "the", "Java", "class", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JClass.java#L68-L77
44,125
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JClass.java
JClass.getConstructor
public JMethod getConstructor(JClass []param) { JMethod []ctors = getConstructors(); loop: for (int i = 0; i < ctors.length; i++) { JClass []args = ctors[i].getParameterTypes(); if (args.length != param.length) continue loop; for (int j = 0; j < args.length; j++) if (!...
java
public JMethod getConstructor(JClass []param) { JMethod []ctors = getConstructors(); loop: for (int i = 0; i < ctors.length; i++) { JClass []args = ctors[i].getParameterTypes(); if (args.length != param.length) continue loop; for (int j = 0; j < args.length; j++) if (!...
[ "public", "JMethod", "getConstructor", "(", "JClass", "[", "]", "param", ")", "{", "JMethod", "[", "]", "ctors", "=", "getConstructors", "(", ")", ";", "loop", ":", "for", "(", "int", "i", "=", "0", ";", "i", "<", "ctors", ".", "length", ";", "i", ...
Returns a matching constructor.
[ "Returns", "a", "matching", "constructor", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JClass.java#L176-L195
44,126
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JClass.java
JClass.getShortName
public String getShortName() { if (isArray()) return getComponentType().getShortName() + "[]"; else { String name = getName().replace('$', '.'); int p = name.lastIndexOf('.'); if (p >= 0) return name.substring(p + 1); else return name; } }
java
public String getShortName() { if (isArray()) return getComponentType().getShortName() + "[]"; else { String name = getName().replace('$', '.'); int p = name.lastIndexOf('.'); if (p >= 0) return name.substring(p + 1); else return name; } }
[ "public", "String", "getShortName", "(", ")", "{", "if", "(", "isArray", "(", ")", ")", "return", "getComponentType", "(", ")", ".", "getShortName", "(", ")", "+", "\"[]\"", ";", "else", "{", "String", "name", "=", "getName", "(", ")", ".", "replace", ...
Returns a printable version of a class.
[ "Returns", "a", "printable", "version", "of", "a", "class", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JClass.java#L226-L240
44,127
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol2/InRequestClient.java
InRequestClient.dispatch
@Override public void dispatch() { Result<InputStreamClient> result = _result; if (result != null) { result.ok(_is); } }
java
@Override public void dispatch() { Result<InputStreamClient> result = _result; if (result != null) { result.ok(_is); } }
[ "@", "Override", "public", "void", "dispatch", "(", ")", "{", "Result", "<", "InputStreamClient", ">", "result", "=", "_result", ";", "if", "(", "result", "!=", "null", ")", "{", "result", ".", "ok", "(", "_is", ")", ";", "}", "}" ]
dispatch a request after the headers are read.
[ "dispatch", "a", "request", "after", "the", "headers", "are", "read", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol2/InRequestClient.java#L116-L124
44,128
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/InvocationKey.java
InvocationKey.init
public void init(boolean isSecure, CharSequence host, int port, byte []uri, int uriLength) { _isSecure = isSecure; _host = host; _port = port; _uri = uri; _uriLength = uriLength; }
java
public void init(boolean isSecure, CharSequence host, int port, byte []uri, int uriLength) { _isSecure = isSecure; _host = host; _port = port; _uri = uri; _uriLength = uriLength; }
[ "public", "void", "init", "(", "boolean", "isSecure", ",", "CharSequence", "host", ",", "int", "port", ",", "byte", "[", "]", "uri", ",", "int", "uriLength", ")", "{", "_isSecure", "=", "isSecure", ";", "_host", "=", "host", ";", "_port", "=", "port", ...
Initialize the InvocationKey with a new triple. @param host the request's host @param port the request's port @param uri the raw byte array containing the uri @param urlLength the length of the uri in the byte array
[ "Initialize", "the", "InvocationKey", "with", "a", "new", "triple", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/InvocationKey.java#L88-L99
44,129
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JAnnotationWrapper.java
JAnnotationWrapper.getValueMap
public HashMap<String,Object> getValueMap() { try { if (_values == null) { _values = new HashMap<String,Object>(); Method []methods = _ann.annotationType().getMethods(); for (int i = 0; i < methods.length; i++) { Method method = methods[i]; if (method.getDeclar...
java
public HashMap<String,Object> getValueMap() { try { if (_values == null) { _values = new HashMap<String,Object>(); Method []methods = _ann.annotationType().getMethods(); for (int i = 0; i < methods.length; i++) { Method method = methods[i]; if (method.getDeclar...
[ "public", "HashMap", "<", "String", ",", "Object", ">", "getValueMap", "(", ")", "{", "try", "{", "if", "(", "_values", "==", "null", ")", "{", "_values", "=", "new", "HashMap", "<", "String", ",", "Object", ">", "(", ")", ";", "Method", "[", "]", ...
Returns the annotation values.
[ "Returns", "the", "annotation", "values", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JAnnotationWrapper.java#L61-L87
44,130
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java
ByteCodeParser.parse
public JavaClass parse(InputStream is) throws IOException { _is = is; if (_loader == null) _loader = new JavaClassLoader(); if (_class == null) _class = new JavaClass(_loader); _cp = _class.getConstantPool(); parseClass(); return _class; }
java
public JavaClass parse(InputStream is) throws IOException { _is = is; if (_loader == null) _loader = new JavaClassLoader(); if (_class == null) _class = new JavaClass(_loader); _cp = _class.getConstantPool(); parseClass(); return _class; }
[ "public", "JavaClass", "parse", "(", "InputStream", "is", ")", "throws", "IOException", "{", "_is", "=", "is", ";", "if", "(", "_loader", "==", "null", ")", "_loader", "=", "new", "JavaClassLoader", "(", ")", ";", "if", "(", "_class", "==", "null", ")"...
Parses the .class file.
[ "Parses", "the", ".", "class", "file", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java#L103-L119
44,131
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java
ByteCodeParser.parseClass
private void parseClass() throws IOException { int magic = readInt(); if (magic != JavaClass.MAGIC) throw error(L.l("bad magic number in class file")); int minor = readShort(); int major = readShort(); _class.setMajor(major); _class.setMinor(minor); parseConstantPool(); ...
java
private void parseClass() throws IOException { int magic = readInt(); if (magic != JavaClass.MAGIC) throw error(L.l("bad magic number in class file")); int minor = readShort(); int major = readShort(); _class.setMajor(major); _class.setMinor(minor); parseConstantPool(); ...
[ "private", "void", "parseClass", "(", ")", "throws", "IOException", "{", "int", "magic", "=", "readInt", "(", ")", ";", "if", "(", "magic", "!=", "JavaClass", ".", "MAGIC", ")", "throw", "error", "(", "L", ".", "l", "(", "\"bad magic number in class file\"...
Parses the ClassFile construct
[ "Parses", "the", "ClassFile", "construct" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java#L140-L188
44,132
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java
ByteCodeParser.parseConstantPoolEntry
private ConstantPoolEntry parseConstantPoolEntry(int index) throws IOException { int tag = read(); switch (tag) { case CP_CLASS: return parseClassConstant(index); case CP_FIELD_REF: return parseFieldRefConstant(index); case CP_METHOD_REF: return parseMethodRefC...
java
private ConstantPoolEntry parseConstantPoolEntry(int index) throws IOException { int tag = read(); switch (tag) { case CP_CLASS: return parseClassConstant(index); case CP_FIELD_REF: return parseFieldRefConstant(index); case CP_METHOD_REF: return parseMethodRefC...
[ "private", "ConstantPoolEntry", "parseConstantPoolEntry", "(", "int", "index", ")", "throws", "IOException", "{", "int", "tag", "=", "read", "(", ")", ";", "switch", "(", "tag", ")", "{", "case", "CP_CLASS", ":", "return", "parseClassConstant", "(", "index", ...
Parses a constant pool entry.
[ "Parses", "a", "constant", "pool", "entry", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java#L214-L257
44,133
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java
ByteCodeParser.parseClassConstant
private ClassConstant parseClassConstant(int index) throws IOException { int nameIndex = readShort(); return new ClassConstant(_class.getConstantPool(), index, nameIndex); }
java
private ClassConstant parseClassConstant(int index) throws IOException { int nameIndex = readShort(); return new ClassConstant(_class.getConstantPool(), index, nameIndex); }
[ "private", "ClassConstant", "parseClassConstant", "(", "int", "index", ")", "throws", "IOException", "{", "int", "nameIndex", "=", "readShort", "(", ")", ";", "return", "new", "ClassConstant", "(", "_class", ".", "getConstantPool", "(", ")", ",", "index", ",",...
Parses a class constant pool entry.
[ "Parses", "a", "class", "constant", "pool", "entry", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java#L262-L268
44,134
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java
ByteCodeParser.parseFieldRefConstant
private FieldRefConstant parseFieldRefConstant(int index) throws IOException { int classIndex = readShort(); int nameAndTypeIndex = readShort(); return new FieldRefConstant(_class.getConstantPool(), index, classIndex, nameAndTypeIndex); }
java
private FieldRefConstant parseFieldRefConstant(int index) throws IOException { int classIndex = readShort(); int nameAndTypeIndex = readShort(); return new FieldRefConstant(_class.getConstantPool(), index, classIndex, nameAndTypeIndex); }
[ "private", "FieldRefConstant", "parseFieldRefConstant", "(", "int", "index", ")", "throws", "IOException", "{", "int", "classIndex", "=", "readShort", "(", ")", ";", "int", "nameAndTypeIndex", "=", "readShort", "(", ")", ";", "return", "new", "FieldRefConstant", ...
Parses a field ref constant pool entry.
[ "Parses", "a", "field", "ref", "constant", "pool", "entry", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java#L273-L281
44,135
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java
ByteCodeParser.parseMethodRefConstant
private MethodRefConstant parseMethodRefConstant(int index) throws IOException { int classIndex = readShort(); int nameAndTypeIndex = readShort(); return new MethodRefConstant(_class.getConstantPool(), index, classIndex, nameAndTypeIndex); }
java
private MethodRefConstant parseMethodRefConstant(int index) throws IOException { int classIndex = readShort(); int nameAndTypeIndex = readShort(); return new MethodRefConstant(_class.getConstantPool(), index, classIndex, nameAndTypeIndex); }
[ "private", "MethodRefConstant", "parseMethodRefConstant", "(", "int", "index", ")", "throws", "IOException", "{", "int", "classIndex", "=", "readShort", "(", ")", ";", "int", "nameAndTypeIndex", "=", "readShort", "(", ")", ";", "return", "new", "MethodRefConstant"...
Parses a method ref constant pool entry.
[ "Parses", "a", "method", "ref", "constant", "pool", "entry", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java#L286-L294
44,136
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java
ByteCodeParser.parseInterfaceMethodRefConstant
private InterfaceMethodRefConstant parseInterfaceMethodRefConstant(int index) throws IOException { int classIndex = readShort(); int nameAndTypeIndex = readShort(); return new InterfaceMethodRefConstant(_class.getConstantPool(), index, classIndex, nameAndType...
java
private InterfaceMethodRefConstant parseInterfaceMethodRefConstant(int index) throws IOException { int classIndex = readShort(); int nameAndTypeIndex = readShort(); return new InterfaceMethodRefConstant(_class.getConstantPool(), index, classIndex, nameAndType...
[ "private", "InterfaceMethodRefConstant", "parseInterfaceMethodRefConstant", "(", "int", "index", ")", "throws", "IOException", "{", "int", "classIndex", "=", "readShort", "(", ")", ";", "int", "nameAndTypeIndex", "=", "readShort", "(", ")", ";", "return", "new", "...
Parses an interface method ref constant pool entry.
[ "Parses", "an", "interface", "method", "ref", "constant", "pool", "entry", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java#L299-L307
44,137
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java
ByteCodeParser.parseStringConstant
private StringConstant parseStringConstant(int index) throws IOException { int stringIndex = readShort(); return new StringConstant(_class.getConstantPool(), index, stringIndex); }
java
private StringConstant parseStringConstant(int index) throws IOException { int stringIndex = readShort(); return new StringConstant(_class.getConstantPool(), index, stringIndex); }
[ "private", "StringConstant", "parseStringConstant", "(", "int", "index", ")", "throws", "IOException", "{", "int", "stringIndex", "=", "readShort", "(", ")", ";", "return", "new", "StringConstant", "(", "_class", ".", "getConstantPool", "(", ")", ",", "index", ...
Parses a string constant pool entry.
[ "Parses", "a", "string", "constant", "pool", "entry", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java#L312-L318
44,138
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java
ByteCodeParser.parseIntegerConstant
private IntegerConstant parseIntegerConstant(int index) throws IOException { int value = readInt(); return new IntegerConstant(_class.getConstantPool(), index, value); }
java
private IntegerConstant parseIntegerConstant(int index) throws IOException { int value = readInt(); return new IntegerConstant(_class.getConstantPool(), index, value); }
[ "private", "IntegerConstant", "parseIntegerConstant", "(", "int", "index", ")", "throws", "IOException", "{", "int", "value", "=", "readInt", "(", ")", ";", "return", "new", "IntegerConstant", "(", "_class", ".", "getConstantPool", "(", ")", ",", "index", ",",...
Parses an integer constant pool entry.
[ "Parses", "an", "integer", "constant", "pool", "entry", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java#L323-L329
44,139
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java
ByteCodeParser.parseFloatConstant
private FloatConstant parseFloatConstant(int index) throws IOException { int bits = readInt(); float value = Float.intBitsToFloat(bits); return new FloatConstant(_class.getConstantPool(), index, value); }
java
private FloatConstant parseFloatConstant(int index) throws IOException { int bits = readInt(); float value = Float.intBitsToFloat(bits); return new FloatConstant(_class.getConstantPool(), index, value); }
[ "private", "FloatConstant", "parseFloatConstant", "(", "int", "index", ")", "throws", "IOException", "{", "int", "bits", "=", "readInt", "(", ")", ";", "float", "value", "=", "Float", ".", "intBitsToFloat", "(", "bits", ")", ";", "return", "new", "FloatConst...
Parses a float constant pool entry.
[ "Parses", "a", "float", "constant", "pool", "entry", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java#L334-L342
44,140
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java
ByteCodeParser.parseLongConstant
private LongConstant parseLongConstant(int index) throws IOException { long value = readLong(); return new LongConstant(_class.getConstantPool(), index, value); }
java
private LongConstant parseLongConstant(int index) throws IOException { long value = readLong(); return new LongConstant(_class.getConstantPool(), index, value); }
[ "private", "LongConstant", "parseLongConstant", "(", "int", "index", ")", "throws", "IOException", "{", "long", "value", "=", "readLong", "(", ")", ";", "return", "new", "LongConstant", "(", "_class", ".", "getConstantPool", "(", ")", ",", "index", ",", "val...
Parses a long constant pool entry.
[ "Parses", "a", "long", "constant", "pool", "entry", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java#L347-L353
44,141
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java
ByteCodeParser.parseDoubleConstant
private DoubleConstant parseDoubleConstant(int index) throws IOException { long bits = readLong(); double value = Double.longBitsToDouble(bits); return new DoubleConstant(_class.getConstantPool(), index, value); }
java
private DoubleConstant parseDoubleConstant(int index) throws IOException { long bits = readLong(); double value = Double.longBitsToDouble(bits); return new DoubleConstant(_class.getConstantPool(), index, value); }
[ "private", "DoubleConstant", "parseDoubleConstant", "(", "int", "index", ")", "throws", "IOException", "{", "long", "bits", "=", "readLong", "(", ")", ";", "double", "value", "=", "Double", ".", "longBitsToDouble", "(", "bits", ")", ";", "return", "new", "Do...
Parses a double constant pool entry.
[ "Parses", "a", "double", "constant", "pool", "entry", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java#L358-L366
44,142
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java
ByteCodeParser.parseNameAndTypeConstant
private NameAndTypeConstant parseNameAndTypeConstant(int index) throws IOException { int nameIndex = readShort(); int descriptorIndex = readShort(); return new NameAndTypeConstant(_class.getConstantPool(), index, nameIndex, descriptorIndex); }
java
private NameAndTypeConstant parseNameAndTypeConstant(int index) throws IOException { int nameIndex = readShort(); int descriptorIndex = readShort(); return new NameAndTypeConstant(_class.getConstantPool(), index, nameIndex, descriptorIndex); }
[ "private", "NameAndTypeConstant", "parseNameAndTypeConstant", "(", "int", "index", ")", "throws", "IOException", "{", "int", "nameIndex", "=", "readShort", "(", ")", ";", "int", "descriptorIndex", "=", "readShort", "(", ")", ";", "return", "new", "NameAndTypeConst...
Parses a name and type pool entry.
[ "Parses", "a", "name", "and", "type", "pool", "entry", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java#L371-L379
44,143
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java
ByteCodeParser.parseUtf8Constant
private Utf8Constant parseUtf8Constant(int index) throws IOException { int length = readShort(); StringBuilder cb = new StringBuilder(); for (int i = 0; i < length; i++) { int ch = read(); if (ch < 0x80) { cb.append((char) ch); } else if ((ch & 0xe0) == 0xc0) { ...
java
private Utf8Constant parseUtf8Constant(int index) throws IOException { int length = readShort(); StringBuilder cb = new StringBuilder(); for (int i = 0; i < length; i++) { int ch = read(); if (ch < 0x80) { cb.append((char) ch); } else if ((ch & 0xe0) == 0xc0) { ...
[ "private", "Utf8Constant", "parseUtf8Constant", "(", "int", "index", ")", "throws", "IOException", "{", "int", "length", "=", "readShort", "(", ")", ";", "StringBuilder", "cb", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "int", "i", "=", "0", ...
Parses a utf-8 constant pool entry.
[ "Parses", "a", "utf", "-", "8", "constant", "pool", "entry", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java#L384-L416
44,144
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java
ByteCodeParser.parseMethod
private void parseMethod() throws IOException { int accessFlags = readShort(); int nameIndex = readShort(); int descriptorIndex = readShort(); JavaMethod method = new JavaMethod(_loader); method.setJavaClass(_class); method.setName(_cp.getUtf8(nameIndex).getValue()); method.setDescrip...
java
private void parseMethod() throws IOException { int accessFlags = readShort(); int nameIndex = readShort(); int descriptorIndex = readShort(); JavaMethod method = new JavaMethod(_loader); method.setJavaClass(_class); method.setName(_cp.getUtf8(nameIndex).getValue()); method.setDescrip...
[ "private", "void", "parseMethod", "(", ")", "throws", "IOException", "{", "int", "accessFlags", "=", "readShort", "(", ")", ";", "int", "nameIndex", "=", "readShort", "(", ")", ";", "int", "descriptorIndex", "=", "readShort", "(", ")", ";", "JavaMethod", "...
Parses a method entry.
[ "Parses", "a", "method", "entry", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java#L448-L488
44,145
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java
ByteCodeParser.parseAttribute
public Attribute parseAttribute() throws IOException { int nameIndex = readShort(); String name = _cp.getUtf8(nameIndex).getValue(); if (name.equals("Code")) { CodeAttribute code = new CodeAttribute(name); code.read(this); return code; } else if (name.equals("Exceptions")) ...
java
public Attribute parseAttribute() throws IOException { int nameIndex = readShort(); String name = _cp.getUtf8(nameIndex).getValue(); if (name.equals("Code")) { CodeAttribute code = new CodeAttribute(name); code.read(this); return code; } else if (name.equals("Exceptions")) ...
[ "public", "Attribute", "parseAttribute", "(", ")", "throws", "IOException", "{", "int", "nameIndex", "=", "readShort", "(", ")", ";", "String", "name", "=", "_cp", ".", "getUtf8", "(", "nameIndex", ")", ".", "getValue", "(", ")", ";", "if", "(", "name", ...
Parses an attribute.
[ "Parses", "an", "attribute", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java#L493-L532
44,146
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java
ByteCodeParser.readLong
long readLong() throws IOException { return (((long) _is.read() << 56) | ((long) _is.read() << 48) | ((long) _is.read() << 40) | ((long) _is.read() << 32) | ((long) _is.read() << 24) | ((long) _is.read() << 16) | ((long) _is.read() << 8) ...
java
long readLong() throws IOException { return (((long) _is.read() << 56) | ((long) _is.read() << 48) | ((long) _is.read() << 40) | ((long) _is.read() << 32) | ((long) _is.read() << 24) | ((long) _is.read() << 16) | ((long) _is.read() << 8) ...
[ "long", "readLong", "(", ")", "throws", "IOException", "{", "return", "(", "(", "(", "long", ")", "_is", ".", "read", "(", ")", "<<", "56", ")", "|", "(", "(", "long", ")", "_is", ".", "read", "(", ")", "<<", "48", ")", "|", "(", "(", "long",...
Parses a 64-bit int.
[ "Parses", "a", "64", "-", "bit", "int", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java#L537-L548
44,147
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java
ByteCodeParser.readInt
public int readInt() throws IOException { return ((_is.read() << 24) | (_is.read() << 16) | (_is.read() << 8) | (_is.read())); }
java
public int readInt() throws IOException { return ((_is.read() << 24) | (_is.read() << 16) | (_is.read() << 8) | (_is.read())); }
[ "public", "int", "readInt", "(", ")", "throws", "IOException", "{", "return", "(", "(", "_is", ".", "read", "(", ")", "<<", "24", ")", "|", "(", "_is", ".", "read", "(", ")", "<<", "16", ")", "|", "(", "_is", ".", "read", "(", ")", "<<", "8",...
Parses a 32-bit int.
[ "Parses", "a", "32", "-", "bit", "int", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java#L553-L560
44,148
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java
ByteCodeParser.read
public int read(byte []buffer, int offset, int length) throws IOException { int readLength = 0; while (length > 0) { int sublen = _is.read(buffer, offset, length); if (sublen < 0) return readLength == 0 ? -1 : readLength; offset += sublen; length -= sublen; rea...
java
public int read(byte []buffer, int offset, int length) throws IOException { int readLength = 0; while (length > 0) { int sublen = _is.read(buffer, offset, length); if (sublen < 0) return readLength == 0 ? -1 : readLength; offset += sublen; length -= sublen; rea...
[ "public", "int", "read", "(", "byte", "[", "]", "buffer", ",", "int", "offset", ",", "int", "length", ")", "throws", "IOException", "{", "int", "readLength", "=", "0", ";", "while", "(", "length", ">", "0", ")", "{", "int", "sublen", "=", "_is", "....
Reads a chunk
[ "Reads", "a", "chunk" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java#L586-L603
44,149
baratine/baratine
framework/src/main/java/com/caucho/v5/bartender/journal/PeerJournalStream.java
PeerJournalStream.start
@Override public void start() { try { JournalClientEndpoint endpoint = connect(); if (endpoint != null) { OutputStream os; _os = os = endpoint.startMessage(); if (os != null) { os.write('M'); } } } catch (Exception e) { log.fi...
java
@Override public void start() { try { JournalClientEndpoint endpoint = connect(); if (endpoint != null) { OutputStream os; _os = os = endpoint.startMessage(); if (os != null) { os.write('M'); } } } catch (Exception e) { log.fi...
[ "@", "Override", "public", "void", "start", "(", ")", "{", "try", "{", "JournalClientEndpoint", "endpoint", "=", "connect", "(", ")", ";", "if", "(", "endpoint", "!=", "null", ")", "{", "OutputStream", "os", ";", "_os", "=", "os", "=", "endpoint", ".",...
Start a journalled message.
[ "Start", "a", "journalled", "message", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/bartender/journal/PeerJournalStream.java#L66-L85
44,150
baratine/baratine
framework/src/main/java/com/caucho/v5/bartender/journal/PeerJournalStream.java
PeerJournalStream.write
@Override public void write(byte[] buffer, int offset, int length) { try { OutputStream os = _os; if (os != null) { os.write(buffer, offset, length); } } catch (Exception e) { log.log(Level.FINER, e.toString(), e); } }
java
@Override public void write(byte[] buffer, int offset, int length) { try { OutputStream os = _os; if (os != null) { os.write(buffer, offset, length); } } catch (Exception e) { log.log(Level.FINER, e.toString(), e); } }
[ "@", "Override", "public", "void", "write", "(", "byte", "[", "]", "buffer", ",", "int", "offset", ",", "int", "length", ")", "{", "try", "{", "OutputStream", "os", "=", "_os", ";", "if", "(", "os", "!=", "null", ")", "{", "os", ".", "write", "("...
write the contents of a journal message.
[ "write", "the", "contents", "of", "a", "journal", "message", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/bartender/journal/PeerJournalStream.java#L90-L102
44,151
baratine/baratine
framework/src/main/java/com/caucho/v5/bartender/journal/PeerJournalStream.java
PeerJournalStream.complete
@Override public boolean complete() { OutputStream os = _os; _os = null; IoUtil.close(os); return true; }
java
@Override public boolean complete() { OutputStream os = _os; _os = null; IoUtil.close(os); return true; }
[ "@", "Override", "public", "boolean", "complete", "(", ")", "{", "OutputStream", "os", "=", "_os", ";", "_os", "=", "null", ";", "IoUtil", ".", "close", "(", "os", ")", ";", "return", "true", ";", "}" ]
Complete a journaled message.
[ "Complete", "a", "journaled", "message", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/bartender/journal/PeerJournalStream.java#L107-L116
44,152
baratine/baratine
framework/src/main/java/com/caucho/v5/javac/ScriptStackTrace.java
ScriptStackTrace.printStackTraceElement
private static void printStackTraceElement(StackTraceElement trace, PrintWriter out, ClassLoader loader) { try { LineMap map = getScriptLineMap(trace.getClassName(), loader); if (map != null) { LineMap.L...
java
private static void printStackTraceElement(StackTraceElement trace, PrintWriter out, ClassLoader loader) { try { LineMap map = getScriptLineMap(trace.getClassName(), loader); if (map != null) { LineMap.L...
[ "private", "static", "void", "printStackTraceElement", "(", "StackTraceElement", "trace", ",", "PrintWriter", "out", ",", "ClassLoader", "loader", ")", "{", "try", "{", "LineMap", "map", "=", "getScriptLineMap", "(", "trace", ".", "getClassName", "(", ")", ",", ...
Prints a single stack trace element.
[ "Prints", "a", "single", "stack", "trace", "element", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/javac/ScriptStackTrace.java#L105-L125
44,153
baratine/baratine
framework/src/main/java/com/caucho/v5/javac/ScriptStackTrace.java
ScriptStackTrace.getScriptLineMap
public static LineMap getScriptLineMap(String className, ClassLoader loader) { try { Class cl = loader.loadClass(className); LineMap map = _scriptMap.get(cl); if (map == null) { map = loadScriptMap(cl); _scriptMap.put(cl, map); } return map; } catch (Throwable ...
java
public static LineMap getScriptLineMap(String className, ClassLoader loader) { try { Class cl = loader.loadClass(className); LineMap map = _scriptMap.get(cl); if (map == null) { map = loadScriptMap(cl); _scriptMap.put(cl, map); } return map; } catch (Throwable ...
[ "public", "static", "LineMap", "getScriptLineMap", "(", "String", "className", ",", "ClassLoader", "loader", ")", "{", "try", "{", "Class", "cl", "=", "loader", ".", "loadClass", "(", "className", ")", ";", "LineMap", "map", "=", "_scriptMap", ".", "get", ...
Loads the local line map for a class.
[ "Loads", "the", "local", "line", "map", "for", "a", "class", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/javac/ScriptStackTrace.java#L130-L146
44,154
baratine/baratine
framework/src/main/java/com/caucho/v5/javac/ScriptStackTrace.java
ScriptStackTrace.loadScriptMap
private static LineMap loadScriptMap(Class cl) { ClassLoader loader = cl.getClassLoader(); if (loader == null) return new LineMap(); // null map try { String pathName = cl.getName().replace('.', '/') + ".class"; InputStream is = loader.getResourceAsStream(pathName); if (is ...
java
private static LineMap loadScriptMap(Class cl) { ClassLoader loader = cl.getClassLoader(); if (loader == null) return new LineMap(); // null map try { String pathName = cl.getName().replace('.', '/') + ".class"; InputStream is = loader.getResourceAsStream(pathName); if (is ...
[ "private", "static", "LineMap", "loadScriptMap", "(", "Class", "cl", ")", "{", "ClassLoader", "loader", "=", "cl", ".", "getClassLoader", "(", ")", ";", "if", "(", "loader", "==", "null", ")", "return", "new", "LineMap", "(", ")", ";", "// null map", "tr...
Loads the script map for a class
[ "Loads", "the", "script", "map", "for", "a", "class" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/javac/ScriptStackTrace.java#L152-L210
44,155
SeaCloudsEU/SeaCloudsPlatform
sla/sla-core/sla-enforcement/src/main/java/eu/atos/sla/evaluation/guarantee/PoliciedServiceLevelEvaluator.java
PoliciedServiceLevelEvaluator.getPoliciesOrDefault
private List<IPolicy> getPoliciesOrDefault(final IGuaranteeTerm term) { if (term.getPolicies() != null && term.getPolicies().size() > 0) { return term.getPolicies(); } return Collections.singletonList(defaultPolicy); }
java
private List<IPolicy> getPoliciesOrDefault(final IGuaranteeTerm term) { if (term.getPolicies() != null && term.getPolicies().size() > 0) { return term.getPolicies(); } return Collections.singletonList(defaultPolicy); }
[ "private", "List", "<", "IPolicy", ">", "getPoliciesOrDefault", "(", "final", "IGuaranteeTerm", "term", ")", "{", "if", "(", "term", ".", "getPolicies", "(", ")", "!=", "null", "&&", "term", ".", "getPolicies", "(", ")", ".", "size", "(", ")", ">", "0"...
Return policies of the term if any, or the default policy.
[ "Return", "policies", "of", "the", "term", "if", "any", "or", "the", "default", "policy", "." ]
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/sla/sla-core/sla-enforcement/src/main/java/eu/atos/sla/evaluation/guarantee/PoliciedServiceLevelEvaluator.java#L223-L230
44,156
SeaCloudsEU/SeaCloudsPlatform
deployer/src/main/java/org/apache/brooklyn/entity/cloudfoundry/CloudFoundryEntityImpl.java
CloudFoundryEntityImpl.doStart
protected final void doStart(Collection<? extends Location> locations) { ServiceStateLogic.setExpectedState(this, Lifecycle.STARTING); try { preStart(); driver.start(); log.info("Entity {} was started with driver {}", new Object[]{this, driver}); postDri...
java
protected final void doStart(Collection<? extends Location> locations) { ServiceStateLogic.setExpectedState(this, Lifecycle.STARTING); try { preStart(); driver.start(); log.info("Entity {} was started with driver {}", new Object[]{this, driver}); postDri...
[ "protected", "final", "void", "doStart", "(", "Collection", "<", "?", "extends", "Location", ">", "locations", ")", "{", "ServiceStateLogic", ".", "setExpectedState", "(", "this", ",", "Lifecycle", ".", "STARTING", ")", ";", "try", "{", "preStart", "(", ")",...
It is a temporal method. It will be contains the start effector body. It will be moved to LifeCycle class based on Task. It is the first approach. It does not start the entity children.
[ "It", "is", "a", "temporal", "method", ".", "It", "will", "be", "contains", "the", "start", "effector", "body", ".", "It", "will", "be", "moved", "to", "LifeCycle", "class", "based", "on", "Task", ".", "It", "is", "the", "first", "approach", ".", "It",...
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/deployer/src/main/java/org/apache/brooklyn/entity/cloudfoundry/CloudFoundryEntityImpl.java#L198-L215
44,157
SeaCloudsEU/SeaCloudsPlatform
planner/aamwriter/src/main/java/eu/seaclouds/platform/planner/aamwriter/modeldesigner/DGraph.java
DGraph.findFrontendNode
private DNode findFrontendNode() { DNode frontend = getNode(requirements.getFrontend()); if (frontend == DNode.NOT_FOUND) { frontend = searchFrontendNode(); if (frontend == DNode.NOT_FOUND) { frontend = calculateSourceNode(); ...
java
private DNode findFrontendNode() { DNode frontend = getNode(requirements.getFrontend()); if (frontend == DNode.NOT_FOUND) { frontend = searchFrontendNode(); if (frontend == DNode.NOT_FOUND) { frontend = calculateSourceNode(); ...
[ "private", "DNode", "findFrontendNode", "(", ")", "{", "DNode", "frontend", "=", "getNode", "(", "requirements", ".", "getFrontend", "(", ")", ")", ";", "if", "(", "frontend", "==", "DNode", ".", "NOT_FOUND", ")", "{", "frontend", "=", "searchFrontendNode", ...
Assigns a frontend node to the graph according to the rules in the class header
[ "Assigns", "a", "frontend", "node", "to", "the", "graph", "according", "to", "the", "rules", "in", "the", "class", "header" ]
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/planner/aamwriter/src/main/java/eu/seaclouds/platform/planner/aamwriter/modeldesigner/DGraph.java#L143-L155
44,158
SeaCloudsEU/SeaCloudsPlatform
planner/aamwriter/src/main/java/eu/seaclouds/platform/planner/aamwriter/modeldesigner/DGraph.java
DGraph.searchFrontendNode
private DNode searchFrontendNode() { DNode result = DNode.NOT_FOUND; for (DNode node : nodes) { if (node.getFrontend()) { result = node; break; } } return result; }
java
private DNode searchFrontendNode() { DNode result = DNode.NOT_FOUND; for (DNode node : nodes) { if (node.getFrontend()) { result = node; break; } } return result; }
[ "private", "DNode", "searchFrontendNode", "(", ")", "{", "DNode", "result", "=", "DNode", ".", "NOT_FOUND", ";", "for", "(", "DNode", "node", ":", "nodes", ")", "{", "if", "(", "node", ".", "getFrontend", "(", ")", ")", "{", "result", "=", "node", ";...
Searches the first node with "frontend" property set to true
[ "Searches", "the", "first", "node", "with", "frontend", "property", "set", "to", "true" ]
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/planner/aamwriter/src/main/java/eu/seaclouds/platform/planner/aamwriter/modeldesigner/DGraph.java#L160-L170
44,159
SeaCloudsEU/SeaCloudsPlatform
planner/aamwriter/src/main/java/eu/seaclouds/platform/planner/aamwriter/modeldesigner/DGraph.java
DGraph.calculateSourceNode
private DNode calculateSourceNode() { DNode result = DNode.NOT_FOUND; for (DNode node : nodes) { List<DLink> links = getLinksTo(node); if (links.size() == 0) { result = node; break; } } return result; ...
java
private DNode calculateSourceNode() { DNode result = DNode.NOT_FOUND; for (DNode node : nodes) { List<DLink> links = getLinksTo(node); if (links.size() == 0) { result = node; break; } } return result; ...
[ "private", "DNode", "calculateSourceNode", "(", ")", "{", "DNode", "result", "=", "DNode", ".", "NOT_FOUND", ";", "for", "(", "DNode", "node", ":", "nodes", ")", "{", "List", "<", "DLink", ">", "links", "=", "getLinksTo", "(", "node", ")", ";", "if", ...
Finds the first node with no incoming links.
[ "Finds", "the", "first", "node", "with", "no", "incoming", "links", "." ]
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/planner/aamwriter/src/main/java/eu/seaclouds/platform/planner/aamwriter/modeldesigner/DGraph.java#L175-L186
44,160
baratine/baratine
web/src/main/java/com/caucho/v5/io/i18n/EncodingReader.java
EncodingReader.create
public Reader create(InputStream is) throws UnsupportedEncodingException { Reader reader = create(is, getJavaEncoding()); if (reader != null) return reader; else return new ISO8859_1Reader(is); }
java
public Reader create(InputStream is) throws UnsupportedEncodingException { Reader reader = create(is, getJavaEncoding()); if (reader != null) return reader; else return new ISO8859_1Reader(is); }
[ "public", "Reader", "create", "(", "InputStream", "is", ")", "throws", "UnsupportedEncodingException", "{", "Reader", "reader", "=", "create", "(", "is", ",", "getJavaEncoding", "(", ")", ")", ";", "if", "(", "reader", "!=", "null", ")", "return", "reader", ...
Returns a new encoding reader for the given stream and javaEncoding. @param is the input stream providing the bytes. @param javaEncoding the JDK name for the encoding. @return an encoding reader or null for ISO-8859-1.
[ "Returns", "a", "new", "encoding", "reader", "for", "the", "given", "stream", "and", "javaEncoding", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/io/i18n/EncodingReader.java#L78-L87
44,161
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol2/RequestHttp2.java
RequestHttp2.initRequest
@Override protected void initRequest() { super.initRequest(); _uri.clear(); _host.clear(); _headerSize = 0; _remoteHost.clear(); _remoteAddr.clear(); _serverName.clear(); _serverPort.clear(); _remotePort.clear(); _clientCert.clear(); // _isSecure = getConnection()...
java
@Override protected void initRequest() { super.initRequest(); _uri.clear(); _host.clear(); _headerSize = 0; _remoteHost.clear(); _remoteAddr.clear(); _serverName.clear(); _serverPort.clear(); _remotePort.clear(); _clientCert.clear(); // _isSecure = getConnection()...
[ "@", "Override", "protected", "void", "initRequest", "(", ")", "{", "super", ".", "initRequest", "(", ")", ";", "_uri", ".", "clear", "(", ")", ";", "_host", ".", "clear", "(", ")", ";", "_headerSize", "=", "0", ";", "_remoteHost", ".", "clear", "(",...
Clears variables at the start of a new request.
[ "Clears", "variables", "at", "the", "start", "of", "a", "new", "request", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol2/RequestHttp2.java#L450-L468
44,162
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol2/RequestHttp2.java
RequestHttp2.getHost
@Override protected CharBuffer getHost() { if (_host.length() > 0) { return _host; } _host.append(_serverName); _host.toLowerCase(); return _host; }
java
@Override protected CharBuffer getHost() { if (_host.length() > 0) { return _host; } _host.append(_serverName); _host.toLowerCase(); return _host; }
[ "@", "Override", "protected", "CharBuffer", "getHost", "(", ")", "{", "if", "(", "_host", ".", "length", "(", ")", ">", "0", ")", "{", "return", "_host", ";", "}", "_host", ".", "append", "(", "_serverName", ")", ";", "_host", ".", "toLowerCase", "("...
Returns a char buffer containing the host.
[ "Returns", "a", "char", "buffer", "containing", "the", "host", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol2/RequestHttp2.java#L509-L520
44,163
baratine/baratine
framework/src/main/java/com/caucho/v5/loader/SimpleLoader.java
SimpleLoader.setPath
@ConfigArg(0) public void setPath(PathImpl path) { if (path.getPath().endsWith(".jar") || path.getPath().endsWith(".zip")) { path = JarPath.create(path); } _path = path; }
java
@ConfigArg(0) public void setPath(PathImpl path) { if (path.getPath().endsWith(".jar") || path.getPath().endsWith(".zip")) { path = JarPath.create(path); } _path = path; }
[ "@", "ConfigArg", "(", "0", ")", "public", "void", "setPath", "(", "PathImpl", "path", ")", "{", "if", "(", "path", ".", "getPath", "(", ")", ".", "endsWith", "(", "\".jar\"", ")", "||", "path", ".", "getPath", "(", ")", ".", "endsWith", "(", "\".z...
Sets the resource directory.
[ "Sets", "the", "resource", "directory", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/loader/SimpleLoader.java#L165-L174
44,164
baratine/baratine
framework/src/main/java/com/caucho/v5/loader/SimpleLoader.java
SimpleLoader.setPrefix
public void setPrefix(String prefix) { _prefix = prefix; if (prefix != null) _pathPrefix = prefix.replace('.', '/'); }
java
public void setPrefix(String prefix) { _prefix = prefix; if (prefix != null) _pathPrefix = prefix.replace('.', '/'); }
[ "public", "void", "setPrefix", "(", "String", "prefix", ")", "{", "_prefix", "=", "prefix", ";", "if", "(", "prefix", "!=", "null", ")", "_pathPrefix", "=", "prefix", ".", "replace", "(", "'", "'", ",", "'", "'", ")", ";", "}" ]
Sets the resource prefix
[ "Sets", "the", "resource", "prefix" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/loader/SimpleLoader.java#L187-L193
44,165
baratine/baratine
framework/src/main/java/com/caucho/v5/loader/SimpleLoader.java
SimpleLoader.init
@PostConstruct @Override public void init() throws ConfigException { try { _codeSource = new CodeSource(new URL(_path.getURL()), (Certificate []) null); } catch (Exception e) { log.log(Level.FINE, e.toString(), e); } super.init(); getCla...
java
@PostConstruct @Override public void init() throws ConfigException { try { _codeSource = new CodeSource(new URL(_path.getURL()), (Certificate []) null); } catch (Exception e) { log.log(Level.FINE, e.toString(), e); } super.init(); getCla...
[ "@", "PostConstruct", "@", "Override", "public", "void", "init", "(", ")", "throws", "ConfigException", "{", "try", "{", "_codeSource", "=", "new", "CodeSource", "(", "new", "URL", "(", "_path", ".", "getURL", "(", ")", ")", ",", "(", "Certificate", "[",...
Initializes the loader.
[ "Initializes", "the", "loader", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/loader/SimpleLoader.java#L224-L239
44,166
baratine/baratine
framework/src/main/java/com/caucho/v5/loader/SimpleLoader.java
SimpleLoader.buildClassPath
@Override protected void buildClassPath(ArrayList<String> pathList) { String path = null; if (_path instanceof JarPath) path = ((JarPath) _path).getContainer().getNativePath(); else if (_path.isDirectory()) path = _path.getNativePath(); if (path != null && ! pathList.contains(path)...
java
@Override protected void buildClassPath(ArrayList<String> pathList) { String path = null; if (_path instanceof JarPath) path = ((JarPath) _path).getContainer().getNativePath(); else if (_path.isDirectory()) path = _path.getNativePath(); if (path != null && ! pathList.contains(path)...
[ "@", "Override", "protected", "void", "buildClassPath", "(", "ArrayList", "<", "String", ">", "pathList", ")", "{", "String", "path", "=", "null", ";", "if", "(", "_path", "instanceof", "JarPath", ")", "path", "=", "(", "(", "JarPath", ")", "_path", ")",...
Adds the class of this resource.
[ "Adds", "the", "class", "of", "this", "resource", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/loader/SimpleLoader.java#L275-L287
44,167
baratine/baratine
framework/src/main/java/com/caucho/v5/i18n/CharacterEncoding.java
CharacterEncoding.init
@PostConstruct public void init() throws Exception { if (_encoding == null) throw new ConfigException(L.l("character-encoding requires a 'value' attribute with the character encoding.")); _localEncoding.set(_encoding); }
java
@PostConstruct public void init() throws Exception { if (_encoding == null) throw new ConfigException(L.l("character-encoding requires a 'value' attribute with the character encoding.")); _localEncoding.set(_encoding); }
[ "@", "PostConstruct", "public", "void", "init", "(", ")", "throws", "Exception", "{", "if", "(", "_encoding", "==", "null", ")", "throw", "new", "ConfigException", "(", "L", ".", "l", "(", "\"character-encoding requires a 'value' attribute with the character encoding....
Initialize the resource.
[ "Initialize", "the", "resource", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/i18n/CharacterEncoding.java#L73-L81
44,168
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/TcpPath.java
TcpPath.schemeWalk
@Override public PathImpl schemeWalk(String userPath, Map<String,Object> newAttributes, String uri, int offset) { int length = uri.length(); if (length < 2 + offset || uri.charAt(offset) != '/' || uri.charAt(1 + offs...
java
@Override public PathImpl schemeWalk(String userPath, Map<String,Object> newAttributes, String uri, int offset) { int length = uri.length(); if (length < 2 + offset || uri.charAt(offset) != '/' || uri.charAt(1 + offs...
[ "@", "Override", "public", "PathImpl", "schemeWalk", "(", "String", "userPath", ",", "Map", "<", "String", ",", "Object", ">", "newAttributes", ",", "String", "uri", ",", "int", "offset", ")", "{", "int", "length", "=", "uri", ".", "length", "(", ")", ...
Lookup the new path assuming we're the scheme root.
[ "Lookup", "the", "new", "path", "assuming", "we", "re", "the", "scheme", "root", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/TcpPath.java#L93-L137
44,169
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/FileReadStream.java
FileReadStream.read
public int read(byte []buf, int offset, int length) throws IOException { if (_is == null) return -1; int len = _is.read(buf, offset, length); return len; }
java
public int read(byte []buf, int offset, int length) throws IOException { if (_is == null) return -1; int len = _is.read(buf, offset, length); return len; }
[ "public", "int", "read", "(", "byte", "[", "]", "buf", ",", "int", "offset", ",", "int", "length", ")", "throws", "IOException", "{", "if", "(", "_is", "==", "null", ")", "return", "-", "1", ";", "int", "len", "=", "_is", ".", "read", "(", "buf",...
Reads bytes from the file. @param buf a byte array receiving the data. @param offset starting index to receive data. @param length number of bytes to read. @return the number of bytes read or -1 on end of file.
[ "Reads", "bytes", "from", "the", "file", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/FileReadStream.java#L151-L159
44,170
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/FileReadStream.java
FileReadStream.close
public void close() throws IOException { unlock(); _fileChannel = null; InputStream is = _is; _is = null; if (is != null) is.close(); }
java
public void close() throws IOException { unlock(); _fileChannel = null; InputStream is = _is; _is = null; if (is != null) is.close(); }
[ "public", "void", "close", "(", ")", "throws", "IOException", "{", "unlock", "(", ")", ";", "_fileChannel", "=", "null", ";", "InputStream", "is", "=", "_is", ";", "_is", "=", "null", ";", "if", "(", "is", "!=", "null", ")", "is", ".", "close", "("...
Closes the underlying stream.
[ "Closes", "the", "underlying", "stream", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/FileReadStream.java#L176-L187
44,171
baratine/baratine
core/src/main/java/com/caucho/v5/amp/message/MethodMessageBase.java
MethodMessageBase.getOutboxCurrent
public static OutboxAmp getOutboxCurrent() { OutboxAmp outbox = OutboxAmp.current(); if (outbox != null) { // OutboxAmp outbox = (OutboxAmp) outboxDeliver; return outbox; } else { return OutboxAmpNull.NULL; } }
java
public static OutboxAmp getOutboxCurrent() { OutboxAmp outbox = OutboxAmp.current(); if (outbox != null) { // OutboxAmp outbox = (OutboxAmp) outboxDeliver; return outbox; } else { return OutboxAmpNull.NULL; } }
[ "public", "static", "OutboxAmp", "getOutboxCurrent", "(", ")", "{", "OutboxAmp", "outbox", "=", "OutboxAmp", ".", "current", "(", ")", ";", "if", "(", "outbox", "!=", "null", ")", "{", "// OutboxAmp outbox = (OutboxAmp) outboxDeliver;", "return", "outbox", ";", ...
Returns the calling outbox from the current context, if available. The outbox is associated with the current thread and is used to batch and deliver messages.
[ "Returns", "the", "calling", "outbox", "from", "the", "current", "context", "if", "available", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/amp/message/MethodMessageBase.java#L178-L190
44,172
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/i18n/UTF16Writer.java
UTF16Writer.write
public void write(ByteAppendable os, char ch) throws IOException { os.write(ch >> 8); os.write(ch); }
java
public void write(ByteAppendable os, char ch) throws IOException { os.write(ch >> 8); os.write(ch); }
[ "public", "void", "write", "(", "ByteAppendable", "os", ",", "char", "ch", ")", "throws", "IOException", "{", "os", ".", "write", "(", "ch", ">>", "8", ")", ";", "os", ".", "write", "(", "ch", ")", ";", "}" ]
Writes the character using the correct encoding.
[ "Writes", "the", "character", "using", "the", "correct", "encoding", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/i18n/UTF16Writer.java#L66-L71
44,173
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JClassLoader.java
JClassLoader.getSystemClassLoader
static JClassLoader getSystemClassLoader() { if (_staticClassLoader == null) _staticClassLoader = JClassLoaderWrapper.create(ClassLoader.getSystemClassLoader()); return _staticClassLoader; }
java
static JClassLoader getSystemClassLoader() { if (_staticClassLoader == null) _staticClassLoader = JClassLoaderWrapper.create(ClassLoader.getSystemClassLoader()); return _staticClassLoader; }
[ "static", "JClassLoader", "getSystemClassLoader", "(", ")", "{", "if", "(", "_staticClassLoader", "==", "null", ")", "_staticClassLoader", "=", "JClassLoaderWrapper", ".", "create", "(", "ClassLoader", ".", "getSystemClassLoader", "(", ")", ")", ";", "return", "_s...
Returns the wrapped system class loader.
[ "Returns", "the", "wrapped", "system", "class", "loader", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JClassLoader.java#L97-L103
44,174
SeaCloudsEU/SeaCloudsPlatform
discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/Discoverer.java
Discoverer.fetchOffer
public Offering fetchOffer(String cloudOfferingId) { if (cloudOfferingId == null) return null; return offeringManager.getOffering(cloudOfferingId); }
java
public Offering fetchOffer(String cloudOfferingId) { if (cloudOfferingId == null) return null; return offeringManager.getOffering(cloudOfferingId); }
[ "public", "Offering", "fetchOffer", "(", "String", "cloudOfferingId", ")", "{", "if", "(", "cloudOfferingId", "==", "null", ")", "return", "null", ";", "return", "offeringManager", ".", "getOffering", "(", "cloudOfferingId", ")", ";", "}" ]
Reads an offering from the local repository. @param cloudOfferingId The ID of the offering to read. @return The <code>Offering</code> object instance for the fetchOffer'ed ID.
[ "Reads", "an", "offering", "from", "the", "local", "repository", "." ]
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/Discoverer.java#L78-L83
44,175
SeaCloudsEU/SeaCloudsPlatform
discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/Discoverer.java
Discoverer.addOffering
public String addOffering(Offering newOffering) { if (newOffering == null) return null; String offeringName = newOffering.getName(); /* if the offering was already present in the repository it is removed */ if (offeringManager.getOffering(offeringName) != null) { ...
java
public String addOffering(Offering newOffering) { if (newOffering == null) return null; String offeringName = newOffering.getName(); /* if the offering was already present in the repository it is removed */ if (offeringManager.getOffering(offeringName) != null) { ...
[ "public", "String", "addOffering", "(", "Offering", "newOffering", ")", "{", "if", "(", "newOffering", "==", "null", ")", "return", "null", ";", "String", "offeringName", "=", "newOffering", ".", "getName", "(", ")", ";", "/* if the offering was already present in...
Inserts or eventually updates an offering in the local repository @param newOffering The <code>Offering</code> object instance representing the new offering to insert. @return the ID assigned to the newly-inserted offering.
[ "Inserts", "or", "eventually", "updates", "an", "offering", "in", "the", "local", "repository" ]
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/Discoverer.java#L91-L109
44,176
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/AbstractPrintWriter.java
AbstractPrintWriter.print
public void print(int i) { if (i == 0x80000000) { print("-2147483648"); return; } if (i < 0) { write('-'); i = -i; } else if (i < 9) { write('0' + i); return; } int length = 0; int exp = 10; if (i >= 1000000000) length = 9; else { ...
java
public void print(int i) { if (i == 0x80000000) { print("-2147483648"); return; } if (i < 0) { write('-'); i = -i; } else if (i < 9) { write('0' + i); return; } int length = 0; int exp = 10; if (i >= 1000000000) length = 9; else { ...
[ "public", "void", "print", "(", "int", "i", ")", "{", "if", "(", "i", "==", "0x80000000", ")", "{", "print", "(", "\"-2147483648\"", ")", ";", "return", ";", "}", "if", "(", "i", "<", "0", ")", "{", "write", "(", "'", "'", ")", ";", "i", "=",...
Prints an integer value.
[ "Prints", "an", "integer", "value", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/AbstractPrintWriter.java#L121-L154
44,177
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/AbstractPrintWriter.java
AbstractPrintWriter.print
public void print(long v) { if (v == 0x8000000000000000L) { print("-9223372036854775808"); return; } if (v < 0) { write('-'); v = -v; } else if (v == 0) { write('0'); return; } int j = 31; while (v > 0) { _tempCharBuffer[--j] = (char) ((v % ...
java
public void print(long v) { if (v == 0x8000000000000000L) { print("-9223372036854775808"); return; } if (v < 0) { write('-'); v = -v; } else if (v == 0) { write('0'); return; } int j = 31; while (v > 0) { _tempCharBuffer[--j] = (char) ((v % ...
[ "public", "void", "print", "(", "long", "v", ")", "{", "if", "(", "v", "==", "0x8000000000000000", "L", ")", "{", "print", "(", "\"-9223372036854775808\"", ")", ";", "return", ";", "}", "if", "(", "v", "<", "0", ")", "{", "write", "(", "'", "'", ...
Prints a long value.
[ "Prints", "a", "long", "value", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/AbstractPrintWriter.java#L159-L182
44,178
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/AbstractPrintWriter.java
AbstractPrintWriter.print
final public void print(Object v) { if (v == null) write(_nullChars, 0, _nullChars.length); else { String s = v.toString(); write(s, 0, s.length()); } }
java
final public void print(Object v) { if (v == null) write(_nullChars, 0, _nullChars.length); else { String s = v.toString(); write(s, 0, s.length()); } }
[ "final", "public", "void", "print", "(", "Object", "v", ")", "{", "if", "(", "v", "==", "null", ")", "write", "(", "_nullChars", ",", "0", ",", "_nullChars", ".", "length", ")", ";", "else", "{", "String", "s", "=", "v", ".", "toString", "(", ")"...
Prints the value of the object.
[ "Prints", "the", "value", "of", "the", "object", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/AbstractPrintWriter.java#L216-L225
44,179
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/AbstractPrintWriter.java
AbstractPrintWriter.println
final public void println(float v) { String s = String.valueOf(v); write(s, 0, s.length()); println(); }
java
final public void println(float v) { String s = String.valueOf(v); write(s, 0, s.length()); println(); }
[ "final", "public", "void", "println", "(", "float", "v", ")", "{", "String", "s", "=", "String", ".", "valueOf", "(", "v", ")", ";", "write", "(", "s", ",", "0", ",", "s", ".", "length", "(", ")", ")", ";", "println", "(", ")", ";", "}" ]
Prints a float followed by a newline. @param v the value to print
[ "Prints", "a", "float", "followed", "by", "a", "newline", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/AbstractPrintWriter.java#L284-L290
44,180
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/AbstractPrintWriter.java
AbstractPrintWriter.println
final public void println(String s) { if (s == null) write(_nullChars, 0, _nullChars.length); else write(s, 0, s.length()); println(); }
java
final public void println(String s) { if (s == null) write(_nullChars, 0, _nullChars.length); else write(s, 0, s.length()); println(); }
[ "final", "public", "void", "println", "(", "String", "s", ")", "{", "if", "(", "s", "==", "null", ")", "write", "(", "_nullChars", ",", "0", ",", "_nullChars", ".", "length", ")", ";", "else", "write", "(", "s", ",", "0", ",", "s", ".", "length",...
Writes a string followed by a newline.
[ "Writes", "a", "string", "followed", "by", "a", "newline", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/AbstractPrintWriter.java#L319-L327
44,181
baratine/baratine
framework/src/main/java/com/caucho/v5/bartender/network/NetworkBartenderServiceImpl.java
NetworkBartenderServiceImpl.configureServer
private void configureServer(ServerBartender server) { // XXX: mixing server/client ServerNetwork serverNet = _serverMap.get(server.getId()); if (serverNet == null) { serverNet = new ServerNetwork(_system, server); configServer(serverNet, server); serverNet.init(); ...
java
private void configureServer(ServerBartender server) { // XXX: mixing server/client ServerNetwork serverNet = _serverMap.get(server.getId()); if (serverNet == null) { serverNet = new ServerNetwork(_system, server); configServer(serverNet, server); serverNet.init(); ...
[ "private", "void", "configureServer", "(", "ServerBartender", "server", ")", "{", "// XXX: mixing server/client", "ServerNetwork", "serverNet", "=", "_serverMap", ".", "get", "(", "server", ".", "getId", "(", ")", ")", ";", "if", "(", "serverNet", "==", "null", ...
Configures the server.
[ "Configures", "the", "server", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/bartender/network/NetworkBartenderServiceImpl.java#L258-L273
44,182
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JTypeWrapper.java
JTypeWrapper.getActualTypeArguments
public JType []getActualTypeArguments() { Type []rawArgs = _type.getActualTypeArguments(); JType []args = new JType[rawArgs.length]; for (int i = 0; i < args.length; i++) { Type type = rawArgs[i]; if (type instanceof Class) { args[i] = _loader.forName(((Class) type).getName()); ...
java
public JType []getActualTypeArguments() { Type []rawArgs = _type.getActualTypeArguments(); JType []args = new JType[rawArgs.length]; for (int i = 0; i < args.length; i++) { Type type = rawArgs[i]; if (type instanceof Class) { args[i] = _loader.forName(((Class) type).getName()); ...
[ "public", "JType", "[", "]", "getActualTypeArguments", "(", ")", "{", "Type", "[", "]", "rawArgs", "=", "_type", ".", "getActualTypeArguments", "(", ")", ";", "JType", "[", "]", "args", "=", "new", "JType", "[", "rawArgs", ".", "length", "]", ";", "for...
Returns the actual type arguments.
[ "Returns", "the", "actual", "type", "arguments", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JTypeWrapper.java#L103-L124
44,183
baratine/baratine
kraken/src/main/java/com/caucho/v5/kraken/table/KrakenImpl.java
KrakenImpl.close
public void close() { if (_isClosed) { return; } _isClosed = true; KelpManager backing = _kelpBacking; // _localBacking = null; if (backing != null) { backing.close(); } }
java
public void close() { if (_isClosed) { return; } _isClosed = true; KelpManager backing = _kelpBacking; // _localBacking = null; if (backing != null) { backing.close(); } }
[ "public", "void", "close", "(", ")", "{", "if", "(", "_isClosed", ")", "{", "return", ";", "}", "_isClosed", "=", "true", ";", "KelpManager", "backing", "=", "_kelpBacking", ";", "// _localBacking = null;", "if", "(", "backing", "!=", "null", ")", "{", "...
Closes the manager.
[ "Closes", "the", "manager", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kraken/table/KrakenImpl.java#L306-L320
44,184
baratine/baratine
kraken/src/main/java/com/caucho/v5/kraken/table/KrakenImpl.java
KrakenImpl.map
public void map(MethodRef method, String sql, Object []args) { QueryBuilderKraken builder = QueryParserKraken.parse(this, sql); if (builder.isTableLoaded()) { QueryKraken query = builder.build(); query.map(method, args); } else { String tableName = builder.getTableName()...
java
public void map(MethodRef method, String sql, Object []args) { QueryBuilderKraken builder = QueryParserKraken.parse(this, sql); if (builder.isTableLoaded()) { QueryKraken query = builder.build(); query.map(method, args); } else { String tableName = builder.getTableName()...
[ "public", "void", "map", "(", "MethodRef", "method", ",", "String", "sql", ",", "Object", "[", "]", "args", ")", "{", "QueryBuilderKraken", "builder", "=", "QueryParserKraken", ".", "parse", "(", "this", ",", "sql", ")", ";", "if", "(", "builder", ".", ...
Maps results to a method callback.
[ "Maps", "results", "to", "a", "method", "callback", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kraken/table/KrakenImpl.java#L601-L616
44,185
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/StderrStream.java
StderrStream.create
public static StderrStream create() { if (_stderr == null) { _stderr = new StderrStream(); ConstPath path = new ConstPath(null, _stderr); path.setScheme("stderr"); //_stderr.setPath(path); } return _stderr; }
java
public static StderrStream create() { if (_stderr == null) { _stderr = new StderrStream(); ConstPath path = new ConstPath(null, _stderr); path.setScheme("stderr"); //_stderr.setPath(path); } return _stderr; }
[ "public", "static", "StderrStream", "create", "(", ")", "{", "if", "(", "_stderr", "==", "null", ")", "{", "_stderr", "=", "new", "StderrStream", "(", ")", ";", "ConstPath", "path", "=", "new", "ConstPath", "(", "null", ",", "_stderr", ")", ";", "path"...
Returns the StderrStream singleton
[ "Returns", "the", "StderrStream", "singleton" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/StderrStream.java#L49-L59
44,186
baratine/baratine
core/src/main/java/com/caucho/v5/util/Murmur64.java
Murmur64.generate
public static long generate(long hash, final CharSequence value) { final long m = 0xc6a4a7935bd1e995L; final int r = 47; int strlen = value.length(); int length = 2 * strlen; hash ^= length * m; int len4 = strlen / 4; int offset = 0; f...
java
public static long generate(long hash, final CharSequence value) { final long m = 0xc6a4a7935bd1e995L; final int r = 47; int strlen = value.length(); int length = 2 * strlen; hash ^= length * m; int len4 = strlen / 4; int offset = 0; f...
[ "public", "static", "long", "generate", "(", "long", "hash", ",", "final", "CharSequence", "value", ")", "{", "final", "long", "m", "=", "0xc6a4a7935bd1e995", "", "L", ";", "final", "int", "r", "=", "47", ";", "int", "strlen", "=", "value", ".", "lengt...
Calculates hash from a String, using utf-16 encoding
[ "Calculates", "hash", "from", "a", "String", "using", "utf", "-", "16", "encoding" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/util/Murmur64.java#L94-L137
44,187
chyxion/table-to-xls
src/main/java/me/chyxion/xls/TableToXls.java
TableToXls.process
public static byte[] process(CharSequence html) { ByteArrayOutputStream baos = null; try { baos = new ByteArrayOutputStream(); process(html, baos); return baos.toByteArray(); } finally { if (baos != null) { try { baos.close(); } catch (IOException e) { log.warn("Close Byte Arra...
java
public static byte[] process(CharSequence html) { ByteArrayOutputStream baos = null; try { baos = new ByteArrayOutputStream(); process(html, baos); return baos.toByteArray(); } finally { if (baos != null) { try { baos.close(); } catch (IOException e) { log.warn("Close Byte Arra...
[ "public", "static", "byte", "[", "]", "process", "(", "CharSequence", "html", ")", "{", "ByteArrayOutputStream", "baos", "=", "null", ";", "try", "{", "baos", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "process", "(", "html", ",", "baos", ")", "...
process html to xls @param html html char sequence @return xls bytes
[ "process", "html", "to", "xls" ]
8dc0ab06b336c65ce949a974fb4930ee24d54ba7
https://github.com/chyxion/table-to-xls/blob/8dc0ab06b336c65ce949a974fb4930ee24d54ba7/src/main/java/me/chyxion/xls/TableToXls.java#L87-L104
44,188
chyxion/table-to-xls
src/main/java/me/chyxion/xls/TableToXls.java
TableToXls.process
public static void process(CharSequence html, OutputStream output) { new TableToXls().doProcess( html instanceof String ? (String) html : html.toString(), output); }
java
public static void process(CharSequence html, OutputStream output) { new TableToXls().doProcess( html instanceof String ? (String) html : html.toString(), output); }
[ "public", "static", "void", "process", "(", "CharSequence", "html", ",", "OutputStream", "output", ")", "{", "new", "TableToXls", "(", ")", ".", "doProcess", "(", "html", "instanceof", "String", "?", "(", "String", ")", "html", ":", "html", ".", "toString"...
process html to output stream @param html html char sequence @param output output stream
[ "process", "html", "to", "output", "stream" ]
8dc0ab06b336c65ce949a974fb4930ee24d54ba7
https://github.com/chyxion/table-to-xls/blob/8dc0ab06b336c65ce949a974fb4930ee24d54ba7/src/main/java/me/chyxion/xls/TableToXls.java#L111-L114
44,189
baratine/baratine
framework/src/main/java/com/caucho/v5/amp/journal/JournalImpl.java
JournalImpl.writeSend
@Override public void writeSend(StubAmp actor, String methodName, Object[] args, InboxAmp inbox) { try (OutputStream os = openItem(inbox)) { // XXX: should keep open try (OutH3 out = _serializer.out(os)) { String key = a...
java
@Override public void writeSend(StubAmp actor, String methodName, Object[] args, InboxAmp inbox) { try (OutputStream os = openItem(inbox)) { // XXX: should keep open try (OutH3 out = _serializer.out(os)) { String key = a...
[ "@", "Override", "public", "void", "writeSend", "(", "StubAmp", "actor", ",", "String", "methodName", ",", "Object", "[", "]", "args", ",", "InboxAmp", "inbox", ")", "{", "try", "(", "OutputStream", "os", "=", "openItem", "(", "inbox", ")", ")", "{", "...
Writes the send to the journal. The queryRef values are not saved, because restoring them does not make sense.
[ "Writes", "the", "send", "to", "the", "journal", ".", "The", "queryRef", "values", "are", "not", "saved", "because", "restoring", "them", "does", "not", "make", "sense", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/amp/journal/JournalImpl.java#L213-L238
44,190
baratine/baratine
core/src/main/java/com/caucho/v5/loader/ClassEntry.java
ClassEntry.addDependencies
protected boolean addDependencies(DependencyContainer container) { /* XXX: if (_classPath instanceof JarPath) { container.add(_depend); return false; } else */ if (_hasJNIReload) { container.add(this); return true; } else if (_sourcePath == null) { contai...
java
protected boolean addDependencies(DependencyContainer container) { /* XXX: if (_classPath instanceof JarPath) { container.add(_depend); return false; } else */ if (_hasJNIReload) { container.add(this); return true; } else if (_sourcePath == null) { contai...
[ "protected", "boolean", "addDependencies", "(", "DependencyContainer", "container", ")", "{", "/* XXX:\n if (_classPath instanceof JarPath) {\n container.add(_depend);\n return false;\n }\n else\n */", "if", "(", "_hasJNIReload", ")", "{", "container", ".", "add...
Adds the dependencies, returning true if it's adding itself.
[ "Adds", "the", "dependencies", "returning", "true", "if", "it", "s", "adding", "itself", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/loader/ClassEntry.java#L166-L187
44,191
baratine/baratine
core/src/main/java/com/caucho/v5/loader/ClassEntry.java
ClassEntry.reloadIsModified
public boolean reloadIsModified() { if (_classIsModified) { return true; } if (! _hasJNIReload || ! _classPath.canRead()) { return true; } try { long length = _classPath.length(); Class<?> cl = _clRef != null ? _clRef.get() : null; if (cl == null) { re...
java
public boolean reloadIsModified() { if (_classIsModified) { return true; } if (! _hasJNIReload || ! _classPath.canRead()) { return true; } try { long length = _classPath.length(); Class<?> cl = _clRef != null ? _clRef.get() : null; if (cl == null) { re...
[ "public", "boolean", "reloadIsModified", "(", ")", "{", "if", "(", "_classIsModified", ")", "{", "return", "true", ";", "}", "if", "(", "!", "_hasJNIReload", "||", "!", "_classPath", ".", "canRead", "(", ")", ")", "{", "return", "true", ";", "}", "try"...
Returns true if the reload doesn't avoid the dependency.
[ "Returns", "true", "if", "the", "reload", "doesn", "t", "avoid", "the", "dependency", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/loader/ClassEntry.java#L301-L353
44,192
baratine/baratine
core/src/main/java/com/caucho/v5/loader/ClassEntry.java
ClassEntry.load
public void load(ByteArrayBuffer buffer) throws IOException { synchronized (this) { Source classPath = getClassPath(); buffer.clear(); int retry = 3; for (int i = 0; i < retry; i++) { long length = -1; try (InputStream is = classPath.inputStream()) { ...
java
public void load(ByteArrayBuffer buffer) throws IOException { synchronized (this) { Source classPath = getClassPath(); buffer.clear(); int retry = 3; for (int i = 0; i < retry; i++) { long length = -1; try (InputStream is = classPath.inputStream()) { ...
[ "public", "void", "load", "(", "ByteArrayBuffer", "buffer", ")", "throws", "IOException", "{", "synchronized", "(", "this", ")", "{", "Source", "classPath", "=", "getClassPath", "(", ")", ";", "buffer", ".", "clear", "(", ")", ";", "int", "retry", "=", "...
Loads the contents of the class file into the buffer.
[ "Loads", "the", "contents", "of", "the", "class", "file", "into", "the", "buffer", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/loader/ClassEntry.java#L384-L418
44,193
baratine/baratine
web/src/main/java/com/caucho/v5/subsystem/SystemManager.java
SystemManager.getCurrent
public static SystemManager getCurrent() { SystemManager system = _systemLocal.get(); if (system == null) { WeakReference<SystemManager> globalRef = _globalSystemRef; if (globalRef != null) { system = globalRef.get(); } } return system; }
java
public static SystemManager getCurrent() { SystemManager system = _systemLocal.get(); if (system == null) { WeakReference<SystemManager> globalRef = _globalSystemRef; if (globalRef != null) { system = globalRef.get(); } } return system; }
[ "public", "static", "SystemManager", "getCurrent", "(", ")", "{", "SystemManager", "system", "=", "_systemLocal", ".", "get", "(", ")", ";", "if", "(", "system", "==", "null", ")", "{", "WeakReference", "<", "SystemManager", ">", "globalRef", "=", "_globalSy...
Returns the current server
[ "Returns", "the", "current", "server" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/subsystem/SystemManager.java#L167-L180
44,194
baratine/baratine
web/src/main/java/com/caucho/v5/subsystem/SystemManager.java
SystemManager.getCurrentSystem
public static <T extends SubSystem> T getCurrentSystem(Class<T> systemClass) { SystemManager manager = getCurrent(); if (manager != null) return manager.getSystem(systemClass); else return null; }
java
public static <T extends SubSystem> T getCurrentSystem(Class<T> systemClass) { SystemManager manager = getCurrent(); if (manager != null) return manager.getSystem(systemClass); else return null; }
[ "public", "static", "<", "T", "extends", "SubSystem", ">", "T", "getCurrentSystem", "(", "Class", "<", "T", ">", "systemClass", ")", "{", "SystemManager", "manager", "=", "getCurrent", "(", ")", ";", "if", "(", "manager", "!=", "null", ")", "return", "ma...
Returns the current identified system.
[ "Returns", "the", "current", "identified", "system", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/subsystem/SystemManager.java#L203-L212
44,195
baratine/baratine
web/src/main/java/com/caucho/v5/subsystem/SystemManager.java
SystemManager.getCurrentId
public static String getCurrentId() { SystemManager system = getCurrent(); if (system == null) { ClassLoader loader = Thread.currentThread().getContextClassLoader(); throw new IllegalStateException(L.l("{0} is not available in this context.\n {1}", Syst...
java
public static String getCurrentId() { SystemManager system = getCurrent(); if (system == null) { ClassLoader loader = Thread.currentThread().getContextClassLoader(); throw new IllegalStateException(L.l("{0} is not available in this context.\n {1}", Syst...
[ "public", "static", "String", "getCurrentId", "(", ")", "{", "SystemManager", "system", "=", "getCurrent", "(", ")", ";", "if", "(", "system", "==", "null", ")", "{", "ClassLoader", "loader", "=", "Thread", ".", "currentThread", "(", ")", ".", "getContextC...
Returns the current system id.
[ "Returns", "the", "current", "system", "id", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/subsystem/SystemManager.java#L231-L244
44,196
baratine/baratine
web/src/main/java/com/caucho/v5/subsystem/SystemManager.java
SystemManager.addSystemIfAbsent
public <T extends SubSystem> T addSystemIfAbsent(T system) { return addSystemIfAbsent(system.getClass(), system); }
java
public <T extends SubSystem> T addSystemIfAbsent(T system) { return addSystemIfAbsent(system.getClass(), system); }
[ "public", "<", "T", "extends", "SubSystem", ">", "T", "addSystemIfAbsent", "(", "T", "system", ")", "{", "return", "addSystemIfAbsent", "(", "system", ".", "getClass", "(", ")", ",", "system", ")", ";", "}" ]
Adds a new service.
[ "Adds", "a", "new", "service", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/subsystem/SystemManager.java#L423-L426
44,197
baratine/baratine
web/src/main/java/com/caucho/v5/subsystem/SystemManager.java
SystemManager.getSystem
@SuppressWarnings("unchecked") public <T extends SubSystem> T getSystem(Class<T> cl) { return (T) _systemMap.get(cl); }
java
@SuppressWarnings("unchecked") public <T extends SubSystem> T getSystem(Class<T> cl) { return (T) _systemMap.get(cl); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", "extends", "SubSystem", ">", "T", "getSystem", "(", "Class", "<", "T", ">", "cl", ")", "{", "return", "(", "T", ")", "_systemMap", ".", "get", "(", "cl", ")", ";", "}" ]
Returns the system for the given class.
[ "Returns", "the", "system", "for", "the", "given", "class", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/subsystem/SystemManager.java#L454-L458
44,198
baratine/baratine
web/src/main/java/com/caucho/v5/subsystem/SystemManager.java
SystemManager.stop
private void stop(ShutdownModeAmp mode) { _shutdownMode = mode; Thread thread = Thread.currentThread(); ClassLoader oldLoader = thread.getContextClassLoader(); try { thread.setContextClassLoader(_classLoader); if (! _lifecycle.toStopping()) { return; } TreeSet<S...
java
private void stop(ShutdownModeAmp mode) { _shutdownMode = mode; Thread thread = Thread.currentThread(); ClassLoader oldLoader = thread.getContextClassLoader(); try { thread.setContextClassLoader(_classLoader); if (! _lifecycle.toStopping()) { return; } TreeSet<S...
[ "private", "void", "stop", "(", "ShutdownModeAmp", "mode", ")", "{", "_shutdownMode", "=", "mode", ";", "Thread", "thread", "=", "Thread", ".", "currentThread", "(", ")", ";", "ClassLoader", "oldLoader", "=", "thread", ".", "getContextClassLoader", "(", ")", ...
stops the server.
[ "stops", "the", "server", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/subsystem/SystemManager.java#L604-L644
44,199
baratine/baratine
web/src/main/java/com/caucho/v5/subsystem/SystemManager.java
SystemManager.shutdown
public void shutdown(ShutdownModeAmp mode) { stop(mode); if (! _lifecycle.toDestroy()) { return; } Thread thread = Thread.currentThread(); ClassLoader oldLoader = thread.getContextClassLoader(); try { thread.setContextClassLoader(_classLoader); TreeSet<SubSystem> syst...
java
public void shutdown(ShutdownModeAmp mode) { stop(mode); if (! _lifecycle.toDestroy()) { return; } Thread thread = Thread.currentThread(); ClassLoader oldLoader = thread.getContextClassLoader(); try { thread.setContextClassLoader(_classLoader); TreeSet<SubSystem> syst...
[ "public", "void", "shutdown", "(", "ShutdownModeAmp", "mode", ")", "{", "stop", "(", "mode", ")", ";", "if", "(", "!", "_lifecycle", ".", "toDestroy", "(", ")", ")", "{", "return", ";", "}", "Thread", "thread", "=", "Thread", ".", "currentThread", "(",...
Shuts down the server in the given mode.
[ "Shuts", "down", "the", "server", "in", "the", "given", "mode", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/subsystem/SystemManager.java#L658-L707