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
108,200
Red5/red5-server-common
src/main/java/org/red5/server/net/rtmp/RTMPConnection.java
RTMPConnection.customizeStream
private void customizeStream(Number streamId, AbstractClientStream stream) { Integer buffer = streamBuffers.get(streamId.doubleValue()); if (buffer != null) { stream.setClientBufferDuration(buffer); } stream.setName(createStreamName()); stream.setConnection(this...
java
private void customizeStream(Number streamId, AbstractClientStream stream) { Integer buffer = streamBuffers.get(streamId.doubleValue()); if (buffer != null) { stream.setClientBufferDuration(buffer); } stream.setName(createStreamName()); stream.setConnection(this...
[ "private", "void", "customizeStream", "(", "Number", "streamId", ",", "AbstractClientStream", "stream", ")", "{", "Integer", "buffer", "=", "streamBuffers", ".", "get", "(", "streamId", ".", "doubleValue", "(", ")", ")", ";", "if", "(", "buffer", "!=", "null...
Specify name, connection, scope and etc for stream @param streamId Stream id @param stream Stream
[ "Specify", "name", "connection", "scope", "and", "etc", "for", "stream" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/net/rtmp/RTMPConnection.java#L909-L918
108,201
Red5/red5-server-common
src/main/java/org/red5/server/net/rtmp/RTMPConnection.java
RTMPConnection.registerStream
private boolean registerStream(IClientStream stream) { if (streams.putIfAbsent(stream.getStreamId().doubleValue(), stream) == null) { usedStreams.incrementAndGet(); return true; } log.error("Unable to register stream {}, stream with id {} was already added", stream, ...
java
private boolean registerStream(IClientStream stream) { if (streams.putIfAbsent(stream.getStreamId().doubleValue(), stream) == null) { usedStreams.incrementAndGet(); return true; } log.error("Unable to register stream {}, stream with id {} was already added", stream, ...
[ "private", "boolean", "registerStream", "(", "IClientStream", "stream", ")", "{", "if", "(", "streams", ".", "putIfAbsent", "(", "stream", ".", "getStreamId", "(", ")", ".", "doubleValue", "(", ")", ",", "stream", ")", "==", "null", ")", "{", "usedStreams"...
Store a stream in the connection. @param stream
[ "Store", "a", "stream", "in", "the", "connection", "." ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/net/rtmp/RTMPConnection.java#L925-L932
108,202
Red5/red5-server-common
src/main/java/org/red5/server/net/rtmp/RTMPConnection.java
RTMPConnection.updateBytesRead
protected void updateBytesRead() { if (log.isTraceEnabled()) { log.trace("updateBytesRead"); } long bytesRead = getReadBytes(); if (bytesRead >= nextBytesRead) { BytesRead sbr = new BytesRead((int) (bytesRead % Integer.MAX_VALUE)); getChannel(2)...
java
protected void updateBytesRead() { if (log.isTraceEnabled()) { log.trace("updateBytesRead"); } long bytesRead = getReadBytes(); if (bytesRead >= nextBytesRead) { BytesRead sbr = new BytesRead((int) (bytesRead % Integer.MAX_VALUE)); getChannel(2)...
[ "protected", "void", "updateBytesRead", "(", ")", "{", "if", "(", "log", ".", "isTraceEnabled", "(", ")", ")", "{", "log", ".", "trace", "(", "\"updateBytesRead\"", ")", ";", "}", "long", "bytesRead", "=", "getReadBytes", "(", ")", ";", "if", "(", "byt...
Update number of bytes to read next value.
[ "Update", "number", "of", "bytes", "to", "read", "next", "value", "." ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/net/rtmp/RTMPConnection.java#L1118-L1128
108,203
Red5/red5-server-common
src/main/java/org/red5/server/net/rtmp/RTMPConnection.java
RTMPConnection.receivedBytesRead
public void receivedBytesRead(int bytes) { if (log.isDebugEnabled()) { log.debug("Client received {} bytes, written {} bytes, {} messages pending", new Object[] { bytes, getWrittenBytes(), getPendingMessages() }); } clientBytesRead.addAndGet(bytes); }
java
public void receivedBytesRead(int bytes) { if (log.isDebugEnabled()) { log.debug("Client received {} bytes, written {} bytes, {} messages pending", new Object[] { bytes, getWrittenBytes(), getPendingMessages() }); } clientBytesRead.addAndGet(bytes); }
[ "public", "void", "receivedBytesRead", "(", "int", "bytes", ")", "{", "if", "(", "log", ".", "isDebugEnabled", "(", ")", ")", "{", "log", ".", "debug", "(", "\"Client received {} bytes, written {} bytes, {} messages pending\"", ",", "new", "Object", "[", "]", "{...
Read number of received bytes. @param bytes Number of bytes
[ "Read", "number", "of", "received", "bytes", "." ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/net/rtmp/RTMPConnection.java#L1136-L1141
108,204
Red5/red5-server-common
src/main/java/org/red5/server/net/rtmp/RTMPConnection.java
RTMPConnection.writingMessage
protected void writingMessage(Packet message) { if (message.getMessage() instanceof VideoData) { Number streamId = message.getHeader().getStreamId(); final AtomicInteger value = new AtomicInteger(); AtomicInteger old = pendingVideos.putIfAbsent(streamId.doubleValue(), val...
java
protected void writingMessage(Packet message) { if (message.getMessage() instanceof VideoData) { Number streamId = message.getHeader().getStreamId(); final AtomicInteger value = new AtomicInteger(); AtomicInteger old = pendingVideos.putIfAbsent(streamId.doubleValue(), val...
[ "protected", "void", "writingMessage", "(", "Packet", "message", ")", "{", "if", "(", "message", ".", "getMessage", "(", ")", "instanceof", "VideoData", ")", "{", "Number", "streamId", "=", "message", ".", "getHeader", "(", ")", ".", "getStreamId", "(", ")...
Mark message as being written. @param message Message to mark
[ "Mark", "message", "as", "being", "written", "." ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/net/rtmp/RTMPConnection.java#L1298-L1308
108,205
Red5/red5-server-common
src/main/java/org/red5/server/net/rtmp/RTMPConnection.java
RTMPConnection.handleMessageReceived
public void handleMessageReceived(Packet packet) { if (log.isTraceEnabled()) { log.trace("handleMessageReceived - {}", sessionId); } // set the packet expiration time if maxHandlingTimeout is not disabled (set to 0) if (maxHandlingTimeout > 0) { packet.setEx...
java
public void handleMessageReceived(Packet packet) { if (log.isTraceEnabled()) { log.trace("handleMessageReceived - {}", sessionId); } // set the packet expiration time if maxHandlingTimeout is not disabled (set to 0) if (maxHandlingTimeout > 0) { packet.setEx...
[ "public", "void", "handleMessageReceived", "(", "Packet", "packet", ")", "{", "if", "(", "log", ".", "isTraceEnabled", "(", ")", ")", "{", "log", ".", "trace", "(", "\"handleMessageReceived - {}\"", ",", "sessionId", ")", ";", "}", "// set the packet expiration ...
Handle the incoming message. @param packet incoming message packet
[ "Handle", "the", "incoming", "message", "." ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/net/rtmp/RTMPConnection.java#L1370-L1442
108,206
Red5/red5-server-common
src/main/java/org/red5/server/net/rtmp/RTMPConnection.java
RTMPConnection.messageSent
public void messageSent(Packet message) { if (message.getMessage() instanceof VideoData) { Number streamId = message.getHeader().getStreamId(); AtomicInteger pending = pendingVideos.get(streamId.doubleValue()); if (log.isTraceEnabled()) { log.trace("Strea...
java
public void messageSent(Packet message) { if (message.getMessage() instanceof VideoData) { Number streamId = message.getHeader().getStreamId(); AtomicInteger pending = pendingVideos.get(streamId.doubleValue()); if (log.isTraceEnabled()) { log.trace("Strea...
[ "public", "void", "messageSent", "(", "Packet", "message", ")", "{", "if", "(", "message", ".", "getMessage", "(", ")", "instanceof", "VideoData", ")", "{", "Number", "streamId", "=", "message", ".", "getHeader", "(", ")", ".", "getStreamId", "(", ")", "...
Mark message as sent. @param message Message to mark
[ "Mark", "message", "as", "sent", "." ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/net/rtmp/RTMPConnection.java#L1521-L1533
108,207
Red5/red5-server-common
src/main/java/org/red5/server/net/rtmp/RTMPConnection.java
RTMPConnection.sendSharedObjectMessage
public void sendSharedObjectMessage(String name, int currentVersion, boolean persistent, Set<ISharedObjectEvent> events) { // create a new sync message for every client to avoid concurrent access through multiple threads SharedObjectMessage syncMessage = state.getEncoding() == Encoding.AMF3 ? new Flex...
java
public void sendSharedObjectMessage(String name, int currentVersion, boolean persistent, Set<ISharedObjectEvent> events) { // create a new sync message for every client to avoid concurrent access through multiple threads SharedObjectMessage syncMessage = state.getEncoding() == Encoding.AMF3 ? new Flex...
[ "public", "void", "sendSharedObjectMessage", "(", "String", "name", ",", "int", "currentVersion", ",", "boolean", "persistent", ",", "Set", "<", "ISharedObjectEvent", ">", "events", ")", "{", "// create a new sync message for every client to avoid concurrent access through mu...
Send a shared object message. @param name shared object name @param currentVersion the current version @param persistent toggle @param events shared object events
[ "Send", "a", "shared", "object", "message", "." ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/net/rtmp/RTMPConnection.java#L1573-L1587
108,208
Red5/red5-server-common
src/main/java/org/red5/server/net/rtmp/RTMPConnection.java
RTMPConnection.pingReceived
public void pingReceived(Ping pong) { long now = System.currentTimeMillis(); long previousPingTime = lastPingSentOn.get(); int previousPingValue = (int) (previousPingTime & 0xffffffffL); int pongValue = pong.getValue2().intValue(); if (log.isDebugEnabled()) { lo...
java
public void pingReceived(Ping pong) { long now = System.currentTimeMillis(); long previousPingTime = lastPingSentOn.get(); int previousPingValue = (int) (previousPingTime & 0xffffffffL); int pongValue = pong.getValue2().intValue(); if (log.isDebugEnabled()) { lo...
[ "public", "void", "pingReceived", "(", "Ping", "pong", ")", "{", "long", "now", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "long", "previousPingTime", "=", "lastPingSentOn", ".", "get", "(", ")", ";", "int", "previousPingValue", "=", "(", "int...
Marks that ping back was received. @param pong Ping object
[ "Marks", "that", "ping", "back", "was", "received", "." ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/net/rtmp/RTMPConnection.java#L1612-L1633
108,209
metafacture/metafacture-core
metafacture-commons/src/main/java/org/metafacture/commons/tries/SetMatcher.java
SetMatcher.printAutomaton
public void printAutomaton(final PrintStream out) { out.println("digraph ahocorasick {"); printDebug(out, root); out.println("}"); }
java
public void printAutomaton(final PrintStream out) { out.println("digraph ahocorasick {"); printDebug(out, root); out.println("}"); }
[ "public", "void", "printAutomaton", "(", "final", "PrintStream", "out", ")", "{", "out", ".", "println", "(", "\"digraph ahocorasick {\"", ")", ";", "printDebug", "(", "out", ",", "root", ")", ";", "out", ".", "println", "(", "\"}\"", ")", ";", "}" ]
Prints dot description of the automaton to out for visualization in GraphViz. Used for debugging and education. @param out the stream t which the description is written
[ "Prints", "dot", "description", "of", "the", "automaton", "to", "out", "for", "visualization", "in", "GraphViz", ".", "Used", "for", "debugging", "and", "education", "." ]
cb43933ec8eb01a4ddce4019c14b2415cc441918
https://github.com/metafacture/metafacture-core/blob/cb43933ec8eb01a4ddce4019c14b2415cc441918/metafacture-commons/src/main/java/org/metafacture/commons/tries/SetMatcher.java#L135-L139
108,210
metafacture/metafacture-core
metafacture-json/src/main/java/org/metafacture/json/JsonEncoder.java
JsonEncoder.setJavaScriptEscapeChars
public void setJavaScriptEscapeChars(final int[] escapeCharacters) { final CharacterEscapes ce = new CharacterEscapes() { private static final long serialVersionUID = 1L; @Override public int[] getEscapeCodesForAscii() { if (escapeCharacters == null) { ...
java
public void setJavaScriptEscapeChars(final int[] escapeCharacters) { final CharacterEscapes ce = new CharacterEscapes() { private static final long serialVersionUID = 1L; @Override public int[] getEscapeCodesForAscii() { if (escapeCharacters == null) { ...
[ "public", "void", "setJavaScriptEscapeChars", "(", "final", "int", "[", "]", "escapeCharacters", ")", "{", "final", "CharacterEscapes", "ce", "=", "new", "CharacterEscapes", "(", ")", "{", "private", "static", "final", "long", "serialVersionUID", "=", "1L", ";",...
By default JSON output does only have escaping where it is strictly necessary. This is recommended in the most cases. Nevertheless it can be sometimes useful to have some more escaping. @param escapeCharacters an array which defines which characters should be escaped and how it will be done. See {@link CharacterEscape...
[ "By", "default", "JSON", "output", "does", "only", "have", "escaping", "where", "it", "is", "strictly", "necessary", ".", "This", "is", "recommended", "in", "the", "most", "cases", ".", "Nevertheless", "it", "can", "be", "sometimes", "useful", "to", "have", ...
cb43933ec8eb01a4ddce4019c14b2415cc441918
https://github.com/metafacture/metafacture-core/blob/cb43933ec8eb01a4ddce4019c14b2415cc441918/metafacture-json/src/main/java/org/metafacture/json/JsonEncoder.java#L92-L115
108,211
metafacture/metafacture-core
metafacture-flowcontrol/src/main/java/org/metafacture/flowcontrol/StreamBuffer.java
StreamBuffer.replay
public void replay() { int index = 0; for (MessageType type : typeBuffer) { switch (type) { case RECORD_START: getReceiver().startRecord(valueBuffer.get(index)); ++index; break; case RECORD_END: getRecei...
java
public void replay() { int index = 0; for (MessageType type : typeBuffer) { switch (type) { case RECORD_START: getReceiver().startRecord(valueBuffer.get(index)); ++index; break; case RECORD_END: getRecei...
[ "public", "void", "replay", "(", ")", "{", "int", "index", "=", "0", ";", "for", "(", "MessageType", "type", ":", "typeBuffer", ")", "{", "switch", "(", "type", ")", "{", "case", "RECORD_START", ":", "getReceiver", "(", ")", ".", "startRecord", "(", ...
Replays the buffered event.
[ "Replays", "the", "buffered", "event", "." ]
cb43933ec8eb01a4ddce4019c14b2415cc441918
https://github.com/metafacture/metafacture-core/blob/cb43933ec8eb01a4ddce4019c14b2415cc441918/metafacture-flowcontrol/src/main/java/org/metafacture/flowcontrol/StreamBuffer.java#L54-L80
108,212
metafacture/metafacture-core
metamorph/src/main/java/org/metafacture/metamorph/InlineMorph.java
InlineMorph.with
public InlineMorph with(String line) { if (scriptBuilder.length() == 0) { appendBoilerplate(line); } scriptBuilder .append(line) .append("\n"); return this; }
java
public InlineMorph with(String line) { if (scriptBuilder.length() == 0) { appendBoilerplate(line); } scriptBuilder .append(line) .append("\n"); return this; }
[ "public", "InlineMorph", "with", "(", "String", "line", ")", "{", "if", "(", "scriptBuilder", ".", "length", "(", ")", "==", "0", ")", "{", "appendBoilerplate", "(", "line", ")", ";", "}", "scriptBuilder", ".", "append", "(", "line", ")", ".", "append"...
Adds a line to the morph script. @param line the next line of the morph script @return a reference to {@code this} for continuation
[ "Adds", "a", "line", "to", "the", "morph", "script", "." ]
cb43933ec8eb01a4ddce4019c14b2415cc441918
https://github.com/metafacture/metafacture-core/blob/cb43933ec8eb01a4ddce4019c14b2415cc441918/metamorph/src/main/java/org/metafacture/metamorph/InlineMorph.java#L105-L113
108,213
metafacture/metafacture-core
metafacture-commons/src/main/java/org/metafacture/commons/StringUtil.java
StringUtil.repeatChars
public static String repeatChars(final char ch, final int count) { return CharBuffer.allocate(count).toString().replace('\0', ch); }
java
public static String repeatChars(final char ch, final int count) { return CharBuffer.allocate(count).toString().replace('\0', ch); }
[ "public", "static", "String", "repeatChars", "(", "final", "char", "ch", ",", "final", "int", "count", ")", "{", "return", "CharBuffer", ".", "allocate", "(", "count", ")", ".", "toString", "(", ")", ".", "replace", "(", "'", "'", ",", "ch", ")", ";"...
Creates a string which contains a sequence of repeated characters. @param ch to repeat @param count number of repetitions @return a string with {@code count} consisting only of {@code ch}
[ "Creates", "a", "string", "which", "contains", "a", "sequence", "of", "repeated", "characters", "." ]
cb43933ec8eb01a4ddce4019c14b2415cc441918
https://github.com/metafacture/metafacture-core/blob/cb43933ec8eb01a4ddce4019c14b2415cc441918/metafacture-commons/src/main/java/org/metafacture/commons/StringUtil.java#L155-L157
108,214
metafacture/metafacture-core
metafacture-mangling/src/main/java/org/metafacture/mangling/EntityPathTracker.java
EntityPathTracker.getCurrentPathWith
public String getCurrentPathWith(final String literalName) { if (entityStack.size() == 0) { return literalName; } return getCurrentPath() + entitySeparator + literalName; }
java
public String getCurrentPathWith(final String literalName) { if (entityStack.size() == 0) { return literalName; } return getCurrentPath() + entitySeparator + literalName; }
[ "public", "String", "getCurrentPathWith", "(", "final", "String", "literalName", ")", "{", "if", "(", "entityStack", ".", "size", "(", ")", "==", "0", ")", "{", "return", "literalName", ";", "}", "return", "getCurrentPath", "(", ")", "+", "entitySeparator", ...
Returns the current entity path with the given literal name appended. @param literalName the literal name to append to the current entity path. Must not be null. @return the current entity path with the literal name appended. The {@link #getEntitySeparator()} is used to separate both unless no entity was received yet ...
[ "Returns", "the", "current", "entity", "path", "with", "the", "given", "literal", "name", "appended", "." ]
cb43933ec8eb01a4ddce4019c14b2415cc441918
https://github.com/metafacture/metafacture-core/blob/cb43933ec8eb01a4ddce4019c14b2415cc441918/metafacture-mangling/src/main/java/org/metafacture/mangling/EntityPathTracker.java#L67-L72
108,215
metafacture/metafacture-core
metafacture-biblio/src/main/java/org/metafacture/biblio/iso2709/Iso646ByteBuffer.java
Iso646ByteBuffer.stringAt
String stringAt(final int fromIndex, final int length, final Charset charset) { return new String(byteArray, fromIndex, length, charset); }
java
String stringAt(final int fromIndex, final int length, final Charset charset) { return new String(byteArray, fromIndex, length, charset); }
[ "String", "stringAt", "(", "final", "int", "fromIndex", ",", "final", "int", "length", ",", "final", "Charset", "charset", ")", "{", "return", "new", "String", "(", "byteArray", ",", "fromIndex", ",", "length", ",", "charset", ")", ";", "}" ]
Returns a string containing the characters in the specified part of the record. @param fromIndex index of the first byte of the string. @param length number of bytes to include in the string. If zero an empty string is returned. @param charset used for decoding the byte sequence into characters. It is callers responsi...
[ "Returns", "a", "string", "containing", "the", "characters", "in", "the", "specified", "part", "of", "the", "record", "." ]
cb43933ec8eb01a4ddce4019c14b2415cc441918
https://github.com/metafacture/metafacture-core/blob/cb43933ec8eb01a4ddce4019c14b2415cc441918/metafacture-biblio/src/main/java/org/metafacture/biblio/iso2709/Iso646ByteBuffer.java#L138-L141
108,216
metafacture/metafacture-core
metafacture-triples/src/main/java/org/metafacture/triples/MemoryWarningSystem.java
MemoryWarningSystem.findTenuredGenPool
private static MemoryPoolMXBean findTenuredGenPool() { // I don't know whether this approach is better, or whether // we should rather check for the pool name "Tenured Gen"? for (final MemoryPoolMXBean pool : ManagementFactory.getMemoryPoolMXBeans()) if (pool.getType() == MemoryType....
java
private static MemoryPoolMXBean findTenuredGenPool() { // I don't know whether this approach is better, or whether // we should rather check for the pool name "Tenured Gen"? for (final MemoryPoolMXBean pool : ManagementFactory.getMemoryPoolMXBeans()) if (pool.getType() == MemoryType....
[ "private", "static", "MemoryPoolMXBean", "findTenuredGenPool", "(", ")", "{", "// I don't know whether this approach is better, or whether", "// we should rather check for the pool name \"Tenured Gen\"?", "for", "(", "final", "MemoryPoolMXBean", "pool", ":", "ManagementFactory", ".",...
Tenured Space Pool can be determined by it being of type HEAP and by it being possible to set the usage threshold. @return MXBean for the Tenured Space Pool
[ "Tenured", "Space", "Pool", "can", "be", "determined", "by", "it", "being", "of", "type", "HEAP", "and", "by", "it", "being", "possible", "to", "set", "the", "usage", "threshold", "." ]
cb43933ec8eb01a4ddce4019c14b2415cc441918
https://github.com/metafacture/metafacture-core/blob/cb43933ec8eb01a4ddce4019c14b2415cc441918/metafacture-triples/src/main/java/org/metafacture/triples/MemoryWarningSystem.java#L97-L105
108,217
pili-engineering/pili-sdk-java
src/main/java/com/qiniu/pili/Hub.java
Hub.listLive
public ListRet listLive(String prefix, int limit, String marker) throws PiliException { return list(true, prefix, limit, marker); }
java
public ListRet listLive(String prefix, int limit, String marker) throws PiliException { return list(true, prefix, limit, marker); }
[ "public", "ListRet", "listLive", "(", "String", "prefix", ",", "int", "limit", ",", "String", "marker", ")", "throws", "PiliException", "{", "return", "list", "(", "true", ",", "prefix", ",", "limit", ",", "marker", ")", ";", "}" ]
list streams which is live @param prefix @param limit @param marker @return @throws PiliException
[ "list", "streams", "which", "is", "live" ]
7abadbd2baaa389d226a6f9351d82e2e5a60fe32
https://github.com/pili-engineering/pili-sdk-java/blob/7abadbd2baaa389d226a6f9351d82e2e5a60fe32/src/main/java/com/qiniu/pili/Hub.java#L117-L119
108,218
pili-engineering/pili-sdk-java
src/main/java/com/qiniu/pili/Hub.java
Hub.batchLiveStatus
public BatchLiveStatus[] batchLiveStatus(String[] streamTitles) throws PiliException { String path = baseUrl + "/livestreams"; String json = gson.toJson(new BatchLiveStatusOptions(streamTitles)); try { String resp = cli.callWithJson(path, json); BatchLiveStatusRet ret = ...
java
public BatchLiveStatus[] batchLiveStatus(String[] streamTitles) throws PiliException { String path = baseUrl + "/livestreams"; String json = gson.toJson(new BatchLiveStatusOptions(streamTitles)); try { String resp = cli.callWithJson(path, json); BatchLiveStatusRet ret = ...
[ "public", "BatchLiveStatus", "[", "]", "batchLiveStatus", "(", "String", "[", "]", "streamTitles", ")", "throws", "PiliException", "{", "String", "path", "=", "baseUrl", "+", "\"/livestreams\"", ";", "String", "json", "=", "gson", ".", "toJson", "(", "new", ...
batch get live status @param streamTitles @return @throws PiliException
[ "batch", "get", "live", "status" ]
7abadbd2baaa389d226a6f9351d82e2e5a60fe32
https://github.com/pili-engineering/pili-sdk-java/blob/7abadbd2baaa389d226a6f9351d82e2e5a60fe32/src/main/java/com/qiniu/pili/Hub.java#L128-L141
108,219
pili-engineering/pili-sdk-java
src/main/java/com/qiniu/pili/Stream.java
Stream.info
public Stream info() throws PiliException { try { String resp = cli.callWithGet(baseUrl); StreamInfo ret = gson.fromJson(resp, StreamInfo.class); ret.setMeta(info.getHub(), info.getKey()); this.info = ret; return this; } catch (PiliException e)...
java
public Stream info() throws PiliException { try { String resp = cli.callWithGet(baseUrl); StreamInfo ret = gson.fromJson(resp, StreamInfo.class); ret.setMeta(info.getHub(), info.getKey()); this.info = ret; return this; } catch (PiliException e)...
[ "public", "Stream", "info", "(", ")", "throws", "PiliException", "{", "try", "{", "String", "resp", "=", "cli", ".", "callWithGet", "(", "baseUrl", ")", ";", "StreamInfo", "ret", "=", "gson", ".", "fromJson", "(", "resp", ",", "StreamInfo", ".", "class",...
fetch stream info @return @throws PiliException
[ "fetch", "stream", "info" ]
7abadbd2baaa389d226a6f9351d82e2e5a60fe32
https://github.com/pili-engineering/pili-sdk-java/blob/7abadbd2baaa389d226a6f9351d82e2e5a60fe32/src/main/java/com/qiniu/pili/Stream.java#L79-L91
108,220
pili-engineering/pili-sdk-java
src/main/java/com/qiniu/pili/Stream.java
Stream.liveStatus
public LiveStatus liveStatus() throws PiliException { String path = baseUrl + "/live"; try { String resp = cli.callWithGet(path); LiveStatus status = gson.fromJson(resp, LiveStatus.class); return status; } catch (PiliException e) { throw e; ...
java
public LiveStatus liveStatus() throws PiliException { String path = baseUrl + "/live"; try { String resp = cli.callWithGet(path); LiveStatus status = gson.fromJson(resp, LiveStatus.class); return status; } catch (PiliException e) { throw e; ...
[ "public", "LiveStatus", "liveStatus", "(", ")", "throws", "PiliException", "{", "String", "path", "=", "baseUrl", "+", "\"/live\"", ";", "try", "{", "String", "resp", "=", "cli", ".", "callWithGet", "(", "path", ")", ";", "LiveStatus", "status", "=", "gson...
get the status of live stream @return @throws PiliException
[ "get", "the", "status", "of", "live", "stream" ]
7abadbd2baaa389d226a6f9351d82e2e5a60fe32
https://github.com/pili-engineering/pili-sdk-java/blob/7abadbd2baaa389d226a6f9351d82e2e5a60fe32/src/main/java/com/qiniu/pili/Stream.java#L127-L138
108,221
pili-engineering/pili-sdk-java
src/main/java/com/qiniu/pili/Stream.java
Stream.save
public String save(SaveOptions opts) throws PiliException { String path = baseUrl + "/saveas"; String json = gson.toJson(opts); try { String resp = cli.callWithJson(path, json); SaveRet ret = gson.fromJson(resp, SaveRet.class); return ret.fname; } cat...
java
public String save(SaveOptions opts) throws PiliException { String path = baseUrl + "/saveas"; String json = gson.toJson(opts); try { String resp = cli.callWithJson(path, json); SaveRet ret = gson.fromJson(resp, SaveRet.class); return ret.fname; } cat...
[ "public", "String", "save", "(", "SaveOptions", "opts", ")", "throws", "PiliException", "{", "String", "path", "=", "baseUrl", "+", "\"/saveas\"", ";", "String", "json", "=", "gson", ".", "toJson", "(", "opts", ")", ";", "try", "{", "String", "resp", "="...
save playback with more options @param opts @return @throws PiliException
[ "save", "playback", "with", "more", "options" ]
7abadbd2baaa389d226a6f9351d82e2e5a60fe32
https://github.com/pili-engineering/pili-sdk-java/blob/7abadbd2baaa389d226a6f9351d82e2e5a60fe32/src/main/java/com/qiniu/pili/Stream.java#L160-L173
108,222
pili-engineering/pili-sdk-java
src/main/java/com/qiniu/pili/Stream.java
Stream.snapshot
public String snapshot(SnapshotOptions opts) throws PiliException { String path = baseUrl + "/snapshot"; String json = gson.toJson(opts); try { String resp = cli.callWithJson(path, json); SnapshotRet ret = gson.fromJson(resp, SnapshotRet.class); return ret.fna...
java
public String snapshot(SnapshotOptions opts) throws PiliException { String path = baseUrl + "/snapshot"; String json = gson.toJson(opts); try { String resp = cli.callWithJson(path, json); SnapshotRet ret = gson.fromJson(resp, SnapshotRet.class); return ret.fna...
[ "public", "String", "snapshot", "(", "SnapshotOptions", "opts", ")", "throws", "PiliException", "{", "String", "path", "=", "baseUrl", "+", "\"/snapshot\"", ";", "String", "json", "=", "gson", ".", "toJson", "(", "opts", ")", ";", "try", "{", "String", "re...
snapshot the live stream @param opts @return @throws PiliException
[ "snapshot", "the", "live", "stream" ]
7abadbd2baaa389d226a6f9351d82e2e5a60fe32
https://github.com/pili-engineering/pili-sdk-java/blob/7abadbd2baaa389d226a6f9351d82e2e5a60fe32/src/main/java/com/qiniu/pili/Stream.java#L200-L212
108,223
pili-engineering/pili-sdk-java
src/main/java/com/qiniu/pili/Stream.java
Stream.updateConverts
public void updateConverts(String[] profiles) throws PiliException { String path = baseUrl + "/converts"; String json = gson.toJson(new ConvertsOptions(profiles)); try { cli.callWithJson(path, json); } catch (PiliException e) { throw e; } catch (Exception ...
java
public void updateConverts(String[] profiles) throws PiliException { String path = baseUrl + "/converts"; String json = gson.toJson(new ConvertsOptions(profiles)); try { cli.callWithJson(path, json); } catch (PiliException e) { throw e; } catch (Exception ...
[ "public", "void", "updateConverts", "(", "String", "[", "]", "profiles", ")", "throws", "PiliException", "{", "String", "path", "=", "baseUrl", "+", "\"/converts\"", ";", "String", "json", "=", "gson", ".", "toJson", "(", "new", "ConvertsOptions", "(", "prof...
update convert configs @param profiles @throws PiliException
[ "update", "convert", "configs" ]
7abadbd2baaa389d226a6f9351d82e2e5a60fe32
https://github.com/pili-engineering/pili-sdk-java/blob/7abadbd2baaa389d226a6f9351d82e2e5a60fe32/src/main/java/com/qiniu/pili/Stream.java#L220-L231
108,224
pili-engineering/pili-sdk-java
src/main/java/com/qiniu/pili/Stream.java
Stream.historyRecord
public Record[] historyRecord(long start, long end) throws PiliException { String path = appendQuery(baseUrl + "/historyrecord", start, end); try { String resp = cli.callWithGet(path); HistoryRet ret = gson.fromJson(resp, HistoryRet.class); return ret.items; }...
java
public Record[] historyRecord(long start, long end) throws PiliException { String path = appendQuery(baseUrl + "/historyrecord", start, end); try { String resp = cli.callWithGet(path); HistoryRet ret = gson.fromJson(resp, HistoryRet.class); return ret.items; }...
[ "public", "Record", "[", "]", "historyRecord", "(", "long", "start", ",", "long", "end", ")", "throws", "PiliException", "{", "String", "path", "=", "appendQuery", "(", "baseUrl", "+", "\"/historyrecord\"", ",", "start", ",", "end", ")", ";", "try", "{", ...
query the stream history @param start @param end @return @throws PiliException
[ "query", "the", "stream", "history" ]
7abadbd2baaa389d226a6f9351d82e2e5a60fe32
https://github.com/pili-engineering/pili-sdk-java/blob/7abadbd2baaa389d226a6f9351d82e2e5a60fe32/src/main/java/com/qiniu/pili/Stream.java#L241-L252
108,225
twilio/authy-java
src/main/java/com/authy/api/Instance.java
Instance.toXML
public String toXML() { Error error = getError(); if (error != null) { return error.toXML(); } StringWriter sw = new StringWriter(); String xml = ""; try { JAXBContext context = JAXBContext.newInstance(this.getClass()); Marshaller ma...
java
public String toXML() { Error error = getError(); if (error != null) { return error.toXML(); } StringWriter sw = new StringWriter(); String xml = ""; try { JAXBContext context = JAXBContext.newInstance(this.getClass()); Marshaller ma...
[ "public", "String", "toXML", "(", ")", "{", "Error", "error", "=", "getError", "(", ")", ";", "if", "(", "error", "!=", "null", ")", "{", "return", "error", ".", "toXML", "(", ")", ";", "}", "StringWriter", "sw", "=", "new", "StringWriter", "(", ")...
Map a Token instance to its XML representation. @return a String with the description of this object in XML.
[ "Map", "a", "Token", "instance", "to", "its", "XML", "representation", "." ]
55e3a5ff57a93b3eb36f5b59e8824e60af2b8b91
https://github.com/twilio/authy-java/blob/55e3a5ff57a93b3eb36f5b59e8824e60af2b8b91/src/main/java/com/authy/api/Instance.java#L73-L93
108,226
twilio/authy-java
src/main/java/com/authy/api/OneTouch.java
OneTouch.sendApprovalRequest
public OneTouchResponse sendApprovalRequest(ApprovalRequestParams approvalRequestParams) throws AuthyException {//Integer userId, String message, HashMap<String, Object> options, Integer secondsToExpire) throws OneTouchException { JSONObject params = new JSONObject(); params.put("message",...
java
public OneTouchResponse sendApprovalRequest(ApprovalRequestParams approvalRequestParams) throws AuthyException {//Integer userId, String message, HashMap<String, Object> options, Integer secondsToExpire) throws OneTouchException { JSONObject params = new JSONObject(); params.put("message",...
[ "public", "OneTouchResponse", "sendApprovalRequest", "(", "ApprovalRequestParams", "approvalRequestParams", ")", "throws", "AuthyException", "{", "//Integer userId, String message, HashMap<String, Object> options, Integer secondsToExpire) throws OneTouchException {", "JSONObject", "params", ...
Sends the OneTouch's approval request to the Authy servers and returns the OneTouchResponse that comes back. @param approvalRequestParams The bean wrapping the user's Authy approval request built using the ApprovalRequest.Builder @return The bean wrapping the response from Authy's service.
[ "Sends", "the", "OneTouch", "s", "approval", "request", "to", "the", "Authy", "servers", "and", "returns", "the", "OneTouchResponse", "that", "comes", "back", "." ]
55e3a5ff57a93b3eb36f5b59e8824e60af2b8b91
https://github.com/twilio/authy-java/blob/55e3a5ff57a93b3eb36f5b59e8824e60af2b8b91/src/main/java/com/authy/api/OneTouch.java#L40-L79
108,227
twilio/authy-java
src/main/java/com/authy/api/Users.java
Users.requestStatus
public UserStatus requestStatus(int userId) throws AuthyException { final Response response = this.get(String.format(USER_STATUS_PATH, userId), null); UserStatus userStatus = userStatusFromJson(response); return userStatus; }
java
public UserStatus requestStatus(int userId) throws AuthyException { final Response response = this.get(String.format(USER_STATUS_PATH, userId), null); UserStatus userStatus = userStatusFromJson(response); return userStatus; }
[ "public", "UserStatus", "requestStatus", "(", "int", "userId", ")", "throws", "AuthyException", "{", "final", "Response", "response", "=", "this", ".", "get", "(", "String", ".", "format", "(", "USER_STATUS_PATH", ",", "userId", ")", ",", "null", ")", ";", ...
Get user status. @return object containing user status
[ "Get", "user", "status", "." ]
55e3a5ff57a93b3eb36f5b59e8824e60af2b8b91
https://github.com/twilio/authy-java/blob/55e3a5ff57a93b3eb36f5b59e8824e60af2b8b91/src/main/java/com/authy/api/Users.java#L125-L129
108,228
sirensolutions/siren-join
src/main/java/solutions/siren/join/action/terms/TransportTermsByQueryAction.java
TransportTermsByQueryAction.doExecute
@Override protected void doExecute(Task task, TermsByQueryRequest request, ActionListener<TermsByQueryResponse> listener) { request.nowInMillis(System.currentTimeMillis()); // set time to be used in scripts super.doExecute(task, request, listener); }
java
@Override protected void doExecute(Task task, TermsByQueryRequest request, ActionListener<TermsByQueryResponse> listener) { request.nowInMillis(System.currentTimeMillis()); // set time to be used in scripts super.doExecute(task, request, listener); }
[ "@", "Override", "protected", "void", "doExecute", "(", "Task", "task", ",", "TermsByQueryRequest", "request", ",", "ActionListener", "<", "TermsByQueryResponse", ">", "listener", ")", "{", "request", ".", "nowInMillis", "(", "System", ".", "currentTimeMillis", "(...
Executes the actions.
[ "Executes", "the", "actions", "." ]
cba1111b209ce6f72ab7750d5488a573a6c77fe5
https://github.com/sirensolutions/siren-join/blob/cba1111b209ce6f72ab7750d5488a573a6c77fe5/src/main/java/solutions/siren/join/action/terms/TransportTermsByQueryAction.java#L108-L112
108,229
sirensolutions/siren-join
src/main/java/solutions/siren/join/action/terms/TransportTermsByQueryAction.java
TransportTermsByQueryAction.shards
@Override protected GroupShardsIterator shards(ClusterState clusterState, TermsByQueryRequest request, String[] concreteIndices) { Map<String, Set<String>> routingMap = indexNameExpressionResolver.resolveSearchRouting(clusterState, request.routing(), request.indices()); return clusterService.operationRouting(...
java
@Override protected GroupShardsIterator shards(ClusterState clusterState, TermsByQueryRequest request, String[] concreteIndices) { Map<String, Set<String>> routingMap = indexNameExpressionResolver.resolveSearchRouting(clusterState, request.routing(), request.indices()); return clusterService.operationRouting(...
[ "@", "Override", "protected", "GroupShardsIterator", "shards", "(", "ClusterState", "clusterState", ",", "TermsByQueryRequest", "request", ",", "String", "[", "]", "concreteIndices", ")", "{", "Map", "<", "String", ",", "Set", "<", "String", ">", ">", "routingMa...
The shards this request will execute against.
[ "The", "shards", "this", "request", "will", "execute", "against", "." ]
cba1111b209ce6f72ab7750d5488a573a6c77fe5
https://github.com/sirensolutions/siren-join/blob/cba1111b209ce6f72ab7750d5488a573a6c77fe5/src/main/java/solutions/siren/join/action/terms/TransportTermsByQueryAction.java#L134-L138
108,230
sirensolutions/siren-join
src/main/java/solutions/siren/join/action/terms/TermsByQueryRequest.java
TermsByQueryRequest.validate
@Override public ActionRequestValidationException validate() { ActionRequestValidationException validationException = super.validate(); if (termsEncoding != null && termsEncoding.equals(TermsEncoding.BYTES)) { if (maxTermsPerShard == null) { validationException = ValidateActions.addValidationErr...
java
@Override public ActionRequestValidationException validate() { ActionRequestValidationException validationException = super.validate(); if (termsEncoding != null && termsEncoding.equals(TermsEncoding.BYTES)) { if (maxTermsPerShard == null) { validationException = ValidateActions.addValidationErr...
[ "@", "Override", "public", "ActionRequestValidationException", "validate", "(", ")", "{", "ActionRequestValidationException", "validationException", "=", "super", ".", "validate", "(", ")", ";", "if", "(", "termsEncoding", "!=", "null", "&&", "termsEncoding", ".", "...
Validates the request @return null if valid, exception otherwise
[ "Validates", "the", "request" ]
cba1111b209ce6f72ab7750d5488a573a6c77fe5
https://github.com/sirensolutions/siren-join/blob/cba1111b209ce6f72ab7750d5488a573a6c77fe5/src/main/java/solutions/siren/join/action/terms/TermsByQueryRequest.java#L93-L102
108,231
sirensolutions/siren-join
src/main/java/solutions/siren/join/action/admin/version/GetIndicesVersionResponse.java
GetIndicesVersionResponse.getVersion
public long getVersion() { long version = 1; ArrayList<String> indices = new ArrayList<>(getIndices().keySet()); Collections.sort(indices); for (String index : indices) { version = 31 * version + getIndices().get(index); } return version; }
java
public long getVersion() { long version = 1; ArrayList<String> indices = new ArrayList<>(getIndices().keySet()); Collections.sort(indices); for (String index : indices) { version = 31 * version + getIndices().get(index); } return version; }
[ "public", "long", "getVersion", "(", ")", "{", "long", "version", "=", "1", ";", "ArrayList", "<", "String", ">", "indices", "=", "new", "ArrayList", "<>", "(", "getIndices", "(", ")", ".", "keySet", "(", ")", ")", ";", "Collections", ".", "sort", "(...
Returns the version for the set of indices.
[ "Returns", "the", "version", "for", "the", "set", "of", "indices", "." ]
cba1111b209ce6f72ab7750d5488a573a6c77fe5
https://github.com/sirensolutions/siren-join/blob/cba1111b209ce6f72ab7750d5488a573a6c77fe5/src/main/java/solutions/siren/join/action/admin/version/GetIndicesVersionResponse.java#L50-L60
108,232
sirensolutions/siren-join
src/main/java/solutions/siren/join/action/admin/version/GetIndicesVersionResponse.java
GetIndicesVersionResponse.getIndices
public Map<String, Long> getIndices() { if (indicesVersions != null) { return indicesVersions; } Map<String, Long> indicesVersions = Maps.newHashMap(); Set<String> indices = Sets.newHashSet(); for (ShardIndexVersion shard : shards) { indices.add(shard.getShardRouting().getIndex()); ...
java
public Map<String, Long> getIndices() { if (indicesVersions != null) { return indicesVersions; } Map<String, Long> indicesVersions = Maps.newHashMap(); Set<String> indices = Sets.newHashSet(); for (ShardIndexVersion shard : shards) { indices.add(shard.getShardRouting().getIndex()); ...
[ "public", "Map", "<", "String", ",", "Long", ">", "getIndices", "(", ")", "{", "if", "(", "indicesVersions", "!=", "null", ")", "{", "return", "indicesVersions", ";", "}", "Map", "<", "String", ",", "Long", ">", "indicesVersions", "=", "Maps", ".", "ne...
Returns a map with the version of each index.
[ "Returns", "a", "map", "with", "the", "version", "of", "each", "index", "." ]
cba1111b209ce6f72ab7750d5488a573a6c77fe5
https://github.com/sirensolutions/siren-join/blob/cba1111b209ce6f72ab7750d5488a573a6c77fe5/src/main/java/solutions/siren/join/action/admin/version/GetIndicesVersionResponse.java#L65-L87
108,233
sirensolutions/siren-join
src/main/java/solutions/siren/join/action/admin/version/GetIndicesVersionResponse.java
GetIndicesVersionResponse.getIndexVersion
private long getIndexVersion(List<ShardIndexVersion> shards) { long version = 1; // order shards per their id before computing the hash Collections.sort(shards, new Comparator<ShardIndexVersion>() { @Override public int compare(ShardIndexVersion o1, ShardIndexVersion o2) { return o1.get...
java
private long getIndexVersion(List<ShardIndexVersion> shards) { long version = 1; // order shards per their id before computing the hash Collections.sort(shards, new Comparator<ShardIndexVersion>() { @Override public int compare(ShardIndexVersion o1, ShardIndexVersion o2) { return o1.get...
[ "private", "long", "getIndexVersion", "(", "List", "<", "ShardIndexVersion", ">", "shards", ")", "{", "long", "version", "=", "1", ";", "// order shards per their id before computing the hash", "Collections", ".", "sort", "(", "shards", ",", "new", "Comparator", "<"...
Computes a unique hash based on the version of the shards.
[ "Computes", "a", "unique", "hash", "based", "on", "the", "version", "of", "the", "shards", "." ]
cba1111b209ce6f72ab7750d5488a573a6c77fe5
https://github.com/sirensolutions/siren-join/blob/cba1111b209ce6f72ab7750d5488a573a6c77fe5/src/main/java/solutions/siren/join/action/admin/version/GetIndicesVersionResponse.java#L92-L109
108,234
sirensolutions/siren-join
src/main/java/solutions/siren/join/action/coordinate/pipeline/NodePipelineManager.java
NodePipelineManager.execute
public void execute(NodeTaskContext context) { NodeTaskReporter taskReporter = new NodeTaskReporter(this); taskQueue = new ArrayDeque<>(tasks); if (!taskQueue.isEmpty()) { NodeTask task = taskQueue.poll(); task.execute(context, taskReporter); } else { // if the queue is empty, reports th...
java
public void execute(NodeTaskContext context) { NodeTaskReporter taskReporter = new NodeTaskReporter(this); taskQueue = new ArrayDeque<>(tasks); if (!taskQueue.isEmpty()) { NodeTask task = taskQueue.poll(); task.execute(context, taskReporter); } else { // if the queue is empty, reports th...
[ "public", "void", "execute", "(", "NodeTaskContext", "context", ")", "{", "NodeTaskReporter", "taskReporter", "=", "new", "NodeTaskReporter", "(", "this", ")", ";", "taskQueue", "=", "new", "ArrayDeque", "<>", "(", "tasks", ")", ";", "if", "(", "!", "taskQue...
Starts the execution of the pipeline
[ "Starts", "the", "execution", "of", "the", "pipeline" ]
cba1111b209ce6f72ab7750d5488a573a6c77fe5
https://github.com/sirensolutions/siren-join/blob/cba1111b209ce6f72ab7750d5488a573a6c77fe5/src/main/java/solutions/siren/join/action/coordinate/pipeline/NodePipelineManager.java#L51-L61
108,235
sirensolutions/siren-join
src/main/java/solutions/siren/join/action/coordinate/execution/FilterJoinCache.java
FilterJoinCache.put
public void put(final long cacheKey, final FilterJoinTerms terms) { logger.debug("{}: New cache entry {}", Thread.currentThread().getName(), cacheKey); this.cache.put(cacheKey, new CacheEntry(terms.getEncodedTerms(), terms.getSize(), terms.isPruned())); }
java
public void put(final long cacheKey, final FilterJoinTerms terms) { logger.debug("{}: New cache entry {}", Thread.currentThread().getName(), cacheKey); this.cache.put(cacheKey, new CacheEntry(terms.getEncodedTerms(), terms.getSize(), terms.isPruned())); }
[ "public", "void", "put", "(", "final", "long", "cacheKey", ",", "final", "FilterJoinTerms", "terms", ")", "{", "logger", ".", "debug", "(", "\"{}: New cache entry {}\"", ",", "Thread", ".", "currentThread", "(", ")", ".", "getName", "(", ")", ",", "cacheKey"...
Caches the provided list of encoded terms for the given filter join node.
[ "Caches", "the", "provided", "list", "of", "encoded", "terms", "for", "the", "given", "filter", "join", "node", "." ]
cba1111b209ce6f72ab7750d5488a573a6c77fe5
https://github.com/sirensolutions/siren-join/blob/cba1111b209ce6f72ab7750d5488a573a6c77fe5/src/main/java/solutions/siren/join/action/coordinate/execution/FilterJoinCache.java#L76-L79
108,236
sirensolutions/siren-join
src/main/java/solutions/siren/join/action/terms/TermsByQueryAction.java
TermsByQueryAction.transportOptions
@Override public TransportRequestOptions transportOptions(Settings settings) { return TransportRequestOptions.builder() .withType(TransportRequestOptions.Type.REG) .build(); }
java
@Override public TransportRequestOptions transportOptions(Settings settings) { return TransportRequestOptions.builder() .withType(TransportRequestOptions.Type.REG) .build(); }
[ "@", "Override", "public", "TransportRequestOptions", "transportOptions", "(", "Settings", "settings", ")", "{", "return", "TransportRequestOptions", ".", "builder", "(", ")", ".", "withType", "(", "TransportRequestOptions", ".", "Type", ".", "REG", ")", ".", "bui...
Set transport options specific to a terms by query request. Enabling compression here does not really reduce data transfer, even increase it on the contrary. @param settings node settings @return the request options.
[ "Set", "transport", "options", "specific", "to", "a", "terms", "by", "query", "request", ".", "Enabling", "compression", "here", "does", "not", "really", "reduce", "data", "transfer", "even", "increase", "it", "on", "the", "contrary", "." ]
cba1111b209ce6f72ab7750d5488a573a6c77fe5
https://github.com/sirensolutions/siren-join/blob/cba1111b209ce6f72ab7750d5488a573a6c77fe5/src/main/java/solutions/siren/join/action/terms/TermsByQueryAction.java#L58-L63
108,237
sirensolutions/siren-join
src/main/java/solutions/siren/join/action/coordinate/execution/FilterJoinVisitor.java
FilterJoinVisitor.await
private void await() { try { // Clean up all filter join leaf nodes that have been converted boolean nodeRemoved = this.removeConvertedNodes(root); // If some nodes were removed, it means that we converted in the previous iteration // at least one filter join into a field data terms query. W...
java
private void await() { try { // Clean up all filter join leaf nodes that have been converted boolean nodeRemoved = this.removeConvertedNodes(root); // If some nodes were removed, it means that we converted in the previous iteration // at least one filter join into a field data terms query. W...
[ "private", "void", "await", "(", ")", "{", "try", "{", "// Clean up all filter join leaf nodes that have been converted", "boolean", "nodeRemoved", "=", "this", ".", "removeConvertedNodes", "(", "root", ")", ";", "// If some nodes were removed, it means that we converted in the...
Await for the completion of an async action.
[ "Await", "for", "the", "completion", "of", "an", "async", "action", "." ]
cba1111b209ce6f72ab7750d5488a573a6c77fe5
https://github.com/sirensolutions/siren-join/blob/cba1111b209ce6f72ab7750d5488a573a6c77fe5/src/main/java/solutions/siren/join/action/coordinate/execution/FilterJoinVisitor.java#L119-L137
108,238
sirensolutions/siren-join
src/main/java/solutions/siren/join/action/coordinate/execution/FilterJoinVisitor.java
FilterJoinVisitor.removeConvertedNodes
private boolean removeConvertedNodes(AbstractNode node) { boolean nodeRemoved = false; Iterator<AbstractNode> it = node.getChildren().iterator(); while (it.hasNext()) { FilterJoinNode child = (FilterJoinNode) it.next(); if (child.getState().equals(FilterJoinNode.State.CONVERTED)) { it.re...
java
private boolean removeConvertedNodes(AbstractNode node) { boolean nodeRemoved = false; Iterator<AbstractNode> it = node.getChildren().iterator(); while (it.hasNext()) { FilterJoinNode child = (FilterJoinNode) it.next(); if (child.getState().equals(FilterJoinNode.State.CONVERTED)) { it.re...
[ "private", "boolean", "removeConvertedNodes", "(", "AbstractNode", "node", ")", "{", "boolean", "nodeRemoved", "=", "false", ";", "Iterator", "<", "AbstractNode", ">", "it", "=", "node", ".", "getChildren", "(", ")", ".", "iterator", "(", ")", ";", "while", ...
Removes all the filter join leaf nodes that were converted. Returns true if at least one node has been removed.
[ "Removes", "all", "the", "filter", "join", "leaf", "nodes", "that", "were", "converted", ".", "Returns", "true", "if", "at", "least", "one", "node", "has", "been", "removed", "." ]
cba1111b209ce6f72ab7750d5488a573a6c77fe5
https://github.com/sirensolutions/siren-join/blob/cba1111b209ce6f72ab7750d5488a573a6c77fe5/src/main/java/solutions/siren/join/action/coordinate/execution/FilterJoinVisitor.java#L143-L157
108,239
sirensolutions/siren-join
src/main/java/solutions/siren/join/action/coordinate/execution/FilterJoinVisitor.java
FilterJoinVisitor.executeAsyncOperation
protected void executeAsyncOperation(final FilterJoinNode node) { logger.debug("Executing async actions"); node.setState(FilterJoinNode.State.RUNNING); // set state before execution to avoid race conditions with listener NodePipelineManager pipeline = new NodePipelineManager(); pipeline.addListener(new...
java
protected void executeAsyncOperation(final FilterJoinNode node) { logger.debug("Executing async actions"); node.setState(FilterJoinNode.State.RUNNING); // set state before execution to avoid race conditions with listener NodePipelineManager pipeline = new NodePipelineManager(); pipeline.addListener(new...
[ "protected", "void", "executeAsyncOperation", "(", "final", "FilterJoinNode", "node", ")", "{", "logger", ".", "debug", "(", "\"Executing async actions\"", ")", ";", "node", ".", "setState", "(", "FilterJoinNode", ".", "State", ".", "RUNNING", ")", ";", "// set ...
Executes the pipeline of async actions to compute the terms for this node.
[ "Executes", "the", "pipeline", "of", "async", "actions", "to", "compute", "the", "terms", "for", "this", "node", "." ]
cba1111b209ce6f72ab7750d5488a573a6c77fe5
https://github.com/sirensolutions/siren-join/blob/cba1111b209ce6f72ab7750d5488a573a6c77fe5/src/main/java/solutions/siren/join/action/coordinate/execution/FilterJoinVisitor.java#L193-L223
108,240
sirensolutions/siren-join
src/main/java/solutions/siren/join/action/coordinate/execution/FilterJoinVisitor.java
FilterJoinVisitor.checkForFailure
private void checkForFailure(FilterJoinNode node) { if (node.hasFailure()) { logger.error("Node processing failed: {}", node.getFailure()); throw new ElasticsearchException("Unexpected failure while processing a node", node.getFailure()); } }
java
private void checkForFailure(FilterJoinNode node) { if (node.hasFailure()) { logger.error("Node processing failed: {}", node.getFailure()); throw new ElasticsearchException("Unexpected failure while processing a node", node.getFailure()); } }
[ "private", "void", "checkForFailure", "(", "FilterJoinNode", "node", ")", "{", "if", "(", "node", ".", "hasFailure", "(", ")", ")", "{", "logger", ".", "error", "(", "\"Node processing failed: {}\"", ",", "node", ".", "getFailure", "(", ")", ")", ";", "thr...
Checks for an action failure
[ "Checks", "for", "an", "action", "failure" ]
cba1111b209ce6f72ab7750d5488a573a6c77fe5
https://github.com/sirensolutions/siren-join/blob/cba1111b209ce6f72ab7750d5488a573a6c77fe5/src/main/java/solutions/siren/join/action/coordinate/execution/FilterJoinVisitor.java#L258-L263
108,241
sirensolutions/siren-join
src/main/java/solutions/siren/join/action/coordinate/execution/FilterJoinVisitor.java
FilterJoinVisitor.convertToTermsQuery
private void convertToTermsQuery(FilterJoinNode node) { Map<String, Object> parent = node.getParentSourceMap(); FilterJoinTerms terms = node.getTerms(); BytesRef bytes = terms.getEncodedTerms(); // Remove the filter join from the parent parent.remove(FilterJoinBuilder.NAME); // Create the nest...
java
private void convertToTermsQuery(FilterJoinNode node) { Map<String, Object> parent = node.getParentSourceMap(); FilterJoinTerms terms = node.getTerms(); BytesRef bytes = terms.getEncodedTerms(); // Remove the filter join from the parent parent.remove(FilterJoinBuilder.NAME); // Create the nest...
[ "private", "void", "convertToTermsQuery", "(", "FilterJoinNode", "node", ")", "{", "Map", "<", "String", ",", "Object", ">", "parent", "=", "node", ".", "getParentSourceMap", "(", ")", ";", "FilterJoinTerms", "terms", "=", "node", ".", "getTerms", "(", ")", ...
Converts a filter join into a terms query.
[ "Converts", "a", "filter", "join", "into", "a", "terms", "query", "." ]
cba1111b209ce6f72ab7750d5488a573a6c77fe5
https://github.com/sirensolutions/siren-join/blob/cba1111b209ce6f72ab7750d5488a573a6c77fe5/src/main/java/solutions/siren/join/action/coordinate/execution/FilterJoinVisitor.java#L268-L304
108,242
sirensolutions/siren-join
src/main/java/solutions/siren/join/index/query/FieldDataTermsQuery.java
FieldDataTermsQuery.getTermsSet
protected synchronized NumericTermsSet getTermsSet() { if (encodedTerms != null) { // late decoding of the encoded terms long start = System.nanoTime(); termsSet = (NumericTermsSet) TermsSet.readFrom(new BytesRef(encodedTerms)); logger.debug("{}: Deserialized {} terms - took {} ms", new Object[] {...
java
protected synchronized NumericTermsSet getTermsSet() { if (encodedTerms != null) { // late decoding of the encoded terms long start = System.nanoTime(); termsSet = (NumericTermsSet) TermsSet.readFrom(new BytesRef(encodedTerms)); logger.debug("{}: Deserialized {} terms - took {} ms", new Object[] {...
[ "protected", "synchronized", "NumericTermsSet", "getTermsSet", "(", ")", "{", "if", "(", "encodedTerms", "!=", "null", ")", "{", "// late decoding of the encoded terms", "long", "start", "=", "System", ".", "nanoTime", "(", ")", ";", "termsSet", "=", "(", "Numer...
Returns the set of terms. This method will perform a late-decoding of the encoded terms, and will release the byte array. This method needs to be synchronized as each segment thread will call it concurrently.
[ "Returns", "the", "set", "of", "terms", ".", "This", "method", "will", "perform", "a", "late", "-", "decoding", "of", "the", "encoded", "terms", "and", "will", "release", "the", "byte", "array", ".", "This", "method", "needs", "to", "be", "synchronized", ...
cba1111b209ce6f72ab7750d5488a573a6c77fe5
https://github.com/sirensolutions/siren-join/blob/cba1111b209ce6f72ab7750d5488a573a6c77fe5/src/main/java/solutions/siren/join/index/query/FieldDataTermsQuery.java#L137-L145
108,243
jruby/joni
src/org/joni/StackMachine.java
StackMachine.nullCheck
protected final int nullCheck(int id, int s) { int k = stk; while (true) { k--; StackEntry e = stack[k]; if (e.type == NULL_CHECK_START) { if (e.getNullCheckNum() == id) { return e.getNullCheckPStr() == s ? 1 : 0; }...
java
protected final int nullCheck(int id, int s) { int k = stk; while (true) { k--; StackEntry e = stack[k]; if (e.type == NULL_CHECK_START) { if (e.getNullCheckNum() == id) { return e.getNullCheckPStr() == s ? 1 : 0; }...
[ "protected", "final", "int", "nullCheck", "(", "int", "id", ",", "int", "s", ")", "{", "int", "k", "=", "stk", ";", "while", "(", "true", ")", "{", "k", "--", ";", "StackEntry", "e", "=", "stack", "[", "k", "]", ";", "if", "(", "e", ".", "typ...
int for consistency with other null check routines
[ "int", "for", "consistency", "with", "other", "null", "check", "routines" ]
182164fb64a9588ee5d866afa891a5edf597499b
https://github.com/jruby/joni/blob/182164fb64a9588ee5d866afa891a5edf597499b/src/org/joni/StackMachine.java#L442-L454
108,244
jruby/joni
src/org/joni/Lexer.java
Lexer.fetchNameForNoNamedGroup
private final int fetchNameForNoNamedGroup(int startCode, boolean ref) { int src = p; value = 0; int sign = 1; int endCode = nameEndCodePoint(startCode); int pnumHead = p; int nameEnd = stop; String err = null; if (!left()) { newValueExceptio...
java
private final int fetchNameForNoNamedGroup(int startCode, boolean ref) { int src = p; value = 0; int sign = 1; int endCode = nameEndCodePoint(startCode); int pnumHead = p; int nameEnd = stop; String err = null; if (!left()) { newValueExceptio...
[ "private", "final", "int", "fetchNameForNoNamedGroup", "(", "int", "startCode", ",", "boolean", "ref", ")", "{", "int", "src", "=", "p", ";", "value", "=", "0", ";", "int", "sign", "=", "1", ";", "int", "endCode", "=", "nameEndCodePoint", "(", "startCode...
make it return nameEnd!
[ "make", "it", "return", "nameEnd!" ]
182164fb64a9588ee5d866afa891a5edf597499b
https://github.com/jruby/joni/blob/182164fb64a9588ee5d866afa891a5edf597499b/src/org/joni/Lexer.java#L422-L478
108,245
ZuInnoTe/hadoopcryptoledger
hiveudf/src/main/java/org/zuinnote/hadoop/ethereum/hive/udf/EthereumUDFUtil.java
EthereumUDFUtil.getEthereumTransactionFromObject
public EthereumTransaction getEthereumTransactionFromObject(Object row) { EthereumTransaction result=null; if (row instanceof HiveEthereumTransaction) { // this is the case if you use the EthereumBlockSerde result=EthereumUDFUtil.convertToEthereumTransaction((HiveEthereumTransaction) row); } else { // this is...
java
public EthereumTransaction getEthereumTransactionFromObject(Object row) { EthereumTransaction result=null; if (row instanceof HiveEthereumTransaction) { // this is the case if you use the EthereumBlockSerde result=EthereumUDFUtil.convertToEthereumTransaction((HiveEthereumTransaction) row); } else { // this is...
[ "public", "EthereumTransaction", "getEthereumTransactionFromObject", "(", "Object", "row", ")", "{", "EthereumTransaction", "result", "=", "null", ";", "if", "(", "row", "instanceof", "HiveEthereumTransaction", ")", "{", "// this is the case if you use the EthereumBlockSerde"...
Create an object of type EthereumTransaction from any HiveTable @param row Object @return EthereumTransaction corresponding to object
[ "Create", "an", "object", "of", "type", "EthereumTransaction", "from", "any", "HiveTable" ]
5c9bfb61dd1a82374cd0de8413a7c66391ee4414
https://github.com/ZuInnoTe/hadoopcryptoledger/blob/5c9bfb61dd1a82374cd0de8413a7c66391ee4414/hiveudf/src/main/java/org/zuinnote/hadoop/ethereum/hive/udf/EthereumUDFUtil.java#L51-L93
108,246
ZuInnoTe/hadoopcryptoledger
hiveudf/src/main/java/org/zuinnote/hadoop/ethereum/hive/udf/EthereumUDFUtil.java
EthereumUDFUtil.convertToEthereumTransaction
public static EthereumTransaction convertToEthereumTransaction(HiveEthereumTransaction transaction) { EthereumTransaction result = new EthereumTransaction(); // note we set only the raw values, the other ones can be automatically dervied by the EthereumTransaction class if needed. This avoids conversion issues fo...
java
public static EthereumTransaction convertToEthereumTransaction(HiveEthereumTransaction transaction) { EthereumTransaction result = new EthereumTransaction(); // note we set only the raw values, the other ones can be automatically dervied by the EthereumTransaction class if needed. This avoids conversion issues fo...
[ "public", "static", "EthereumTransaction", "convertToEthereumTransaction", "(", "HiveEthereumTransaction", "transaction", ")", "{", "EthereumTransaction", "result", "=", "new", "EthereumTransaction", "(", ")", ";", "// note we set only the raw values, the other ones can be automati...
Convert HiveEthereumTransaction to Ethereum Transaction @param transaction in HiveEthereumTransaction format @return transaction in EthereumTransactionFormat
[ "Convert", "HiveEthereumTransaction", "to", "Ethereum", "Transaction" ]
5c9bfb61dd1a82374cd0de8413a7c66391ee4414
https://github.com/ZuInnoTe/hadoopcryptoledger/blob/5c9bfb61dd1a82374cd0de8413a7c66391ee4414/hiveudf/src/main/java/org/zuinnote/hadoop/ethereum/hive/udf/EthereumUDFUtil.java#L102-L115
108,247
ZuInnoTe/hadoopcryptoledger
inputformat/src/main/java/org/zuinnote/hadoop/bitcoin/format/common/BitcoinUtil.java
BitcoinUtil.getSize
public static long getSize(byte[] byteSize) { if (byteSize.length!=4) { return 0; } ByteBuffer converterBuffer = ByteBuffer.wrap(byteSize); converterBuffer.order(ByteOrder.LITTLE_ENDIAN); return convertSignedIntToUnsigned(converterBuffer.getInt()); }
java
public static long getSize(byte[] byteSize) { if (byteSize.length!=4) { return 0; } ByteBuffer converterBuffer = ByteBuffer.wrap(byteSize); converterBuffer.order(ByteOrder.LITTLE_ENDIAN); return convertSignedIntToUnsigned(converterBuffer.getInt()); }
[ "public", "static", "long", "getSize", "(", "byte", "[", "]", "byteSize", ")", "{", "if", "(", "byteSize", ".", "length", "!=", "4", ")", "{", "return", "0", ";", "}", "ByteBuffer", "converterBuffer", "=", "ByteBuffer", ".", "wrap", "(", "byteSize", ")...
Reads a size from a reversed byte order, such as block size in the block header @param byteSize byte array with a length of exactly 4 @return size, returns 0 in case of invalid block size
[ "Reads", "a", "size", "from", "a", "reversed", "byte", "order", "such", "as", "block", "size", "in", "the", "block", "header" ]
5c9bfb61dd1a82374cd0de8413a7c66391ee4414
https://github.com/ZuInnoTe/hadoopcryptoledger/blob/5c9bfb61dd1a82374cd0de8413a7c66391ee4414/inputformat/src/main/java/org/zuinnote/hadoop/bitcoin/format/common/BitcoinUtil.java#L258-L265
108,248
ZuInnoTe/hadoopcryptoledger
inputformat/src/main/java/org/zuinnote/hadoop/bitcoin/format/common/BitcoinUtil.java
BitcoinUtil.reverseByteArray
public static byte[] reverseByteArray(byte[] inputByteArray) { byte[] result=new byte[inputByteArray.length]; for (int i=inputByteArray.length-1;i>=0;i--) { result[result.length-1-i]=inputByteArray[i]; } return result; }
java
public static byte[] reverseByteArray(byte[] inputByteArray) { byte[] result=new byte[inputByteArray.length]; for (int i=inputByteArray.length-1;i>=0;i--) { result[result.length-1-i]=inputByteArray[i]; } return result; }
[ "public", "static", "byte", "[", "]", "reverseByteArray", "(", "byte", "[", "]", "inputByteArray", ")", "{", "byte", "[", "]", "result", "=", "new", "byte", "[", "inputByteArray", ".", "length", "]", ";", "for", "(", "int", "i", "=", "inputByteArray", ...
Reverses the order of the byte array @param inputByteArray array to be reversed @return inputByteArray in reversed order
[ "Reverses", "the", "order", "of", "the", "byte", "array" ]
5c9bfb61dd1a82374cd0de8413a7c66391ee4414
https://github.com/ZuInnoTe/hadoopcryptoledger/blob/5c9bfb61dd1a82374cd0de8413a7c66391ee4414/inputformat/src/main/java/org/zuinnote/hadoop/bitcoin/format/common/BitcoinUtil.java#L276-L282
108,249
ZuInnoTe/hadoopcryptoledger
inputformat/src/main/java/org/zuinnote/hadoop/bitcoin/format/common/BitcoinUtil.java
BitcoinUtil.compareMagics
public static boolean compareMagics (byte[] magic1,byte[] magic2) { if (magic1.length!=magic2.length) { return false; } for (int i=0;i<magic1.length;i++) { if (magic1[i]!=magic2[i]) { return false; } } return true; }
java
public static boolean compareMagics (byte[] magic1,byte[] magic2) { if (magic1.length!=magic2.length) { return false; } for (int i=0;i<magic1.length;i++) { if (magic1[i]!=magic2[i]) { return false; } } return true; }
[ "public", "static", "boolean", "compareMagics", "(", "byte", "[", "]", "magic1", ",", "byte", "[", "]", "magic2", ")", "{", "if", "(", "magic1", ".", "length", "!=", "magic2", ".", "length", ")", "{", "return", "false", ";", "}", "for", "(", "int", ...
Compares two Bitcoin magics @param magic1 first magic @param magic2 second magics @return false, if do not match, true if match
[ "Compares", "two", "Bitcoin", "magics" ]
5c9bfb61dd1a82374cd0de8413a7c66391ee4414
https://github.com/ZuInnoTe/hadoopcryptoledger/blob/5c9bfb61dd1a82374cd0de8413a7c66391ee4414/inputformat/src/main/java/org/zuinnote/hadoop/bitcoin/format/common/BitcoinUtil.java#L335-L346
108,250
ZuInnoTe/hadoopcryptoledger
inputformat/src/main/java/org/zuinnote/hadoop/bitcoin/format/common/BitcoinUtil.java
BitcoinUtil.getTransactionHash
public static byte[] getTransactionHash(BitcoinTransaction transaction) throws IOException{ // convert transaction to byte array ByteArrayOutputStream transactionBAOS = new ByteArrayOutputStream(); byte[] version = reverseByteArray(convertIntToByteArray(transaction.getVersion())); transactionBAOS.write(version); ...
java
public static byte[] getTransactionHash(BitcoinTransaction transaction) throws IOException{ // convert transaction to byte array ByteArrayOutputStream transactionBAOS = new ByteArrayOutputStream(); byte[] version = reverseByteArray(convertIntToByteArray(transaction.getVersion())); transactionBAOS.write(version); ...
[ "public", "static", "byte", "[", "]", "getTransactionHash", "(", "BitcoinTransaction", "transaction", ")", "throws", "IOException", "{", "// convert transaction to byte array", "ByteArrayOutputStream", "transactionBAOS", "=", "new", "ByteArrayOutputStream", "(", ")", ";", ...
Calculates the double SHA256-Hash of a transaction in little endian format. This could be used for certain analysis scenario where one want to investigate the referenced transaction used as an input for a Transaction. Furthermore, it can be used as a unique identifier of the transaction It corresponds to the Bitcoin s...
[ "Calculates", "the", "double", "SHA256", "-", "Hash", "of", "a", "transaction", "in", "little", "endian", "format", ".", "This", "could", "be", "used", "for", "certain", "analysis", "scenario", "where", "one", "want", "to", "investigate", "the", "referenced", ...
5c9bfb61dd1a82374cd0de8413a7c66391ee4414
https://github.com/ZuInnoTe/hadoopcryptoledger/blob/5c9bfb61dd1a82374cd0de8413a7c66391ee4414/inputformat/src/main/java/org/zuinnote/hadoop/bitcoin/format/common/BitcoinUtil.java#L363-L399
108,251
ZuInnoTe/hadoopcryptoledger
inputformat/src/main/java/org/zuinnote/hadoop/ethereum/format/common/EthereumUtil.java
EthereumUtil.rlpDecodeNextItem
public static RLPObject rlpDecodeNextItem(ByteBuffer bb) { // detect object type RLPObject result=null; int objType = detectRLPObjectType(bb); switch (objType) { case EthereumUtil.RLP_OBJECTTYPE_ELEMENT: result=EthereumUtil.decodeRLPElement(bb); break; case EthereumUtil.RLP_OBJECTTYPE_...
java
public static RLPObject rlpDecodeNextItem(ByteBuffer bb) { // detect object type RLPObject result=null; int objType = detectRLPObjectType(bb); switch (objType) { case EthereumUtil.RLP_OBJECTTYPE_ELEMENT: result=EthereumUtil.decodeRLPElement(bb); break; case EthereumUtil.RLP_OBJECTTYPE_...
[ "public", "static", "RLPObject", "rlpDecodeNextItem", "(", "ByteBuffer", "bb", ")", "{", "// detect object type", "RLPObject", "result", "=", "null", ";", "int", "objType", "=", "detectRLPObjectType", "(", "bb", ")", ";", "switch", "(", "objType", ")", "{", "c...
Read RLP data from a Byte Buffer. @param bb ByteBuffer from which to read the RLP data @return RLPObject (e.g. RLPElement or RLPList) containing RLP data
[ "Read", "RLP", "data", "from", "a", "Byte", "Buffer", "." ]
5c9bfb61dd1a82374cd0de8413a7c66391ee4414
https://github.com/ZuInnoTe/hadoopcryptoledger/blob/5c9bfb61dd1a82374cd0de8413a7c66391ee4414/inputformat/src/main/java/org/zuinnote/hadoop/ethereum/format/common/EthereumUtil.java#L76-L90
108,252
ZuInnoTe/hadoopcryptoledger
inputformat/src/main/java/org/zuinnote/hadoop/ethereum/format/common/EthereumUtil.java
EthereumUtil.detectRLPObjectType
public static int detectRLPObjectType(ByteBuffer bb) { bb.mark(); byte detector = bb.get(); int unsignedDetector=detector & 0xFF; int result = EthereumUtil.RLP_OBJECTTYPE_INVALID; if (unsignedDetector<=0x7f) { result=EthereumUtil.RLP_OBJECTTYPE_ELEMENT; } else if ((unsignedDetector>=0x80) && (unsignedDetector<...
java
public static int detectRLPObjectType(ByteBuffer bb) { bb.mark(); byte detector = bb.get(); int unsignedDetector=detector & 0xFF; int result = EthereumUtil.RLP_OBJECTTYPE_INVALID; if (unsignedDetector<=0x7f) { result=EthereumUtil.RLP_OBJECTTYPE_ELEMENT; } else if ((unsignedDetector>=0x80) && (unsignedDetector<...
[ "public", "static", "int", "detectRLPObjectType", "(", "ByteBuffer", "bb", ")", "{", "bb", ".", "mark", "(", ")", ";", "byte", "detector", "=", "bb", ".", "get", "(", ")", ";", "int", "unsignedDetector", "=", "detector", "&", "0xFF", ";", "int", "resul...
Detects the object type of an RLP encoded object. Note that it does not modify the read position in the ByteBuffer. @param bb ByteBuffer that contains RLP encoded object @return object type: EthereumUtil.RLP_OBJECTTYPE_ELEMENT or EthereumUtil.RLP_OBJECTTYPE_LIST or EthereumUtil.RLP_OBJECTTYPE_INVALID
[ "Detects", "the", "object", "type", "of", "an", "RLP", "encoded", "object", ".", "Note", "that", "it", "does", "not", "modify", "the", "read", "position", "in", "the", "ByteBuffer", "." ]
5c9bfb61dd1a82374cd0de8413a7c66391ee4414
https://github.com/ZuInnoTe/hadoopcryptoledger/blob/5c9bfb61dd1a82374cd0de8413a7c66391ee4414/inputformat/src/main/java/org/zuinnote/hadoop/ethereum/format/common/EthereumUtil.java#L99-L126
108,253
ZuInnoTe/hadoopcryptoledger
inputformat/src/main/java/org/zuinnote/hadoop/ethereum/format/common/EthereumUtil.java
EthereumUtil.calculateChainId
public static Long calculateChainId(EthereumTransaction eTrans) { Long result=null; long rawResult=EthereumUtil.convertVarNumberToLong(new RLPElement(new byte[0],eTrans.getSig_v())); if (!((rawResult == EthereumUtil.LOWER_REAL_V) || (rawResult== (LOWER_REAL_V+1)))) { result = (rawResult-EthereumUtil.CHAIN_ID_IN...
java
public static Long calculateChainId(EthereumTransaction eTrans) { Long result=null; long rawResult=EthereumUtil.convertVarNumberToLong(new RLPElement(new byte[0],eTrans.getSig_v())); if (!((rawResult == EthereumUtil.LOWER_REAL_V) || (rawResult== (LOWER_REAL_V+1)))) { result = (rawResult-EthereumUtil.CHAIN_ID_IN...
[ "public", "static", "Long", "calculateChainId", "(", "EthereumTransaction", "eTrans", ")", "{", "Long", "result", "=", "null", ";", "long", "rawResult", "=", "EthereumUtil", ".", "convertVarNumberToLong", "(", "new", "RLPElement", "(", "new", "byte", "[", "0", ...
Calculates the chain Id @param eTrans Ethereum Transaction of which the chain id should be calculated @return chainId: 0, Ethereum testnet (aka Olympic); 1: Ethereum mainet (aka Frontier, Homestead, Metropolis) - also Classic (from fork) -also Expanse (alternative Ethereum implementation), 2 Morden (Ethereum testnet, ...
[ "Calculates", "the", "chain", "Id" ]
5c9bfb61dd1a82374cd0de8413a7c66391ee4414
https://github.com/ZuInnoTe/hadoopcryptoledger/blob/5c9bfb61dd1a82374cd0de8413a7c66391ee4414/inputformat/src/main/java/org/zuinnote/hadoop/ethereum/format/common/EthereumUtil.java#L364-L371
108,254
ZuInnoTe/hadoopcryptoledger
inputformat/src/main/java/org/zuinnote/hadoop/ethereum/format/common/EthereumUtil.java
EthereumUtil.convertToByte
public static Short convertToByte(RLPElement rpe) { Short result=0; if ((rpe.getRawData()!=null) || (rpe.getRawData().length==1)) { result=(short) ( rpe.getRawData()[0] & 0xFF); } return result; }
java
public static Short convertToByte(RLPElement rpe) { Short result=0; if ((rpe.getRawData()!=null) || (rpe.getRawData().length==1)) { result=(short) ( rpe.getRawData()[0] & 0xFF); } return result; }
[ "public", "static", "Short", "convertToByte", "(", "RLPElement", "rpe", ")", "{", "Short", "result", "=", "0", ";", "if", "(", "(", "rpe", ".", "getRawData", "(", ")", "!=", "null", ")", "||", "(", "rpe", ".", "getRawData", "(", ")", ".", "length", ...
Converts a byte in a RLPElement to byte @param rpe RLP element containing a raw byte @return short (=unsigned byte)
[ "Converts", "a", "byte", "in", "a", "RLPElement", "to", "byte" ]
5c9bfb61dd1a82374cd0de8413a7c66391ee4414
https://github.com/ZuInnoTe/hadoopcryptoledger/blob/5c9bfb61dd1a82374cd0de8413a7c66391ee4414/inputformat/src/main/java/org/zuinnote/hadoop/ethereum/format/common/EthereumUtil.java#L584-L590
108,255
ZuInnoTe/hadoopcryptoledger
inputformat/src/main/java/org/zuinnote/hadoop/ethereum/format/common/EthereumUtil.java
EthereumUtil.convertToShort
public static Integer convertToShort(RLPElement rpe) { Integer result=0; byte[] rawBytes=rpe.getRawData(); if ((rawBytes!=null)) { // fill leading zeros if (rawBytes.length<EthereumUtil.WORD_SIZE) { byte[] fullBytes=new byte[EthereumUtil.WORD_SIZE]; int dtDiff=EthereumUtil.WORD_SIZE-rawBytes.length; ...
java
public static Integer convertToShort(RLPElement rpe) { Integer result=0; byte[] rawBytes=rpe.getRawData(); if ((rawBytes!=null)) { // fill leading zeros if (rawBytes.length<EthereumUtil.WORD_SIZE) { byte[] fullBytes=new byte[EthereumUtil.WORD_SIZE]; int dtDiff=EthereumUtil.WORD_SIZE-rawBytes.length; ...
[ "public", "static", "Integer", "convertToShort", "(", "RLPElement", "rpe", ")", "{", "Integer", "result", "=", "0", ";", "byte", "[", "]", "rawBytes", "=", "rpe", ".", "getRawData", "(", ")", ";", "if", "(", "(", "rawBytes", "!=", "null", ")", ")", "...
Converts a short in a RLPElement to short @param rpe RLP element containing a raw short @return Integer (unsigned short) or null if not short
[ "Converts", "a", "short", "in", "a", "RLPElement", "to", "short" ]
5c9bfb61dd1a82374cd0de8413a7c66391ee4414
https://github.com/ZuInnoTe/hadoopcryptoledger/blob/5c9bfb61dd1a82374cd0de8413a7c66391ee4414/inputformat/src/main/java/org/zuinnote/hadoop/ethereum/format/common/EthereumUtil.java#L599-L617
108,256
ZuInnoTe/hadoopcryptoledger
inputformat/src/main/java/org/zuinnote/hadoop/ethereum/format/common/EthereumUtil.java
EthereumUtil.convertToInt
public static Long convertToInt(RLPElement rpe) { Long result=0L; byte[] rawBytes=rpe.getRawData(); if ((rawBytes!=null)) { // fill leading zeros if (rawBytes.length<EthereumUtil.INT_SIZE) { byte[] fullBytes=new byte[EthereumUtil.INT_SIZE]; int dtDiff=EthereumUtil.INT_SIZE-rawBytes.length; for (int...
java
public static Long convertToInt(RLPElement rpe) { Long result=0L; byte[] rawBytes=rpe.getRawData(); if ((rawBytes!=null)) { // fill leading zeros if (rawBytes.length<EthereumUtil.INT_SIZE) { byte[] fullBytes=new byte[EthereumUtil.INT_SIZE]; int dtDiff=EthereumUtil.INT_SIZE-rawBytes.length; for (int...
[ "public", "static", "Long", "convertToInt", "(", "RLPElement", "rpe", ")", "{", "Long", "result", "=", "0L", ";", "byte", "[", "]", "rawBytes", "=", "rpe", ".", "getRawData", "(", ")", ";", "if", "(", "(", "rawBytes", "!=", "null", ")", ")", "{", "...
Converts a int in a RLPElement to int @param rpe RLP element containing a raw int @return long (unsigned int) or null if not int
[ "Converts", "a", "int", "in", "a", "RLPElement", "to", "int" ]
5c9bfb61dd1a82374cd0de8413a7c66391ee4414
https://github.com/ZuInnoTe/hadoopcryptoledger/blob/5c9bfb61dd1a82374cd0de8413a7c66391ee4414/inputformat/src/main/java/org/zuinnote/hadoop/ethereum/format/common/EthereumUtil.java#L626-L643
108,257
ZuInnoTe/hadoopcryptoledger
inputformat/src/main/java/org/zuinnote/hadoop/ethereum/format/common/EthereumUtil.java
EthereumUtil.convertToLong
public static Long convertToLong(RLPElement rpe) { Long result=0L; byte[] rawBytes=rpe.getRawData(); if ((rawBytes!=null)) { // fill leading zeros if (rawBytes.length<EthereumUtil.LONG_SIZE) { byte[] fullBytes=new byte[EthereumUtil.LONG_SIZE]; int dtDiff=EthereumUtil.LONG_SIZE-rawBytes.length; for ...
java
public static Long convertToLong(RLPElement rpe) { Long result=0L; byte[] rawBytes=rpe.getRawData(); if ((rawBytes!=null)) { // fill leading zeros if (rawBytes.length<EthereumUtil.LONG_SIZE) { byte[] fullBytes=new byte[EthereumUtil.LONG_SIZE]; int dtDiff=EthereumUtil.LONG_SIZE-rawBytes.length; for ...
[ "public", "static", "Long", "convertToLong", "(", "RLPElement", "rpe", ")", "{", "Long", "result", "=", "0L", ";", "byte", "[", "]", "rawBytes", "=", "rpe", ".", "getRawData", "(", ")", ";", "if", "(", "(", "rawBytes", "!=", "null", ")", ")", "{", ...
Converts a long in a RLPElement to long @param rpe RLP element containing a raw long @return long or null if not long
[ "Converts", "a", "long", "in", "a", "RLPElement", "to", "long" ]
5c9bfb61dd1a82374cd0de8413a7c66391ee4414
https://github.com/ZuInnoTe/hadoopcryptoledger/blob/5c9bfb61dd1a82374cd0de8413a7c66391ee4414/inputformat/src/main/java/org/zuinnote/hadoop/ethereum/format/common/EthereumUtil.java#L652-L669
108,258
ZuInnoTe/hadoopcryptoledger
inputformat/src/main/java/org/zuinnote/hadoop/bitcoin/format/common/BitcoinBlockReader.java
BitcoinBlockReader.parseAuxPOWBranch
public BitcoinAuxPOWBranch parseAuxPOWBranch(ByteBuffer rawByteBuffer) { byte[] noOfLinksVarInt=BitcoinUtil.convertVarIntByteBufferToByteArray(rawByteBuffer); long currentNoOfLinks=BitcoinUtil.getVarInt(noOfLinksVarInt); ArrayList<byte[]> links = new ArrayList((int)currentNoOfLinks); for (int i=0;i<currentNoOfLink...
java
public BitcoinAuxPOWBranch parseAuxPOWBranch(ByteBuffer rawByteBuffer) { byte[] noOfLinksVarInt=BitcoinUtil.convertVarIntByteBufferToByteArray(rawByteBuffer); long currentNoOfLinks=BitcoinUtil.getVarInt(noOfLinksVarInt); ArrayList<byte[]> links = new ArrayList((int)currentNoOfLinks); for (int i=0;i<currentNoOfLink...
[ "public", "BitcoinAuxPOWBranch", "parseAuxPOWBranch", "(", "ByteBuffer", "rawByteBuffer", ")", "{", "byte", "[", "]", "noOfLinksVarInt", "=", "BitcoinUtil", ".", "convertVarIntByteBufferToByteArray", "(", "rawByteBuffer", ")", ";", "long", "currentNoOfLinks", "=", "Bitc...
Parse an AUXPowBranch @param rawByteBuffer ByteBuffer from which the AuxPOWBranch should be parsed @return AuxPOWBranch
[ "Parse", "an", "AUXPowBranch" ]
5c9bfb61dd1a82374cd0de8413a7c66391ee4414
https://github.com/ZuInnoTe/hadoopcryptoledger/blob/5c9bfb61dd1a82374cd0de8413a7c66391ee4414/inputformat/src/main/java/org/zuinnote/hadoop/bitcoin/format/common/BitcoinBlockReader.java#L260-L273
108,259
ZuInnoTe/hadoopcryptoledger
inputformat/src/main/java/org/zuinnote/hadoop/bitcoin/format/common/BitcoinBlockReader.java
BitcoinBlockReader.parseTransactions
public List<BitcoinTransaction> parseTransactions(ByteBuffer rawByteBuffer,long noOfTransactions) { ArrayList<BitcoinTransaction> resultTransactions = new ArrayList<>((int)noOfTransactions); // read all transactions from ByteBuffer for (int k=0;k<noOfTransactions;k++) { // read version int currentVersion=rawByte...
java
public List<BitcoinTransaction> parseTransactions(ByteBuffer rawByteBuffer,long noOfTransactions) { ArrayList<BitcoinTransaction> resultTransactions = new ArrayList<>((int)noOfTransactions); // read all transactions from ByteBuffer for (int k=0;k<noOfTransactions;k++) { // read version int currentVersion=rawByte...
[ "public", "List", "<", "BitcoinTransaction", ">", "parseTransactions", "(", "ByteBuffer", "rawByteBuffer", ",", "long", "noOfTransactions", ")", "{", "ArrayList", "<", "BitcoinTransaction", ">", "resultTransactions", "=", "new", "ArrayList", "<>", "(", "(", "int", ...
Parses the Bitcoin transactions in a byte buffer. @param rawByteBuffer ByteBuffer from which the transactions have to be parsed @param noOfTransactions Number of expected transactions @return Array of transactions
[ "Parses", "the", "Bitcoin", "transactions", "in", "a", "byte", "buffer", "." ]
5c9bfb61dd1a82374cd0de8413a7c66391ee4414
https://github.com/ZuInnoTe/hadoopcryptoledger/blob/5c9bfb61dd1a82374cd0de8413a7c66391ee4414/inputformat/src/main/java/org/zuinnote/hadoop/bitcoin/format/common/BitcoinBlockReader.java#L286-L361
108,260
ZuInnoTe/hadoopcryptoledger
examples/spark-bitcoinblock/src/main/java/org/zuinnote/spark/bitcoin/example/SparkBitcoinBlockCounter.java
SparkBitcoinBlockCounter.jobTotalNumOfTransactions
public static void jobTotalNumOfTransactions(JavaSparkContext sc, Configuration hadoopConf, String inputFile, String outputFile) { // read bitcoin data from HDFS JavaPairRDD<BytesWritable, BitcoinBlock> bitcoinBlocksRDD = sc.newAPIHadoopFile(inputFile, BitcoinBlockFileInputFormat.class, BytesWritable.class, Bit...
java
public static void jobTotalNumOfTransactions(JavaSparkContext sc, Configuration hadoopConf, String inputFile, String outputFile) { // read bitcoin data from HDFS JavaPairRDD<BytesWritable, BitcoinBlock> bitcoinBlocksRDD = sc.newAPIHadoopFile(inputFile, BitcoinBlockFileInputFormat.class, BytesWritable.class, Bit...
[ "public", "static", "void", "jobTotalNumOfTransactions", "(", "JavaSparkContext", "sc", ",", "Configuration", "hadoopConf", ",", "String", "inputFile", ",", "String", "outputFile", ")", "{", "// read bitcoin data from HDFS", "JavaPairRDD", "<", "BytesWritable", ",", "Bi...
a job for counting the total number of transactions @param sc context @param hadoopConf Configuration for input format @param inputFile Input file @param output outputFile file
[ "a", "job", "for", "counting", "the", "total", "number", "of", "transactions" ]
5c9bfb61dd1a82374cd0de8413a7c66391ee4414
https://github.com/ZuInnoTe/hadoopcryptoledger/blob/5c9bfb61dd1a82374cd0de8413a7c66391ee4414/examples/spark-bitcoinblock/src/main/java/org/zuinnote/spark/bitcoin/example/SparkBitcoinBlockCounter.java#L80-L99
108,261
ZuInnoTe/hadoopcryptoledger
examples/spark-bitcoinblock/src/main/java/org/zuinnote/spark/bitcoin/example/SparkBitcoinBlockCounter.java
SparkBitcoinBlockCounter.mapNoOfTransaction
public static Tuple2<String,Long> mapNoOfTransaction(BitcoinBlock block) { return new Tuple2<String, Long>("No of transactions: ",(long)(block.getTransactions().size())); }
java
public static Tuple2<String,Long> mapNoOfTransaction(BitcoinBlock block) { return new Tuple2<String, Long>("No of transactions: ",(long)(block.getTransactions().size())); }
[ "public", "static", "Tuple2", "<", "String", ",", "Long", ">", "mapNoOfTransaction", "(", "BitcoinBlock", "block", ")", "{", "return", "new", "Tuple2", "<", "String", ",", "Long", ">", "(", "\"No of transactions: \"", ",", "(", "long", ")", "(", "block", "...
Maps the number of transactions of a block to a tuple @param block Bitcoinblock @return Tuple containing the String "No of transactions. " and the number of transactions as long
[ "Maps", "the", "number", "of", "transactions", "of", "a", "block", "to", "a", "tuple" ]
5c9bfb61dd1a82374cd0de8413a7c66391ee4414
https://github.com/ZuInnoTe/hadoopcryptoledger/blob/5c9bfb61dd1a82374cd0de8413a7c66391ee4414/examples/spark-bitcoinblock/src/main/java/org/zuinnote/spark/bitcoin/example/SparkBitcoinBlockCounter.java#L109-L111
108,262
CloudSlang/cs-actions
cs-amazon/src/main/java/io/cloudslang/content/amazon/actions/lambda/InvokeLambdaAction.java
InvokeLambdaAction.execute
@Action(name = "Invoke AWS Lambda Function", outputs = { @Output(Outputs.RETURN_CODE), @Output(Outputs.RETURN_RESULT), @Output(Outputs.EXCEPTION) }, responses = { @Response(text = Outputs.SUCCESS, field =...
java
@Action(name = "Invoke AWS Lambda Function", outputs = { @Output(Outputs.RETURN_CODE), @Output(Outputs.RETURN_RESULT), @Output(Outputs.EXCEPTION) }, responses = { @Response(text = Outputs.SUCCESS, field =...
[ "@", "Action", "(", "name", "=", "\"Invoke AWS Lambda Function\"", ",", "outputs", "=", "{", "@", "Output", "(", "Outputs", ".", "RETURN_CODE", ")", ",", "@", "Output", "(", "Outputs", ".", "RETURN_RESULT", ")", ",", "@", "Output", "(", "Outputs", ".", "...
Invokes an AWS Lambda Function in sync mode using AWS Java SDK @param identity Access key associated with your Amazon AWS or IAM account. Example: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" @param credential Secret access key ID associated with your Amazon AWS or IAM account. @param proxyHost O...
[ "Invokes", "an", "AWS", "Lambda", "Function", "in", "sync", "mode", "using", "AWS", "Java", "SDK" ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-amazon/src/main/java/io/cloudslang/content/amazon/actions/lambda/InvokeLambdaAction.java#L71-L123
108,263
CloudSlang/cs-actions
cs-vmware/src/main/java/io/cloudslang/content/vmware/actions/guest/CustomizeLinuxGuest.java
CustomizeLinuxGuest.customizeLinuxGuest
@Action(name = "Customize Linux Guest", outputs = { @Output(Outputs.RETURN_CODE), @Output(Outputs.RETURN_RESULT), @Output(Outputs.EXCEPTION) }, responses = { @Response(text = Outputs.SUCCESS, field = Outp...
java
@Action(name = "Customize Linux Guest", outputs = { @Output(Outputs.RETURN_CODE), @Output(Outputs.RETURN_RESULT), @Output(Outputs.EXCEPTION) }, responses = { @Response(text = Outputs.SUCCESS, field = Outp...
[ "@", "Action", "(", "name", "=", "\"Customize Linux Guest\"", ",", "outputs", "=", "{", "@", "Output", "(", "Outputs", ".", "RETURN_CODE", ")", ",", "@", "Output", "(", "Outputs", ".", "RETURN_RESULT", ")", ",", "@", "Output", "(", "Outputs", ".", "EXCEP...
Connects to specified data center and customize an existing linux OS based virtual machine identified by the inputs provided. @param host VMware host or IP - Example: "vc6.subdomain.example.com" @param port optional - the port to connect through - Examples: "443", "80" - Default: "443" @par...
[ "Connects", "to", "specified", "data", "center", "and", "customize", "an", "existing", "linux", "OS", "based", "virtual", "machine", "identified", "by", "the", "inputs", "provided", "." ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-vmware/src/main/java/io/cloudslang/content/vmware/actions/guest/CustomizeLinuxGuest.java#L66-L126
108,264
CloudSlang/cs-actions
cs-json/src/main/java/io/cloudslang/content/json/actions/ArraySize.java
ArraySize.execute
@Action(name = "Array Size", outputs = { @Output(OutputNames.RETURN_RESULT), @Output(OutputNames.RETURN_CODE), @Output(OutputNames.EXCEPTION) }, responses = { @Response(text = ResponseNames.SUCCESS, field...
java
@Action(name = "Array Size", outputs = { @Output(OutputNames.RETURN_RESULT), @Output(OutputNames.RETURN_CODE), @Output(OutputNames.EXCEPTION) }, responses = { @Response(text = ResponseNames.SUCCESS, field...
[ "@", "Action", "(", "name", "=", "\"Array Size\"", ",", "outputs", "=", "{", "@", "Output", "(", "OutputNames", ".", "RETURN_RESULT", ")", ",", "@", "Output", "(", "OutputNames", ".", "RETURN_CODE", ")", ",", "@", "Output", "(", "OutputNames", ".", "EXCE...
This operation determines the number of elements in the given JSON array. If an element is itself another JSON array, it only counts as 1 element; in other words, it will not expand and count embedded arrays. Null values are also considered to be an element. @param array The string representation of a JSON array obj...
[ "This", "operation", "determines", "the", "number", "of", "elements", "in", "the", "given", "JSON", "array", ".", "If", "an", "element", "is", "itself", "another", "JSON", "array", "it", "only", "counts", "as", "1", "element", ";", "in", "other", "words", ...
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-json/src/main/java/io/cloudslang/content/json/actions/ArraySize.java#L63-L96
108,265
CloudSlang/cs-actions
cs-powershell/src/main/java/io/cloudslang/content/utils/XMLUtils.java
XMLUtils.parseXml
public static String parseXml(String xml, String expression) throws ParserConfigurationException, IOException, XPathExpressionException, SAXException { DocumentBuilder builder = ResourceLoader.getDocumentBuilder(); Document document; try { document = builder.parse(new InputSource(new...
java
public static String parseXml(String xml, String expression) throws ParserConfigurationException, IOException, XPathExpressionException, SAXException { DocumentBuilder builder = ResourceLoader.getDocumentBuilder(); Document document; try { document = builder.parse(new InputSource(new...
[ "public", "static", "String", "parseXml", "(", "String", "xml", ",", "String", "expression", ")", "throws", "ParserConfigurationException", ",", "IOException", ",", "XPathExpressionException", ",", "SAXException", "{", "DocumentBuilder", "builder", "=", "ResourceLoader"...
Parse the content of the given xml input and evaluates the given XPath expression. @param xml The xml source. @param expression The XPath expression. @return Evaluate the XPath expression and return the result as a String. @throws ParserConfigurationException @throws IOException @throws XPathExpressionException...
[ "Parse", "the", "content", "of", "the", "given", "xml", "input", "and", "evaluates", "the", "given", "XPath", "expression", "." ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-powershell/src/main/java/io/cloudslang/content/utils/XMLUtils.java#L53-L63
108,266
CloudSlang/cs-actions
cs-xml/src/main/java/io/cloudslang/content/xml/actions/Validate.java
Validate.execute
@Action(name = "Validate", outputs = { @Output(RETURN_CODE), @Output(RESULT_TEXT), @Output(RETURN_RESULT), @Output(ERROR_MESSAGE)}, responses = { @Response(text = ResponseNames.SUCCESS, field = RE...
java
@Action(name = "Validate", outputs = { @Output(RETURN_CODE), @Output(RESULT_TEXT), @Output(RETURN_RESULT), @Output(ERROR_MESSAGE)}, responses = { @Response(text = ResponseNames.SUCCESS, field = RE...
[ "@", "Action", "(", "name", "=", "\"Validate\"", ",", "outputs", "=", "{", "@", "Output", "(", "RETURN_CODE", ")", ",", "@", "Output", "(", "RESULT_TEXT", ")", ",", "@", "Output", "(", "RETURN_RESULT", ")", ",", "@", "Output", "(", "ERROR_MESSAGE", ")"...
Service to validate an XML document. Input must be given for either "xmlDocument" or for "xmlLocation". The "'xsdLocation" input is optional, but if specified then the XML document will be validated against the XSD schema. @param xmlDocument XML string to test @param xmlDocumentSource The source type of th...
[ "Service", "to", "validate", "an", "XML", "document", ".", "Input", "must", "be", "given", "for", "either", "xmlDocument", "or", "for", "xmlLocation", ".", "The", "xsdLocation", "input", "is", "optional", "but", "if", "specified", "then", "the", "XML", "docu...
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-xml/src/main/java/io/cloudslang/content/xml/actions/Validate.java#L94-L146
108,267
CloudSlang/cs-actions
cs-xml/src/main/java/io/cloudslang/content/xml/actions/Remove.java
Remove.execute
@Action(name = "Remove", outputs = { @Output(RETURN_CODE), @Output(RETURN_RESULT), @Output(RESULT_XML), @Output(ERROR_MESSAGE)}, responses = { @Response(text = ResponseNames.SUCCESS, field = RETUR...
java
@Action(name = "Remove", outputs = { @Output(RETURN_CODE), @Output(RETURN_RESULT), @Output(RESULT_XML), @Output(ERROR_MESSAGE)}, responses = { @Response(text = ResponseNames.SUCCESS, field = RETUR...
[ "@", "Action", "(", "name", "=", "\"Remove\"", ",", "outputs", "=", "{", "@", "Output", "(", "RETURN_CODE", ")", ",", "@", "Output", "(", "RETURN_RESULT", ")", ",", "@", "Output", "(", "RESULT_XML", ")", ",", "@", "Output", "(", "ERROR_MESSAGE", ")", ...
Removes an element or attribute from an XML document. @param xmlDocument XML string to remove element or attribute from @param xmlDocumentSource The source type of the xml document. Valid values: xmlString, xmlPath Default value: xmlString @param xPathQuery XPATH query that results in an element or elemen...
[ "Removes", "an", "element", "or", "attribute", "from", "an", "XML", "document", "." ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-xml/src/main/java/io/cloudslang/content/xml/actions/Remove.java#L45-L79
108,268
CloudSlang/cs-actions
cs-powershell/src/main/java/io/cloudslang/content/utils/ResourceLoader.java
ResourceLoader.loadAsString
public static String loadAsString(String resourceFileName) throws IOException, URISyntaxException { try (InputStream is = ResourceLoader.class.getClassLoader().getResourceAsStream(resourceFileName)) { StringWriter stringWriter = new StringWriter(); IOUtils.copy(is, stringWriter, Standard...
java
public static String loadAsString(String resourceFileName) throws IOException, URISyntaxException { try (InputStream is = ResourceLoader.class.getClassLoader().getResourceAsStream(resourceFileName)) { StringWriter stringWriter = new StringWriter(); IOUtils.copy(is, stringWriter, Standard...
[ "public", "static", "String", "loadAsString", "(", "String", "resourceFileName", ")", "throws", "IOException", ",", "URISyntaxException", "{", "try", "(", "InputStream", "is", "=", "ResourceLoader", ".", "class", ".", "getClassLoader", "(", ")", ".", "getResourceA...
Loads the contents of a project resource file in a string. @param resourceFileName The name of the resource file. @return A string value representing the entire content of the resource. @throws IOException @throws URISyntaxException
[ "Loads", "the", "contents", "of", "a", "project", "resource", "file", "in", "a", "string", "." ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-powershell/src/main/java/io/cloudslang/content/utils/ResourceLoader.java#L44-L50
108,269
CloudSlang/cs-actions
cs-lists/src/main/java/io/cloudslang/content/actions/ListItemGrabberAction.java
ListItemGrabberAction.grabItemFromList
@Action(name = "List Item Grabber", outputs = { @Output(RESULT_TEXT), @Output(RESPONSE), @Output(RETURN_RESULT), @Output(RETURN_CODE) }, responses = { @Response(text = SUCCESS, field =...
java
@Action(name = "List Item Grabber", outputs = { @Output(RESULT_TEXT), @Output(RESPONSE), @Output(RETURN_RESULT), @Output(RETURN_CODE) }, responses = { @Response(text = SUCCESS, field =...
[ "@", "Action", "(", "name", "=", "\"List Item Grabber\"", ",", "outputs", "=", "{", "@", "Output", "(", "RESULT_TEXT", ")", ",", "@", "Output", "(", "RESPONSE", ")", ",", "@", "Output", "(", "RETURN_RESULT", ")", ",", "@", "Output", "(", "RETURN_CODE", ...
This operation is used to retrieve a value from a list. When the index of an element from a list is known, this operation can be used to extract the element. @param list The list to get the value from. @param delimiter The delimiter that separates values in the list. @param index The index of the value (start...
[ "This", "operation", "is", "used", "to", "retrieve", "a", "value", "from", "a", "list", ".", "When", "the", "index", "of", "an", "element", "from", "a", "list", "is", "known", "this", "operation", "can", "be", "used", "to", "extract", "the", "element", ...
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-lists/src/main/java/io/cloudslang/content/actions/ListItemGrabberAction.java#L60-L96
108,270
CloudSlang/cs-actions
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/DefaultIfEmpty.java
DefaultIfEmpty.execute
@Action(name = "Default if empty", description = OPERATION_DESC, outputs = { @Output(value = RETURN_CODE, description = RETURN_CODE_DESC), @Output(value = RETURN_RESULT, description = RETURN_RESULT_DESC), @Output(value = EXCEPTION, desc...
java
@Action(name = "Default if empty", description = OPERATION_DESC, outputs = { @Output(value = RETURN_CODE, description = RETURN_CODE_DESC), @Output(value = RETURN_RESULT, description = RETURN_RESULT_DESC), @Output(value = EXCEPTION, desc...
[ "@", "Action", "(", "name", "=", "\"Default if empty\"", ",", "description", "=", "OPERATION_DESC", ",", "outputs", "=", "{", "@", "Output", "(", "value", "=", "RETURN_CODE", ",", "description", "=", "RETURN_CODE_DESC", ")", ",", "@", "Output", "(", "value",...
This operation checks if a string is blank or empty and if it's true a default value will be assigned instead of the initial string. @param initialValue The initial string. @param defaultValue The default value used to replace the initial string. @param trim A variable used to check if the initial string is bl...
[ "This", "operation", "checks", "if", "a", "string", "is", "blank", "or", "empty", "and", "if", "it", "s", "true", "a", "default", "value", "will", "be", "assigned", "instead", "of", "the", "initial", "string", "." ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/DefaultIfEmpty.java#L66-L92
108,271
CloudSlang/cs-actions
cs-mail/src/main/java/io/cloudslang/content/mail/services/SendMail.java
SendMail.validateDelimiters
protected void validateDelimiters(String rowDelimiter, String columnDelimiter) throws Exception { if (rowDelimiter.equals(columnDelimiter)) { throw new Exception(INVALID_DELIMITERS); } if (StringUtils.contains(columnDelimiter, rowDelimiter)) { throw new Exception(INVALID_...
java
protected void validateDelimiters(String rowDelimiter, String columnDelimiter) throws Exception { if (rowDelimiter.equals(columnDelimiter)) { throw new Exception(INVALID_DELIMITERS); } if (StringUtils.contains(columnDelimiter, rowDelimiter)) { throw new Exception(INVALID_...
[ "protected", "void", "validateDelimiters", "(", "String", "rowDelimiter", ",", "String", "columnDelimiter", ")", "throws", "Exception", "{", "if", "(", "rowDelimiter", ".", "equals", "(", "columnDelimiter", ")", ")", "{", "throw", "new", "Exception", "(", "INVAL...
This method checks if the delimiters are equal and if the row delimiter is a substring of the column delimiter and throws an exception with the appropriate message. @param rowDelimiter @param columnDelimiter @throws Exception
[ "This", "method", "checks", "if", "the", "delimiters", "are", "equal", "and", "if", "the", "row", "delimiter", "is", "a", "substring", "of", "the", "column", "delimiter", "and", "throws", "an", "exception", "with", "the", "appropriate", "message", "." ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-mail/src/main/java/io/cloudslang/content/mail/services/SendMail.java#L460-L467
108,272
CloudSlang/cs-actions
cs-mail/src/main/java/io/cloudslang/content/mail/services/SendMail.java
SendMail.extractHeaderNamesAndValues
protected Object[] extractHeaderNamesAndValues(String headersMap, String rowDelimiter, String columnDelimiter) throws Exception { String[] rows = headersMap.split(Pattern.quote(rowDelimiter)); ArrayList<String> headerNames = new ArrayList<>(); ArrayList<String> headerValues = new Arr...
java
protected Object[] extractHeaderNamesAndValues(String headersMap, String rowDelimiter, String columnDelimiter) throws Exception { String[] rows = headersMap.split(Pattern.quote(rowDelimiter)); ArrayList<String> headerNames = new ArrayList<>(); ArrayList<String> headerValues = new Arr...
[ "protected", "Object", "[", "]", "extractHeaderNamesAndValues", "(", "String", "headersMap", ",", "String", "rowDelimiter", ",", "String", "columnDelimiter", ")", "throws", "Exception", "{", "String", "[", "]", "rows", "=", "headersMap", ".", "split", "(", "Patt...
This method extracts and returns an object containing two Lists. A list with the header names and a list with the header values. Values found on same position in the two lists correspond to each other. @param headersMap @param rowDelimiter @param columnDelimiter @return @throws Exception
[ "This", "method", "extracts", "and", "returns", "an", "object", "containing", "two", "Lists", ".", "A", "list", "with", "the", "header", "names", "and", "a", "list", "with", "the", "header", "values", ".", "Values", "found", "on", "same", "position", "in",...
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-mail/src/main/java/io/cloudslang/content/mail/services/SendMail.java#L478-L495
108,273
CloudSlang/cs-actions
cs-mail/src/main/java/io/cloudslang/content/mail/services/SendMail.java
SendMail.validateRow
protected boolean validateRow(String row, String columnDelimiter, int rowNumber) throws Exception { if (row.contains(columnDelimiter)) { if (row.equals(columnDelimiter)) { throw new Exception(format(ROW_WITH_EMPTY_HEADERS_INPUT, rowNumber + 1)); } else { S...
java
protected boolean validateRow(String row, String columnDelimiter, int rowNumber) throws Exception { if (row.contains(columnDelimiter)) { if (row.equals(columnDelimiter)) { throw new Exception(format(ROW_WITH_EMPTY_HEADERS_INPUT, rowNumber + 1)); } else { S...
[ "protected", "boolean", "validateRow", "(", "String", "row", ",", "String", "columnDelimiter", ",", "int", "rowNumber", ")", "throws", "Exception", "{", "if", "(", "row", ".", "contains", "(", "columnDelimiter", ")", ")", "{", "if", "(", "row", ".", "equal...
This method validates a row contained in the 'headers' input of the operation. @param row The value of the row to be validated. @param columnDelimiter The delimiter that separates the header name from the header value. @param rowNumber The row number inside the 'headers' input. @return This method returns true if the r...
[ "This", "method", "validates", "a", "row", "contained", "in", "the", "headers", "input", "of", "the", "operation", "." ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-mail/src/main/java/io/cloudslang/content/mail/services/SendMail.java#L505-L524
108,274
CloudSlang/cs-actions
cs-mail/src/main/java/io/cloudslang/content/mail/services/SendMail.java
SendMail.addHeadersToSMTPMessage
protected SMTPMessage addHeadersToSMTPMessage(SMTPMessage message, List<String> headerNames, List<String> headerValues) throws MessagingException { SMTPMessage msg = new SMTPMessage(message); Iterator namesIter = headerNames.iterator(); Iterator ...
java
protected SMTPMessage addHeadersToSMTPMessage(SMTPMessage message, List<String> headerNames, List<String> headerValues) throws MessagingException { SMTPMessage msg = new SMTPMessage(message); Iterator namesIter = headerNames.iterator(); Iterator ...
[ "protected", "SMTPMessage", "addHeadersToSMTPMessage", "(", "SMTPMessage", "message", ",", "List", "<", "String", ">", "headerNames", ",", "List", "<", "String", ">", "headerValues", ")", "throws", "MessagingException", "{", "SMTPMessage", "msg", "=", "new", "SMTP...
The method creates a copy of the SMTPMessage object passed through the arguments list and adds the headers to the copied object then returns it. If the header is already present in the message then its values list will be updated with the given header value. @param message The SMTPMessage object to which the headers ar...
[ "The", "method", "creates", "a", "copy", "of", "the", "SMTPMessage", "object", "passed", "through", "the", "arguments", "list", "and", "adds", "the", "headers", "to", "the", "copied", "object", "then", "returns", "it", ".", "If", "the", "header", "is", "al...
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-mail/src/main/java/io/cloudslang/content/mail/services/SendMail.java#L536-L552
108,275
CloudSlang/cs-actions
cs-commons/src/main/java/io/cloudslang/content/utils/BooleanUtilities.java
BooleanUtilities.getLowerCaseString
@NotNull private static String getLowerCaseString(@NotNull final String string) { return StringUtils.strip(string).toLowerCase(); }
java
@NotNull private static String getLowerCaseString(@NotNull final String string) { return StringUtils.strip(string).toLowerCase(); }
[ "@", "NotNull", "private", "static", "String", "getLowerCaseString", "(", "@", "NotNull", "final", "String", "string", ")", "{", "return", "StringUtils", ".", "strip", "(", "string", ")", ".", "toLowerCase", "(", ")", ";", "}" ]
Given a string, it lowercase it and strips the blank spaces from the ends @param string the string to check @return the string in lowercase
[ "Given", "a", "string", "it", "lowercase", "it", "and", "strips", "the", "blank", "spaces", "from", "the", "ends" ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-commons/src/main/java/io/cloudslang/content/utils/BooleanUtilities.java#L42-L45
108,276
CloudSlang/cs-actions
cs-lists/src/main/java/io/cloudslang/content/actions/ListContainsAction.java
ListContainsAction.containsElement
@Action(name = "List Contains All", outputs = { @Output(RESPONSE_TEXT), @Output(RETURN_RESULT), @Output(RETURN_CODE), @Output(EXCEPTION) }, responses = { @Response(text = SUCCESS, fiel...
java
@Action(name = "List Contains All", outputs = { @Output(RESPONSE_TEXT), @Output(RETURN_RESULT), @Output(RETURN_CODE), @Output(EXCEPTION) }, responses = { @Response(text = SUCCESS, fiel...
[ "@", "Action", "(", "name", "=", "\"List Contains All\"", ",", "outputs", "=", "{", "@", "Output", "(", "RESPONSE_TEXT", ")", ",", "@", "Output", "(", "RETURN_RESULT", ")", ",", "@", "Output", "(", "RETURN_CODE", ")", ",", "@", "Output", "(", "EXCEPTION"...
This method checks to see if a list contains every element in another list. @param sublist The contained list. @param container The containing list. @param delimiter A delimiter separating elements in the two lists. Default is a comma. @param ignoreCase If set to 'True' then the compare is not case sensit...
[ "This", "method", "checks", "to", "see", "if", "a", "list", "contains", "every", "element", "in", "another", "list", "." ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-lists/src/main/java/io/cloudslang/content/actions/ListContainsAction.java#L66-L108
108,277
CloudSlang/cs-actions
cs-database/src/main/java/io/cloudslang/content/database/services/SQLQueryAllRowsService.java
SQLQueryAllRowsService.execQueryAllRows
public static String execQueryAllRows(@NotNull final SQLInputs sqlInputs) throws Exception { ConnectionService connectionService = new ConnectionService(); try (final Connection connection = connectionService.setUpConnection(sqlInputs)) { connection.setReadOnly(true); State...
java
public static String execQueryAllRows(@NotNull final SQLInputs sqlInputs) throws Exception { ConnectionService connectionService = new ConnectionService(); try (final Connection connection = connectionService.setUpConnection(sqlInputs)) { connection.setReadOnly(true); State...
[ "public", "static", "String", "execQueryAllRows", "(", "@", "NotNull", "final", "SQLInputs", "sqlInputs", ")", "throws", "Exception", "{", "ConnectionService", "connectionService", "=", "new", "ConnectionService", "(", ")", ";", "try", "(", "final", "Connection", ...
todo Run a SQL query with given configuration @return the formatted result set by colDelimiter and rowDelimiter @throws ClassNotFoundException @throws java.sql.SQLException
[ "todo", "Run", "a", "SQL", "query", "with", "given", "configuration" ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-database/src/main/java/io/cloudslang/content/database/services/SQLQueryAllRowsService.java#L40-L56
108,278
CloudSlang/cs-actions
cs-vmware/src/main/java/io/cloudslang/content/vmware/services/helpers/GetObjectProperties.java
GetObjectProperties.getObjectProperties
@NotNull public static ObjectContent[] getObjectProperties(ConnectionResources connectionResources, ManagedObjectReference mor, String[] properties) throws RuntimeFaultFaultMsg, InvalidPropertyFau...
java
@NotNull public static ObjectContent[] getObjectProperties(ConnectionResources connectionResources, ManagedObjectReference mor, String[] properties) throws RuntimeFaultFaultMsg, InvalidPropertyFau...
[ "@", "NotNull", "public", "static", "ObjectContent", "[", "]", "getObjectProperties", "(", "ConnectionResources", "connectionResources", ",", "ManagedObjectReference", "mor", ",", "String", "[", "]", "properties", ")", "throws", "RuntimeFaultFaultMsg", ",", "InvalidProp...
Retrieve contents for a single object based on the property collector registered with the service. @param mor Managed Object Reference to get contents for @param properties names of properties of object to retrieve @return retrieved object contents
[ "Retrieve", "contents", "for", "a", "single", "object", "based", "on", "the", "property", "collector", "registered", "with", "the", "service", "." ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-vmware/src/main/java/io/cloudslang/content/vmware/services/helpers/GetObjectProperties.java#L39-L68
108,279
CloudSlang/cs-actions
cs-vmware/src/main/java/io/cloudslang/content/vmware/services/helpers/GetObjectProperties.java
GetObjectProperties.retrievePropertiesAllObjects
private static List<ObjectContent> retrievePropertiesAllObjects(ConnectionResources connectionResources, List<PropertyFilterSpec> propertyFilterSpecList) throws RuntimeFaultFaultMsg, InvalidPropertyFaultMsg { VimPortType vimPort = c...
java
private static List<ObjectContent> retrievePropertiesAllObjects(ConnectionResources connectionResources, List<PropertyFilterSpec> propertyFilterSpecList) throws RuntimeFaultFaultMsg, InvalidPropertyFaultMsg { VimPortType vimPort = c...
[ "private", "static", "List", "<", "ObjectContent", ">", "retrievePropertiesAllObjects", "(", "ConnectionResources", "connectionResources", ",", "List", "<", "PropertyFilterSpec", ">", "propertyFilterSpecList", ")", "throws", "RuntimeFaultFaultMsg", ",", "InvalidPropertyFaultM...
Uses the new RetrievePropertiesEx method to emulate the now deprecated RetrieveProperties method @param propertyFilterSpecList @return list of object content @throws Exception
[ "Uses", "the", "new", "RetrievePropertiesEx", "method", "to", "emulate", "the", "now", "deprecated", "RetrieveProperties", "method" ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-vmware/src/main/java/io/cloudslang/content/vmware/services/helpers/GetObjectProperties.java#L90-L126
108,280
CloudSlang/cs-actions
cs-xml/src/main/java/io/cloudslang/content/xml/utils/ValidateUtils.java
ValidateUtils.validateInputs
public static void validateInputs(EditXmlInputs inputs) throws Exception { validateXmlAndFilePathInputs(inputs.getXml(), inputs.getFilePath()); if (Constants.Inputs.MOVE_ACTION.equals(inputs.getAction())) { validateIsNotEmpty(inputs.getXpath2(), "xpath2 input is required for action 'move' "...
java
public static void validateInputs(EditXmlInputs inputs) throws Exception { validateXmlAndFilePathInputs(inputs.getXml(), inputs.getFilePath()); if (Constants.Inputs.MOVE_ACTION.equals(inputs.getAction())) { validateIsNotEmpty(inputs.getXpath2(), "xpath2 input is required for action 'move' "...
[ "public", "static", "void", "validateInputs", "(", "EditXmlInputs", "inputs", ")", "throws", "Exception", "{", "validateXmlAndFilePathInputs", "(", "inputs", ".", "getXml", "(", ")", ",", "inputs", ".", "getFilePath", "(", ")", ")", ";", "if", "(", "Constants"...
Validates the operation inputs. @param inputs@throws Exception for invalid inputs
[ "Validates", "the", "operation", "inputs", "." ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-xml/src/main/java/io/cloudslang/content/xml/utils/ValidateUtils.java#L33-L48
108,281
CloudSlang/cs-actions
cs-azure/src/main/java/io/cloudslang/content/azure/actions/utils/GetSharedAccessKeyToken.java
GetSharedAccessKeyToken.execute
@Action(name = "Get shared access key token for Azure", outputs = { @Output(RETURN_RESULT), @Output(RETURN_CODE), @Output(EXCEPTION) }, responses = { @Response(text = SUCCESS, field = RETURN_CODE, value =...
java
@Action(name = "Get shared access key token for Azure", outputs = { @Output(RETURN_RESULT), @Output(RETURN_CODE), @Output(EXCEPTION) }, responses = { @Response(text = SUCCESS, field = RETURN_CODE, value =...
[ "@", "Action", "(", "name", "=", "\"Get shared access key token for Azure\"", ",", "outputs", "=", "{", "@", "Output", "(", "RETURN_RESULT", ")", ",", "@", "Output", "(", "RETURN_CODE", ")", ",", "@", "Output", "(", "EXCEPTION", ")", "}", ",", "responses", ...
Generates the shared access key token for Azure API calls. @param identifier The Identifier text box in the Credentials section of the Service Management API tab of System Settings @param primaryOrSecondaryKey The Primary Key or the Secondary Key in the Credentials section of the Service Management API tab ...
[ "Generates", "the", "shared", "access", "key", "token", "for", "Azure", "API", "calls", "." ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-azure/src/main/java/io/cloudslang/content/azure/actions/utils/GetSharedAccessKeyToken.java#L64-L88
108,282
CloudSlang/cs-actions
cs-lists/src/main/java/io/cloudslang/content/actions/ListSortAction.java
ListSortAction.sortList
@Action(name = "List Sort", outputs = { @Output(RESULT_TEXT), @Output(RESPONSE), @Output(RETURN_RESULT), @Output(RETURN_CODE) }, responses = { @Response(text = SUCCESS, field = RETURN_...
java
@Action(name = "List Sort", outputs = { @Output(RESULT_TEXT), @Output(RESPONSE), @Output(RETURN_RESULT), @Output(RETURN_CODE) }, responses = { @Response(text = SUCCESS, field = RETURN_...
[ "@", "Action", "(", "name", "=", "\"List Sort\"", ",", "outputs", "=", "{", "@", "Output", "(", "RESULT_TEXT", ")", ",", "@", "Output", "(", "RESPONSE", ")", ",", "@", "Output", "(", "RETURN_RESULT", ")", ",", "@", "Output", "(", "RETURN_CODE", ")", ...
This method sorts a list of strings. If the list contains only numerical strings, it is sorted in numerical order. Otherwise it is sorted alphabetically. @param list The list to be sorted. @param delimiter The list delimiter. @param reverse A boolean value for sorting the list in reverse order. @return The sort...
[ "This", "method", "sorts", "a", "list", "of", "strings", ".", "If", "the", "list", "contains", "only", "numerical", "strings", "it", "is", "sorted", "in", "numerical", "order", ".", "Otherwise", "it", "is", "sorted", "alphabetically", "." ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-lists/src/main/java/io/cloudslang/content/actions/ListSortAction.java#L57-L86
108,283
CloudSlang/cs-actions
cs-lists/src/main/java/io/cloudslang/content/actions/ListRemoverAction.java
ListRemoverAction.removeElement
@Action(name = "List Remover", outputs = { @Output(RESPONSE), @Output(RETURN_RESULT), @Output(RETURN_CODE) }, responses = { @Response(text = SUCCESS, field = RETURN_CODE, value = RETURN_CODE_SUCCESS, matc...
java
@Action(name = "List Remover", outputs = { @Output(RESPONSE), @Output(RETURN_RESULT), @Output(RETURN_CODE) }, responses = { @Response(text = SUCCESS, field = RETURN_CODE, value = RETURN_CODE_SUCCESS, matc...
[ "@", "Action", "(", "name", "=", "\"List Remover\"", ",", "outputs", "=", "{", "@", "Output", "(", "RESPONSE", ")", ",", "@", "Output", "(", "RETURN_RESULT", ")", ",", "@", "Output", "(", "RETURN_CODE", ")", "}", ",", "responses", "=", "{", "@", "Res...
This method removes an element from a list of strings. @param list The list to remove from. @param index The index of the element to remove from the list. @param delimiter The list delimiter. @return The new list.
[ "This", "method", "removes", "an", "element", "from", "a", "list", "of", "strings", "." ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-lists/src/main/java/io/cloudslang/content/actions/ListRemoverAction.java#L57-L87
108,284
CloudSlang/cs-actions
cs-database/src/main/java/io/cloudslang/content/database/services/dbconnection/C3P0PooledDataSourceProvider.java
C3P0PooledDataSourceProvider.openPooledDataSource
public DataSource openPooledDataSource(DBType aDbType, String aDbUrl, String aUsername, String aPassword) throws SQLException { final DataSource unPooledDS = DataSources.unpooledDataSource(aDbUrl, aUsername, aPassword); //override the default properties with ours final Map<String, Stri...
java
public DataSource openPooledDataSource(DBType aDbType, String aDbUrl, String aUsername, String aPassword) throws SQLException { final DataSource unPooledDS = DataSources.unpooledDataSource(aDbUrl, aUsername, aPassword); //override the default properties with ours final Map<String, Stri...
[ "public", "DataSource", "openPooledDataSource", "(", "DBType", "aDbType", ",", "String", "aDbUrl", ",", "String", "aUsername", ",", "String", "aPassword", ")", "throws", "SQLException", "{", "final", "DataSource", "unPooledDS", "=", "DataSources", ".", "unpooledData...
get the pooled datasource from c3p0 pool @param aDbType a supported database type. @param aDbUrl a connection url @param aUsername a username for the database @param aPassword a password for the database connection @return a DataSource a pooled data source @throws SQLException
[ "get", "the", "pooled", "datasource", "from", "c3p0", "pool" ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-database/src/main/java/io/cloudslang/content/database/services/dbconnection/C3P0PooledDataSourceProvider.java#L111-L120
108,285
CloudSlang/cs-actions
cs-database/src/main/java/io/cloudslang/content/database/services/dbconnection/C3P0PooledDataSourceProvider.java
C3P0PooledDataSourceProvider.getPoolingProperties
private Map<String, String> getPoolingProperties(DBType aDbType) { Map<String, String> retMap = new HashMap<>(); //general properties //acquire increment size String acqIncSize = this.getPropStringValue(CONNECTION_ACQUIREINCREMENT_SIZE_NAME, CONNECTION_ACQUIREINCREMENT_S...
java
private Map<String, String> getPoolingProperties(DBType aDbType) { Map<String, String> retMap = new HashMap<>(); //general properties //acquire increment size String acqIncSize = this.getPropStringValue(CONNECTION_ACQUIREINCREMENT_SIZE_NAME, CONNECTION_ACQUIREINCREMENT_S...
[ "private", "Map", "<", "String", ",", "String", ">", "getPoolingProperties", "(", "DBType", "aDbType", ")", "{", "Map", "<", "String", ",", "String", ">", "retMap", "=", "new", "HashMap", "<>", "(", ")", ";", "//general properties", "//acquire increment size",...
set up the properties for c3p0 based on the properties values in databasePooling.properties. @param aDbType a supported db type. @return a HashMap of c3p0 db pooling properties.
[ "set", "up", "the", "properties", "for", "c3p0", "based", "on", "the", "properties", "values", "in", "databasePooling", ".", "properties", "." ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-database/src/main/java/io/cloudslang/content/database/services/dbconnection/C3P0PooledDataSourceProvider.java#L129-L231
108,286
CloudSlang/cs-actions
cs-database/src/main/java/io/cloudslang/content/database/services/dbconnection/C3P0PooledDataSourceProvider.java
C3P0PooledDataSourceProvider.getAllConnectionNumber
public int getAllConnectionNumber(DataSource aPooledDataSource) throws SQLException { PooledDataSource pDs = (PooledDataSource) aPooledDataSource; return pDs.getNumConnectionsAllUsers(); }
java
public int getAllConnectionNumber(DataSource aPooledDataSource) throws SQLException { PooledDataSource pDs = (PooledDataSource) aPooledDataSource; return pDs.getNumConnectionsAllUsers(); }
[ "public", "int", "getAllConnectionNumber", "(", "DataSource", "aPooledDataSource", ")", "throws", "SQLException", "{", "PooledDataSource", "pDs", "=", "(", "PooledDataSource", ")", "aPooledDataSource", ";", "return", "pDs", ".", "getNumConnectionsAllUsers", "(", ")", ...
The followings are only for testing purpose
[ "The", "followings", "are", "only", "for", "testing", "purpose" ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-database/src/main/java/io/cloudslang/content/database/services/dbconnection/C3P0PooledDataSourceProvider.java#L234-L237
108,287
CloudSlang/cs-actions
cs-database/src/main/java/io/cloudslang/content/database/utils/SQLUtils.java
SQLUtils.getIPv4OrIPv6WithSquareBracketsHost
public static String getIPv4OrIPv6WithSquareBracketsHost(String dbServer) { final Address address = new Address(dbServer); return address.getURIIPV6Literal(); }
java
public static String getIPv4OrIPv6WithSquareBracketsHost(String dbServer) { final Address address = new Address(dbServer); return address.getURIIPV6Literal(); }
[ "public", "static", "String", "getIPv4OrIPv6WithSquareBracketsHost", "(", "String", "dbServer", ")", "{", "final", "Address", "address", "=", "new", "Address", "(", "dbServer", ")", ";", "return", "address", ".", "getURIIPV6Literal", "(", ")", ";", "}" ]
Method returning the host surrounded by square brackets if 'dbServer' is IPv6 format. Otherwise the returned string will be the same. @return
[ "Method", "returning", "the", "host", "surrounded", "by", "square", "brackets", "if", "dbServer", "is", "IPv6", "format", ".", "Otherwise", "the", "returned", "string", "will", "be", "the", "same", "." ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-database/src/main/java/io/cloudslang/content/database/utils/SQLUtils.java#L71-L74
108,288
CloudSlang/cs-actions
cs-database/src/main/java/io/cloudslang/content/database/utils/SQLUtils.java
SQLUtils.computeSessionId
@NotNull public static String computeSessionId(@NotNull final String aString) { final byte[] byteData = DigestUtils.sha256(aString.getBytes()); final StringBuilder sb = new StringBuilder("SQLQuery:"); for (final byte aByteData : byteData) { final String hex = Integer.toHex...
java
@NotNull public static String computeSessionId(@NotNull final String aString) { final byte[] byteData = DigestUtils.sha256(aString.getBytes()); final StringBuilder sb = new StringBuilder("SQLQuery:"); for (final byte aByteData : byteData) { final String hex = Integer.toHex...
[ "@", "NotNull", "public", "static", "String", "computeSessionId", "(", "@", "NotNull", "final", "String", "aString", ")", "{", "final", "byte", "[", "]", "byteData", "=", "DigestUtils", ".", "sha256", "(", "aString", ".", "getBytes", "(", ")", ")", ";", ...
compute session id for JDBC operations
[ "compute", "session", "id", "for", "JDBC", "operations" ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-database/src/main/java/io/cloudslang/content/database/utils/SQLUtils.java#L93-L106
108,289
CloudSlang/cs-actions
cs-database/src/main/java/io/cloudslang/content/database/services/dbconnection/DBConnectionManager.java
DBConnectionManager.cleanDataSources
public void cleanDataSources() { Hashtable<String, List<String>> removedDsKeyTable = null; //gather all the empty ds's key, can't remove item while iterate Enumeration<String> allPoolKeys = dbmsPoolTable.keys(); while (allPoolKeys.hasMoreElements()) { String dbPoolKey = all...
java
public void cleanDataSources() { Hashtable<String, List<String>> removedDsKeyTable = null; //gather all the empty ds's key, can't remove item while iterate Enumeration<String> allPoolKeys = dbmsPoolTable.keys(); while (allPoolKeys.hasMoreElements()) { String dbPoolKey = all...
[ "public", "void", "cleanDataSources", "(", ")", "{", "Hashtable", "<", "String", ",", "List", "<", "String", ">", ">", "removedDsKeyTable", "=", "null", ";", "//gather all the empty ds's key, can't remove item while iterate", "Enumeration", "<", "String", ">", "allPoo...
clean any empty datasource and pool in the dbmsPool table.
[ "clean", "any", "empty", "datasource", "and", "pool", "in", "the", "dbmsPool", "table", "." ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-database/src/main/java/io/cloudslang/content/database/services/dbconnection/DBConnectionManager.java#L215-L297
108,290
CloudSlang/cs-actions
cs-database/src/main/java/io/cloudslang/content/database/services/dbconnection/DBConnectionManager.java
DBConnectionManager.shutdownDbmsPools
public synchronized void shutdownDbmsPools() { //force shutdown //runnable datasourceCleaner.shutdown(); datasourceCleaner = null; //shell for the runnable cleanerThread.interrupt();//stop the thread cleanerThread = null; if (dbmsPoolTable == null) { ...
java
public synchronized void shutdownDbmsPools() { //force shutdown //runnable datasourceCleaner.shutdown(); datasourceCleaner = null; //shell for the runnable cleanerThread.interrupt();//stop the thread cleanerThread = null; if (dbmsPoolTable == null) { ...
[ "public", "synchronized", "void", "shutdownDbmsPools", "(", ")", "{", "//force shutdown", "//runnable", "datasourceCleaner", ".", "shutdown", "(", ")", ";", "datasourceCleaner", "=", "null", ";", "//shell for the runnable", "cleanerThread", ".", "interrupt", "(", ")",...
force shutdown everything
[ "force", "shutdown", "everything" ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-database/src/main/java/io/cloudslang/content/database/services/dbconnection/DBConnectionManager.java#L302-L331
108,291
CloudSlang/cs-actions
cs-database/src/main/java/io/cloudslang/content/database/services/dbconnection/DBConnectionManager.java
DBConnectionManager.getPropBooleanValue
protected boolean getPropBooleanValue(String aPropName, String aDefaultValue) { boolean retValue; String temp = dbPoolingProperties.getProperty(aPropName, aDefaultValue); retValue = Boolean.valueOf(temp); return retValue; }
java
protected boolean getPropBooleanValue(String aPropName, String aDefaultValue) { boolean retValue; String temp = dbPoolingProperties.getProperty(aPropName, aDefaultValue); retValue = Boolean.valueOf(temp); return retValue; }
[ "protected", "boolean", "getPropBooleanValue", "(", "String", "aPropName", ",", "String", "aDefaultValue", ")", "{", "boolean", "retValue", ";", "String", "temp", "=", "dbPoolingProperties", ".", "getProperty", "(", "aPropName", ",", "aDefaultValue", ")", ";", "re...
get boolean value based on the property name from property file the property file is databasePooling.properties @param aPropName a property name @param aDefaultValue a default value for that property, if the property is not there. @return boolean value of that property
[ "get", "boolean", "value", "based", "on", "the", "property", "name", "from", "property", "file", "the", "property", "file", "is", "databasePooling", ".", "properties" ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-database/src/main/java/io/cloudslang/content/database/services/dbconnection/DBConnectionManager.java#L341-L348
108,292
CloudSlang/cs-actions
cs-database/src/main/java/io/cloudslang/content/database/services/dbconnection/DBConnectionManager.java
DBConnectionManager.getPropIntValue
protected int getPropIntValue(String aPropName, String aDefaultValue) { int retValue; String temp = dbPoolingProperties.getProperty(aPropName, aDefaultValue); retValue = Integer.valueOf(temp); return retValue; }
java
protected int getPropIntValue(String aPropName, String aDefaultValue) { int retValue; String temp = dbPoolingProperties.getProperty(aPropName, aDefaultValue); retValue = Integer.valueOf(temp); return retValue; }
[ "protected", "int", "getPropIntValue", "(", "String", "aPropName", ",", "String", "aDefaultValue", ")", "{", "int", "retValue", ";", "String", "temp", "=", "dbPoolingProperties", ".", "getProperty", "(", "aPropName", ",", "aDefaultValue", ")", ";", "retValue", "...
get int value based on the property name from property file the property file is databasePooling.properties @param aPropName a property name @param aDefaultValue a default value for that property, if the property is not there. @return int value of that property
[ "get", "int", "value", "based", "on", "the", "property", "name", "from", "property", "file", "the", "property", "file", "is", "databasePooling", ".", "properties" ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-database/src/main/java/io/cloudslang/content/database/services/dbconnection/DBConnectionManager.java#L358-L365
108,293
CloudSlang/cs-actions
cs-database/src/main/java/io/cloudslang/content/database/services/dbconnection/DBConnectionManager.java
DBConnectionManager.createCleaner
private void createCleaner() { if (cleanerThread == null) { int interval = getPropIntValue (DB_DATASOURCE_CLEAN_INTERNAL_NAME, DB_DATASOURCE_CLEAN_INTERNAL_DEFAULT_VALUE); //this runnable this.datasourceCleaner = new PooledDat...
java
private void createCleaner() { if (cleanerThread == null) { int interval = getPropIntValue (DB_DATASOURCE_CLEAN_INTERNAL_NAME, DB_DATASOURCE_CLEAN_INTERNAL_DEFAULT_VALUE); //this runnable this.datasourceCleaner = new PooledDat...
[ "private", "void", "createCleaner", "(", ")", "{", "if", "(", "cleanerThread", "==", "null", ")", "{", "int", "interval", "=", "getPropIntValue", "(", "DB_DATASOURCE_CLEAN_INTERNAL_NAME", ",", "DB_DATASOURCE_CLEAN_INTERNAL_DEFAULT_VALUE", ")", ";", "//this runnable", ...
create and start a pool cleaner if pooling is enabled.
[ "create", "and", "start", "a", "pool", "cleaner", "if", "pooling", "is", "enabled", "." ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-database/src/main/java/io/cloudslang/content/database/services/dbconnection/DBConnectionManager.java#L370-L384
108,294
CloudSlang/cs-actions
cs-database/src/main/java/io/cloudslang/content/database/services/dbconnection/DBConnectionManager.java
DBConnectionManager.createDataSource
protected DataSource createDataSource(DBType aDbType, String aDbUrl, String aUsername, String aPassword, Hashtable<String, DataSource> aDsTable) ...
java
protected DataSource createDataSource(DBType aDbType, String aDbUrl, String aUsername, String aPassword, Hashtable<String, DataSource> aDsTable) ...
[ "protected", "DataSource", "createDataSource", "(", "DBType", "aDbType", ",", "String", "aDbUrl", ",", "String", "aUsername", ",", "String", "aPassword", ",", "Hashtable", "<", "String", ",", "DataSource", ">", "aDsTable", ")", "throws", "SQLException", "{", "Da...
create a new pooled datasource if total max pool size for the dbms is still ok. total max pool size per user <= total max pool size specified for specific db type. for example, max pool size per user = 20, total max pool size for oracle dbms is 100. only 5 datasource can be opened. @param aDbType one of the supporte...
[ "create", "a", "new", "pooled", "datasource", "if", "total", "max", "pool", "size", "for", "the", "dbms", "is", "still", "ok", ".", "total", "max", "pool", "size", "per", "user", "<", "=", "total", "max", "pool", "size", "specified", "for", "specific", ...
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-database/src/main/java/io/cloudslang/content/database/services/dbconnection/DBConnectionManager.java#L515-L569
108,295
CloudSlang/cs-actions
cs-json/src/main/java/io/cloudslang/content/json/services/JsonService.java
JsonService.retrieveWrappingQuoteTypeOfJsonMemberNames
private char retrieveWrappingQuoteTypeOfJsonMemberNames(String jsonString) { char quote = '\"'; // the default quote character used to specify json member names and string value according to the json specification for (char c : jsonString.toCharArray()) { if (c == '\'' || c == '\"') { ...
java
private char retrieveWrappingQuoteTypeOfJsonMemberNames(String jsonString) { char quote = '\"'; // the default quote character used to specify json member names and string value according to the json specification for (char c : jsonString.toCharArray()) { if (c == '\'' || c == '\"') { ...
[ "private", "char", "retrieveWrappingQuoteTypeOfJsonMemberNames", "(", "String", "jsonString", ")", "{", "char", "quote", "=", "'", "'", ";", "// the default quote character used to specify json member names and string value according to the json specification", "for", "(", "char",...
Returns the quote character used for specifying json member names and String values of json members @param jsonString the source json from which to extract the wrapping quote @return either one of the characters ' (single quote)or " (double quote)
[ "Returns", "the", "quote", "character", "used", "for", "specifying", "json", "member", "names", "and", "String", "values", "of", "json", "members" ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-json/src/main/java/io/cloudslang/content/json/services/JsonService.java#L88-L97
108,296
CloudSlang/cs-actions
cs-vmware/src/main/java/io/cloudslang/content/vmware/services/GuestService.java
GuestService.customizeVM
public Map<String, String> customizeVM(HttpInputs httpInputs, VmInputs vmInputs, GuestInputs guestInputs, boolean isWin) throws Exception { ConnectionResources connectionResources = new ConnectionResources(httpInputs, vmInputs); try { ManagedObjectReference vmMor = new MorObjectH...
java
public Map<String, String> customizeVM(HttpInputs httpInputs, VmInputs vmInputs, GuestInputs guestInputs, boolean isWin) throws Exception { ConnectionResources connectionResources = new ConnectionResources(httpInputs, vmInputs); try { ManagedObjectReference vmMor = new MorObjectH...
[ "public", "Map", "<", "String", ",", "String", ">", "customizeVM", "(", "HttpInputs", "httpInputs", ",", "VmInputs", "vmInputs", ",", "GuestInputs", "guestInputs", ",", "boolean", "isWin", ")", "throws", "Exception", "{", "ConnectionResources", "connectionResources"...
Method used to connect to specified data center and customize the windows OS based virtual machine identified by the inputs provided. @param httpInputs Object that has all the inputs necessary to made a connection to data center @param vmInputs Object that has all the specific inputs necessary to identify the targ...
[ "Method", "used", "to", "connect", "to", "specified", "data", "center", "and", "customize", "the", "windows", "OS", "based", "virtual", "machine", "identified", "by", "the", "inputs", "provided", "." ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-vmware/src/main/java/io/cloudslang/content/vmware/services/GuestService.java#L41-L69
108,297
CloudSlang/cs-actions
cs-vmware/src/main/java/io/cloudslang/content/vmware/services/GuestService.java
GuestService.mountTools
public Map<String, String> mountTools(HttpInputs httpInputs, VmInputs vmInputs) throws Exception { ConnectionResources connectionResources = new ConnectionResources(httpInputs, vmInputs); try { ManagedObjectReference vmMor = new MorObjectHandler() .getMor(connectionResour...
java
public Map<String, String> mountTools(HttpInputs httpInputs, VmInputs vmInputs) throws Exception { ConnectionResources connectionResources = new ConnectionResources(httpInputs, vmInputs); try { ManagedObjectReference vmMor = new MorObjectHandler() .getMor(connectionResour...
[ "public", "Map", "<", "String", ",", "String", ">", "mountTools", "(", "HttpInputs", "httpInputs", ",", "VmInputs", "vmInputs", ")", "throws", "Exception", "{", "ConnectionResources", "connectionResources", "=", "new", "ConnectionResources", "(", "httpInputs", ",", ...
Method used to connect to specified data center and start the Install Tools process on virtual machine identified by the inputs provided. @param httpInputs Object that has all the inputs necessary to made a connection to data center @param vmInputs Object that has all the specific inputs necessary to identify the ta...
[ "Method", "used", "to", "connect", "to", "specified", "data", "center", "and", "start", "the", "Install", "Tools", "process", "on", "virtual", "machine", "identified", "by", "the", "inputs", "provided", "." ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-vmware/src/main/java/io/cloudslang/content/vmware/services/GuestService.java#L81-L101
108,298
CloudSlang/cs-actions
cs-postgres/src/main/java/io/cloudslang/content/postgres/services/ConfigService.java
ConfigService.validateAndBuildKeyValuesMap
public static Map<String, Object> validateAndBuildKeyValuesMap(String listenAddresses, String port, String ssl, String sslCaFile, String sslCertFile, String sslKeyFile, String maxConnections, String sharedBuffers, ...
java
public static Map<String, Object> validateAndBuildKeyValuesMap(String listenAddresses, String port, String ssl, String sslCaFile, String sslCertFile, String sslKeyFile, String maxConnections, String sharedBuffers, ...
[ "public", "static", "Map", "<", "String", ",", "Object", ">", "validateAndBuildKeyValuesMap", "(", "String", "listenAddresses", ",", "String", "port", ",", "String", "ssl", ",", "String", "sslCaFile", ",", "String", "sslCertFile", ",", "String", "sslKeyFile", ",...
Method to validate inputs and consolidate to a map. @param listenAddresses The list of addresses where the PostgreSQL database listens @param port The port the PostgreSQL database should listen. @param ssl Enable SSL connections. @param sslCaFile Name of the file containing the...
[ "Method", "to", "validate", "inputs", "and", "consolidate", "to", "a", "map", "." ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-postgres/src/main/java/io/cloudslang/content/postgres/services/ConfigService.java#L45-L95
108,299
CloudSlang/cs-actions
cs-postgres/src/main/java/io/cloudslang/content/postgres/services/ConfigService.java
ConfigService.changeProperty
public static void changeProperty(String filename, Map<String, Object> keyValuePairs) throws IOException { if (keyValuePairs.size() == 0) { return; } final File file = new File(filename); final File tmpFile = new File(file + ".tmp"); PrintWriter pw = new PrintWriter...
java
public static void changeProperty(String filename, Map<String, Object> keyValuePairs) throws IOException { if (keyValuePairs.size() == 0) { return; } final File file = new File(filename); final File tmpFile = new File(file + ".tmp"); PrintWriter pw = new PrintWriter...
[ "public", "static", "void", "changeProperty", "(", "String", "filename", ",", "Map", "<", "String", ",", "Object", ">", "keyValuePairs", ")", "throws", "IOException", "{", "if", "(", "keyValuePairs", ".", "size", "(", ")", "==", "0", ")", "{", "return", ...
Method to modify the Postgres config postgresql.conf based on key-value pairs @param filename The filename of the config to be updated. @param keyValuePairs A map of key-value pairs.
[ "Method", "to", "modify", "the", "Postgres", "config", "postgresql", ".", "conf", "based", "on", "key", "-", "value", "pairs" ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-postgres/src/main/java/io/cloudslang/content/postgres/services/ConfigService.java#L103-L148