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
39,800
renepickhardt/metalcon
graphityServer/src/main/java/de/metalcon/server/tomcat/NSSP/create/user/CreateUserRequest.java
CreateUserRequest.checkRequest
public static CreateUserRequest checkRequest( final FormItemList formItemList, final CreateRequest createRequest, final CreateUserResponse createUserResponse) { final String userId = checkUserIdentifier(formItemList, createUserResponse); if (userId != null) { final String displayName = checkDisplayName...
java
public static CreateUserRequest checkRequest( final FormItemList formItemList, final CreateRequest createRequest, final CreateUserResponse createUserResponse) { final String userId = checkUserIdentifier(formItemList, createUserResponse); if (userId != null) { final String displayName = checkDisplayName...
[ "public", "static", "CreateUserRequest", "checkRequest", "(", "final", "FormItemList", "formItemList", ",", "final", "CreateRequest", "createRequest", ",", "final", "CreateUserResponse", "createUserResponse", ")", "{", "final", "String", "userId", "=", "checkUserIdentifie...
check a create user request for validity concerning NSSP @param formItemList form item list extracted @param createRequest basic create request object @param createUserResponse create user response object @return create user request object<br> <b>null</b> if the create user request is invalid
[ "check", "a", "create", "user", "request", "for", "validity", "concerning", "NSSP" ]
26a7bd89d2225fe2172dc958d10f64a1bd9cf52f
https://github.com/renepickhardt/metalcon/blob/26a7bd89d2225fe2172dc958d10f64a1bd9cf52f/graphityServer/src/main/java/de/metalcon/server/tomcat/NSSP/create/user/CreateUserRequest.java#L90-L107
39,801
renepickhardt/metalcon
graphityServer/src/main/java/de/metalcon/server/tomcat/NSSP/create/user/CreateUserRequest.java
CreateUserRequest.checkDisplayName
private static String checkDisplayName(final FormItemList formItemList, final CreateUserResponse createUserResponse) { final String displayName = formItemList .getField(ProtocolConstants.Parameters.Create.User.DISPLAY_NAME); if (displayName != null) { return displayName; } else { createUserResponse.d...
java
private static String checkDisplayName(final FormItemList formItemList, final CreateUserResponse createUserResponse) { final String displayName = formItemList .getField(ProtocolConstants.Parameters.Create.User.DISPLAY_NAME); if (displayName != null) { return displayName; } else { createUserResponse.d...
[ "private", "static", "String", "checkDisplayName", "(", "final", "FormItemList", "formItemList", ",", "final", "CreateUserResponse", "createUserResponse", ")", "{", "final", "String", "displayName", "=", "formItemList", ".", "getField", "(", "ProtocolConstants", ".", ...
check if the request contains a display name @param formItemList form item list extracted @param createUserResponse response object @return display name<br> <b>null</b> if there was no display name passed
[ "check", "if", "the", "request", "contains", "a", "display", "name" ]
26a7bd89d2225fe2172dc958d10f64a1bd9cf52f
https://github.com/renepickhardt/metalcon/blob/26a7bd89d2225fe2172dc958d10f64a1bd9cf52f/graphityServer/src/main/java/de/metalcon/server/tomcat/NSSP/create/user/CreateUserRequest.java#L147-L158
39,802
renepickhardt/metalcon
graphityServer/src/main/java/de/metalcon/server/tomcat/NSSP/create/user/CreateUserRequest.java
CreateUserRequest.checkProfilePicturePath
private static String checkProfilePicturePath( final FormItemList formItemList, final CreateUserResponse createUserResponse) { final String profilePicturePath = formItemList .getField(ProtocolConstants.Parameters.Create.User.PROFILE_PICTURE_PATH); if (profilePicturePath != null) { return profilePicture...
java
private static String checkProfilePicturePath( final FormItemList formItemList, final CreateUserResponse createUserResponse) { final String profilePicturePath = formItemList .getField(ProtocolConstants.Parameters.Create.User.PROFILE_PICTURE_PATH); if (profilePicturePath != null) { return profilePicture...
[ "private", "static", "String", "checkProfilePicturePath", "(", "final", "FormItemList", "formItemList", ",", "final", "CreateUserResponse", "createUserResponse", ")", "{", "final", "String", "profilePicturePath", "=", "formItemList", ".", "getField", "(", "ProtocolConstan...
check if the request contains a profile picture path @param formItemList form item list extracted @param createUserResponse create user response object @return profile picture path<br> <b>null</b> if there was no profile picture path passed
[ "check", "if", "the", "request", "contains", "a", "profile", "picture", "path" ]
26a7bd89d2225fe2172dc958d10f64a1bd9cf52f
https://github.com/renepickhardt/metalcon/blob/26a7bd89d2225fe2172dc958d10f64a1bd9cf52f/graphityServer/src/main/java/de/metalcon/server/tomcat/NSSP/create/user/CreateUserRequest.java#L170-L182
39,803
atomix/catalyst
concurrent/src/main/java/io/atomix/catalyst/concurrent/Listeners.java
Listeners.add
public Listener<T> add(Consumer<T> listener) { Assert.notNull(listener, "listener"); ListenerHolder holder = new ListenerHolder(listener, ThreadContext.currentContext()); listeners.add(holder); return holder; }
java
public Listener<T> add(Consumer<T> listener) { Assert.notNull(listener, "listener"); ListenerHolder holder = new ListenerHolder(listener, ThreadContext.currentContext()); listeners.add(holder); return holder; }
[ "public", "Listener", "<", "T", ">", "add", "(", "Consumer", "<", "T", ">", "listener", ")", "{", "Assert", ".", "notNull", "(", "listener", ",", "\"listener\"", ")", ";", "ListenerHolder", "holder", "=", "new", "ListenerHolder", "(", "listener", ",", "T...
Adds a listener to the set of listeners. @param listener The listener to add. @return The listener context. @throws NullPointerException if {@code listener} is null
[ "Adds", "a", "listener", "to", "the", "set", "of", "listeners", "." ]
140e762cb975cd8ee1fd85119043c5b8bf917c5c
https://github.com/atomix/catalyst/blob/140e762cb975cd8ee1fd85119043c5b8bf917c5c/concurrent/src/main/java/io/atomix/catalyst/concurrent/Listeners.java#L53-L58
39,804
atomix/catalyst
concurrent/src/main/java/io/atomix/catalyst/concurrent/Listeners.java
Listeners.accept
public CompletableFuture<Void> accept(T event) { List<CompletableFuture<Void>> futures = new ArrayList<>(listeners.size()); for (ListenerHolder listener : listeners) { if (listener.context != null) { futures.add(listener.context.execute(() -> listener.listener.accept(event))); } else { ...
java
public CompletableFuture<Void> accept(T event) { List<CompletableFuture<Void>> futures = new ArrayList<>(listeners.size()); for (ListenerHolder listener : listeners) { if (listener.context != null) { futures.add(listener.context.execute(() -> listener.listener.accept(event))); } else { ...
[ "public", "CompletableFuture", "<", "Void", ">", "accept", "(", "T", "event", ")", "{", "List", "<", "CompletableFuture", "<", "Void", ">>", "futures", "=", "new", "ArrayList", "<>", "(", "listeners", ".", "size", "(", ")", ")", ";", "for", "(", "Liste...
Applies an event to all listeners. @param event The event to apply. @return A completable future to be completed once all listeners have been completed.
[ "Applies", "an", "event", "to", "all", "listeners", "." ]
140e762cb975cd8ee1fd85119043c5b8bf917c5c
https://github.com/atomix/catalyst/blob/140e762cb975cd8ee1fd85119043c5b8bf917c5c/concurrent/src/main/java/io/atomix/catalyst/concurrent/Listeners.java#L66-L76
39,805
atomix/catalyst
netty/src/main/java/io/atomix/catalyst/transport/netty/NettyHandler.java
NettyHandler.getOrCreateContext
private ThreadContext getOrCreateContext(Channel channel) { ThreadContext context = ThreadContext.currentContext(); if (context != null) { return context; } return new SingleThreadContext(Thread.currentThread(), channel.eventLoop(), this.context.serializer().clone()); }
java
private ThreadContext getOrCreateContext(Channel channel) { ThreadContext context = ThreadContext.currentContext(); if (context != null) { return context; } return new SingleThreadContext(Thread.currentThread(), channel.eventLoop(), this.context.serializer().clone()); }
[ "private", "ThreadContext", "getOrCreateContext", "(", "Channel", "channel", ")", "{", "ThreadContext", "context", "=", "ThreadContext", ".", "currentContext", "(", ")", ";", "if", "(", "context", "!=", "null", ")", "{", "return", "context", ";", "}", "return"...
Returns the current execution context or creates one.
[ "Returns", "the", "current", "execution", "context", "or", "creates", "one", "." ]
140e762cb975cd8ee1fd85119043c5b8bf917c5c
https://github.com/atomix/catalyst/blob/140e762cb975cd8ee1fd85119043c5b8bf917c5c/netty/src/main/java/io/atomix/catalyst/transport/netty/NettyHandler.java#L83-L89
39,806
atomix/catalyst
netty/src/main/java/io/atomix/catalyst/transport/netty/NettyHandler.java
NettyHandler.handleResponse
private void handleResponse(ByteBuf response, ChannelHandlerContext context) { NettyConnection connection = getConnection(context.channel()); if (connection != null) { connection.handleResponse(response); } }
java
private void handleResponse(ByteBuf response, ChannelHandlerContext context) { NettyConnection connection = getConnection(context.channel()); if (connection != null) { connection.handleResponse(response); } }
[ "private", "void", "handleResponse", "(", "ByteBuf", "response", ",", "ChannelHandlerContext", "context", ")", "{", "NettyConnection", "connection", "=", "getConnection", "(", "context", ".", "channel", "(", ")", ")", ";", "if", "(", "connection", "!=", "null", ...
Handles a response.
[ "Handles", "a", "response", "." ]
140e762cb975cd8ee1fd85119043c5b8bf917c5c
https://github.com/atomix/catalyst/blob/140e762cb975cd8ee1fd85119043c5b8bf917c5c/netty/src/main/java/io/atomix/catalyst/transport/netty/NettyHandler.java#L128-L133
39,807
atomix/catalyst
serializer/src/main/java/io/atomix/catalyst/serializer/SerializerRegistry.java
SerializerRegistry.calculateTypeId
private int calculateTypeId(Class<?> type) { if (type == null) throw new NullPointerException("type cannot be null"); return hasher.hash32(type.getName()); }
java
private int calculateTypeId(Class<?> type) { if (type == null) throw new NullPointerException("type cannot be null"); return hasher.hash32(type.getName()); }
[ "private", "int", "calculateTypeId", "(", "Class", "<", "?", ">", "type", ")", "{", "if", "(", "type", "==", "null", ")", "throw", "new", "NullPointerException", "(", "\"type cannot be null\"", ")", ";", "return", "hasher", ".", "hash32", "(", "type", ".",...
Returns the type ID for the given class.
[ "Returns", "the", "type", "ID", "for", "the", "given", "class", "." ]
140e762cb975cd8ee1fd85119043c5b8bf917c5c
https://github.com/atomix/catalyst/blob/140e762cb975cd8ee1fd85119043c5b8bf917c5c/serializer/src/main/java/io/atomix/catalyst/serializer/SerializerRegistry.java#L89-L93
39,808
atomix/catalyst
serializer/src/main/java/io/atomix/catalyst/serializer/SerializerRegistry.java
SerializerRegistry.registerDefault
public SerializerRegistry registerDefault(Class<?> baseType, Class<? extends TypeSerializer> serializer) { return registerDefault(baseType, new DefaultTypeSerializerFactory(serializer)); }
java
public SerializerRegistry registerDefault(Class<?> baseType, Class<? extends TypeSerializer> serializer) { return registerDefault(baseType, new DefaultTypeSerializerFactory(serializer)); }
[ "public", "SerializerRegistry", "registerDefault", "(", "Class", "<", "?", ">", "baseType", ",", "Class", "<", "?", "extends", "TypeSerializer", ">", "serializer", ")", "{", "return", "registerDefault", "(", "baseType", ",", "new", "DefaultTypeSerializerFactory", ...
Registers the given class as a default serializer for the given base type. @param baseType The base type for which to register the serializer. @param serializer The serializer class. @return The serializer registry.
[ "Registers", "the", "given", "class", "as", "a", "default", "serializer", "for", "the", "given", "base", "type", "." ]
140e762cb975cd8ee1fd85119043c5b8bf917c5c
https://github.com/atomix/catalyst/blob/140e762cb975cd8ee1fd85119043c5b8bf917c5c/serializer/src/main/java/io/atomix/catalyst/serializer/SerializerRegistry.java#L257-L259
39,809
atomix/catalyst
serializer/src/main/java/io/atomix/catalyst/serializer/SerializerRegistry.java
SerializerRegistry.registerDefault
public synchronized SerializerRegistry registerDefault(Class<?> baseType, TypeSerializerFactory factory) { defaultFactories.put(baseType, factory); return this; }
java
public synchronized SerializerRegistry registerDefault(Class<?> baseType, TypeSerializerFactory factory) { defaultFactories.put(baseType, factory); return this; }
[ "public", "synchronized", "SerializerRegistry", "registerDefault", "(", "Class", "<", "?", ">", "baseType", ",", "TypeSerializerFactory", "factory", ")", "{", "defaultFactories", ".", "put", "(", "baseType", ",", "factory", ")", ";", "return", "this", ";", "}" ]
Registers the given factory as a default serializer factory for the given base type. @param baseType The base type for which to register the serializer. @param factory The serializer factory. @return The serializer registry.
[ "Registers", "the", "given", "factory", "as", "a", "default", "serializer", "factory", "for", "the", "given", "base", "type", "." ]
140e762cb975cd8ee1fd85119043c5b8bf917c5c
https://github.com/atomix/catalyst/blob/140e762cb975cd8ee1fd85119043c5b8bf917c5c/serializer/src/main/java/io/atomix/catalyst/serializer/SerializerRegistry.java#L268-L271
39,810
atomix/catalyst
serializer/src/main/java/io/atomix/catalyst/serializer/SerializerRegistry.java
SerializerRegistry.findBaseType
private Class<?> findBaseType(Class<?> type, Map<Class<?>, TypeSerializerFactory> factories) { if (factories.containsKey(type)) return type; List<Map.Entry<Class<?>, TypeSerializerFactory>> orderedFactories = new ArrayList<>(factories.entrySet()); Collections.reverse(orderedFactories); Optional<...
java
private Class<?> findBaseType(Class<?> type, Map<Class<?>, TypeSerializerFactory> factories) { if (factories.containsKey(type)) return type; List<Map.Entry<Class<?>, TypeSerializerFactory>> orderedFactories = new ArrayList<>(factories.entrySet()); Collections.reverse(orderedFactories); Optional<...
[ "private", "Class", "<", "?", ">", "findBaseType", "(", "Class", "<", "?", ">", "type", ",", "Map", "<", "Class", "<", "?", ">", ",", "TypeSerializerFactory", ">", "factories", ")", "{", "if", "(", "factories", ".", "containsKey", "(", "type", ")", "...
Finds a serializable base type for the given type in the given factories map.
[ "Finds", "a", "serializable", "base", "type", "for", "the", "given", "type", "in", "the", "given", "factories", "map", "." ]
140e762cb975cd8ee1fd85119043c5b8bf917c5c
https://github.com/atomix/catalyst/blob/140e762cb975cd8ee1fd85119043c5b8bf917c5c/serializer/src/main/java/io/atomix/catalyst/serializer/SerializerRegistry.java#L276-L287
39,811
atomix/catalyst
serializer/src/main/java/io/atomix/catalyst/serializer/SerializerRegistry.java
SerializerRegistry.id
synchronized int id(Class<?> type) { Integer id = ids.get(type); if (id != null) return id; // If no ID was found for the given type, determine whether the type is an abstract type. Class<?> baseType = findBaseType(type, abstractFactories); if (baseType != null) { id = ids.get(baseType)...
java
synchronized int id(Class<?> type) { Integer id = ids.get(type); if (id != null) return id; // If no ID was found for the given type, determine whether the type is an abstract type. Class<?> baseType = findBaseType(type, abstractFactories); if (baseType != null) { id = ids.get(baseType)...
[ "synchronized", "int", "id", "(", "Class", "<", "?", ">", "type", ")", "{", "Integer", "id", "=", "ids", ".", "get", "(", "type", ")", ";", "if", "(", "id", "!=", "null", ")", "return", "id", ";", "// If no ID was found for the given type, determine whethe...
Looks up the serializable type ID for the given type.
[ "Looks", "up", "the", "serializable", "type", "ID", "for", "the", "given", "type", "." ]
140e762cb975cd8ee1fd85119043c5b8bf917c5c
https://github.com/atomix/catalyst/blob/140e762cb975cd8ee1fd85119043c5b8bf917c5c/serializer/src/main/java/io/atomix/catalyst/serializer/SerializerRegistry.java#L320-L334
39,812
atomix/catalyst
serializer/src/main/java/io/atomix/catalyst/serializer/util/CatalystSerializableSerializer.java
CatalystSerializableSerializer.readReference
@SuppressWarnings("unchecked") private T readReference(Class<T> type, BufferInput<?> buffer, Serializer serializer) { ReferencePool<?> pool = pools.get(type); if (pool == null) { Constructor<?> constructor = constructorMap.get(type); if (constructor == null) { try { constructor =...
java
@SuppressWarnings("unchecked") private T readReference(Class<T> type, BufferInput<?> buffer, Serializer serializer) { ReferencePool<?> pool = pools.get(type); if (pool == null) { Constructor<?> constructor = constructorMap.get(type); if (constructor == null) { try { constructor =...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "T", "readReference", "(", "Class", "<", "T", ">", "type", ",", "BufferInput", "<", "?", ">", "buffer", ",", "Serializer", "serializer", ")", "{", "ReferencePool", "<", "?", ">", "pool", "=", ...
Reads an object reference. @param type The reference type. @param buffer The reference buffer. @param serializer The serializer with which the object is being read. @return The reference to read.
[ "Reads", "an", "object", "reference", "." ]
140e762cb975cd8ee1fd85119043c5b8bf917c5c
https://github.com/atomix/catalyst/blob/140e762cb975cd8ee1fd85119043c5b8bf917c5c/serializer/src/main/java/io/atomix/catalyst/serializer/util/CatalystSerializableSerializer.java#L71-L92
39,813
atomix/catalyst
serializer/src/main/java/io/atomix/catalyst/serializer/util/CatalystSerializableSerializer.java
CatalystSerializableSerializer.createFactory
private ReferenceFactory<?> createFactory(final Constructor<?> constructor) { return manager -> { try { return (ReferenceCounted<?>) constructor.newInstance(manager); } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) { throw new SerializationExceptio...
java
private ReferenceFactory<?> createFactory(final Constructor<?> constructor) { return manager -> { try { return (ReferenceCounted<?>) constructor.newInstance(manager); } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) { throw new SerializationExceptio...
[ "private", "ReferenceFactory", "<", "?", ">", "createFactory", "(", "final", "Constructor", "<", "?", ">", "constructor", ")", "{", "return", "manager", "->", "{", "try", "{", "return", "(", "ReferenceCounted", "<", "?", ">", ")", "constructor", ".", "newI...
Dynamically created a reference factory for a pooled type.
[ "Dynamically", "created", "a", "reference", "factory", "for", "a", "pooled", "type", "." ]
140e762cb975cd8ee1fd85119043c5b8bf917c5c
https://github.com/atomix/catalyst/blob/140e762cb975cd8ee1fd85119043c5b8bf917c5c/serializer/src/main/java/io/atomix/catalyst/serializer/util/CatalystSerializableSerializer.java#L97-L105
39,814
atomix/catalyst
serializer/src/main/java/io/atomix/catalyst/serializer/util/CatalystSerializableSerializer.java
CatalystSerializableSerializer.readObject
@SuppressWarnings("unchecked") private T readObject(Class<T> type, BufferInput<?> buffer, Serializer serializer) { try { Constructor<?> constructor = constructorMap.get(type); if (constructor == null) { try { constructor = type.getDeclaredConstructor(); constructor.setAcces...
java
@SuppressWarnings("unchecked") private T readObject(Class<T> type, BufferInput<?> buffer, Serializer serializer) { try { Constructor<?> constructor = constructorMap.get(type); if (constructor == null) { try { constructor = type.getDeclaredConstructor(); constructor.setAcces...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "T", "readObject", "(", "Class", "<", "T", ">", "type", ",", "BufferInput", "<", "?", ">", "buffer", ",", "Serializer", "serializer", ")", "{", "try", "{", "Constructor", "<", "?", ">", "cons...
Reads an object. @param type The object type. @param buffer The object buffer. @param serializer The serializer with which the object is being read. @return The object.
[ "Reads", "an", "object", "." ]
140e762cb975cd8ee1fd85119043c5b8bf917c5c
https://github.com/atomix/catalyst/blob/140e762cb975cd8ee1fd85119043c5b8bf917c5c/serializer/src/main/java/io/atomix/catalyst/serializer/util/CatalystSerializableSerializer.java#L115-L135
39,815
renepickhardt/metalcon
graphityServer/src/main/java/de/metalcon/server/statusupdates/StatusUpdateManager.java
StatusUpdateManager.loadXmlFiles
private static File[] loadXmlFiles(final File directory) { return directory.listFiles(new FileFilter() { @Override public boolean accept(File file) { return file.getName().endsWith(".xml"); } }); }
java
private static File[] loadXmlFiles(final File directory) { return directory.listFiles(new FileFilter() { @Override public boolean accept(File file) { return file.getName().endsWith(".xml"); } }); }
[ "private", "static", "File", "[", "]", "loadXmlFiles", "(", "final", "File", "directory", ")", "{", "return", "directory", ".", "listFiles", "(", "new", "FileFilter", "(", ")", "{", "@", "Override", "public", "boolean", "accept", "(", "File", "file", ")", ...
load all XML files listed in the directory specified @param directory status update templates directory @return array of status update templates (XML files)
[ "load", "all", "XML", "files", "listed", "in", "the", "directory", "specified" ]
26a7bd89d2225fe2172dc958d10f64a1bd9cf52f
https://github.com/renepickhardt/metalcon/blob/26a7bd89d2225fe2172dc958d10f64a1bd9cf52f/graphityServer/src/main/java/de/metalcon/server/statusupdates/StatusUpdateManager.java#L53-L62
39,816
renepickhardt/metalcon
graphityServer/src/main/java/de/metalcon/server/statusupdates/StatusUpdateManager.java
StatusUpdateManager.generateJavaFiles
private static void generateJavaFiles(final StatusUpdateTemplate template, final String workingPath) throws FileNotFoundException { final String javaPath = WORKING_DIR + template.getName() + ".java"; final File javaFile = new File(javaPath); final String[] optionsAndSources = { "-classpath", workingPath, "...
java
private static void generateJavaFiles(final StatusUpdateTemplate template, final String workingPath) throws FileNotFoundException { final String javaPath = WORKING_DIR + template.getName() + ".java"; final File javaFile = new File(javaPath); final String[] optionsAndSources = { "-classpath", workingPath, "...
[ "private", "static", "void", "generateJavaFiles", "(", "final", "StatusUpdateTemplate", "template", ",", "final", "String", "workingPath", ")", "throws", "FileNotFoundException", "{", "final", "String", "javaPath", "=", "WORKING_DIR", "+", "template", ".", "getName", ...
generate a java class file for the template specified @param template status update template @param workingPath working path including JAVA and/or CLASS-files @throws FileNotFoundException
[ "generate", "a", "java", "class", "file", "for", "the", "template", "specified" ]
26a7bd89d2225fe2172dc958d10f64a1bd9cf52f
https://github.com/renepickhardt/metalcon/blob/26a7bd89d2225fe2172dc958d10f64a1bd9cf52f/graphityServer/src/main/java/de/metalcon/server/statusupdates/StatusUpdateManager.java#L73-L97
39,817
renepickhardt/metalcon
graphityServer/src/main/java/de/metalcon/server/statusupdates/StatusUpdateManager.java
StatusUpdateManager.storeStatusUpdateTemplate
private static void storeStatusUpdateTemplate( final AbstractGraphDatabase graphDatabase, final StatusUpdateTemplate template, final Node previousTemplateNode) { final Transaction transaction = graphDatabase.beginTx(); try { // create template node final Node templateNode = StatusUpdateTemplate.createTe...
java
private static void storeStatusUpdateTemplate( final AbstractGraphDatabase graphDatabase, final StatusUpdateTemplate template, final Node previousTemplateNode) { final Transaction transaction = graphDatabase.beginTx(); try { // create template node final Node templateNode = StatusUpdateTemplate.createTe...
[ "private", "static", "void", "storeStatusUpdateTemplate", "(", "final", "AbstractGraphDatabase", "graphDatabase", ",", "final", "StatusUpdateTemplate", "template", ",", "final", "Node", "previousTemplateNode", ")", "{", "final", "Transaction", "transaction", "=", "graphDa...
store the status update template linking to the latest previous version @param graphDatabase social graph database to store the template in @param template status update template @param previousTemplateNode template node of the latest previous version
[ "store", "the", "status", "update", "template", "linking", "to", "the", "latest", "previous", "version" ]
26a7bd89d2225fe2172dc958d10f64a1bd9cf52f
https://github.com/renepickhardt/metalcon/blob/26a7bd89d2225fe2172dc958d10f64a1bd9cf52f/graphityServer/src/main/java/de/metalcon/server/statusupdates/StatusUpdateManager.java#L109-L132
39,818
renepickhardt/metalcon
graphityServer/src/main/java/de/metalcon/server/statusupdates/StatusUpdateManager.java
StatusUpdateManager.loadStatusUpdateTemplates
public static void loadStatusUpdateTemplates(final String rootDir, final Configuration config, final AbstractGraphDatabase graphDatabase) throws ParserConfigurationException, SAXException, IOException { // set working directory final String workingPath = rootDir + "classes/"; final String targetPackage =...
java
public static void loadStatusUpdateTemplates(final String rootDir, final Configuration config, final AbstractGraphDatabase graphDatabase) throws ParserConfigurationException, SAXException, IOException { // set working directory final String workingPath = rootDir + "classes/"; final String targetPackage =...
[ "public", "static", "void", "loadStatusUpdateTemplates", "(", "final", "String", "rootDir", ",", "final", "Configuration", "config", ",", "final", "AbstractGraphDatabase", "graphDatabase", ")", "throws", "ParserConfigurationException", ",", "SAXException", ",", "IOExcepti...
load the status update allowed @param rootDir classes directory parent @param config Graphity configuration @param graphDatabase graph database to store status update version control @throws IOException - IO error @throws SAXException - parse error @throws ParserConfigurationException - DocumentBuilder cannot match th...
[ "load", "the", "status", "update", "allowed" ]
26a7bd89d2225fe2172dc958d10f64a1bd9cf52f
https://github.com/renepickhardt/metalcon/blob/26a7bd89d2225fe2172dc958d10f64a1bd9cf52f/graphityServer/src/main/java/de/metalcon/server/statusupdates/StatusUpdateManager.java#L150-L231
39,819
renepickhardt/metalcon
graphityServer/src/main/java/de/metalcon/server/statusupdates/StatusUpdateManager.java
StatusUpdateManager.instantiateStatusUpdate
public static StatusUpdate instantiateStatusUpdate( final String typeIdentifier, final FormItemList values) throws StatusUpdateInstantiationFailedException { final StatusUpdateTemplate template = getStatusUpdateTemplate(typeIdentifier); final Class<?> templateInstantiationClass = template .getInstantiatio...
java
public static StatusUpdate instantiateStatusUpdate( final String typeIdentifier, final FormItemList values) throws StatusUpdateInstantiationFailedException { final StatusUpdateTemplate template = getStatusUpdateTemplate(typeIdentifier); final Class<?> templateInstantiationClass = template .getInstantiatio...
[ "public", "static", "StatusUpdate", "instantiateStatusUpdate", "(", "final", "String", "typeIdentifier", ",", "final", "FormItemList", "values", ")", "throws", "StatusUpdateInstantiationFailedException", "{", "final", "StatusUpdateTemplate", "template", "=", "getStatusUpdateT...
instantiate a status update @param typeIdentifier status update type identifier @param values form item list containing all status update items necessary @return status update instance of type specified @throws StatusUpdateInstantiationFailedException if the status update could not be instantiated with the parameters ...
[ "instantiate", "a", "status", "update" ]
26a7bd89d2225fe2172dc958d10f64a1bd9cf52f
https://github.com/renepickhardt/metalcon/blob/26a7bd89d2225fe2172dc958d10f64a1bd9cf52f/graphityServer/src/main/java/de/metalcon/server/statusupdates/StatusUpdateManager.java#L260-L316
39,820
renepickhardt/metalcon
graphityServer/src/main/java/de/metalcon/server/tomcat/NSSP/delete/user/DeleteUserRequest.java
DeleteUserRequest.checkRequest
public static DeleteUserRequest checkRequest( final HttpServletRequest request, final DeleteRequest deleteRequest, final DeleteUserResponse deleteUserResponse) { final Node user = checkUserIdentifier(request, deleteUserResponse); if (user != null) { return new DeleteUserRequest(deleteRequest.getType(), ...
java
public static DeleteUserRequest checkRequest( final HttpServletRequest request, final DeleteRequest deleteRequest, final DeleteUserResponse deleteUserResponse) { final Node user = checkUserIdentifier(request, deleteUserResponse); if (user != null) { return new DeleteUserRequest(deleteRequest.getType(), ...
[ "public", "static", "DeleteUserRequest", "checkRequest", "(", "final", "HttpServletRequest", "request", ",", "final", "DeleteRequest", "deleteRequest", ",", "final", "DeleteUserResponse", "deleteUserResponse", ")", "{", "final", "Node", "user", "=", "checkUserIdentifier",...
check a delete user request for validity concerning NSSP @param request Tomcat servlet request @param deleteRequest basic delete request object @param deleteUserResponse delete user response object @return delete user request object<br> <b>null</b> if the delete user request is invalid
[ "check", "a", "delete", "user", "request", "for", "validity", "concerning", "NSSP" ]
26a7bd89d2225fe2172dc958d10f64a1bd9cf52f
https://github.com/renepickhardt/metalcon/blob/26a7bd89d2225fe2172dc958d10f64a1bd9cf52f/graphityServer/src/main/java/de/metalcon/server/tomcat/NSSP/delete/user/DeleteUserRequest.java#L58-L68
39,821
TheHolyWaffle/League-of-Legends-XMPP-Chat-Library
src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java
LolChat.addFriendById
public void addFriendById(String userId, String name, FriendGroup friendGroup) { if (name == null && getRiotApi() != null) { try { name = getRiotApi().getName(userId); } catch (final IOException e) { e.printStackTrace(); } } try { connection .getRoster() .createEntry( Strin...
java
public void addFriendById(String userId, String name, FriendGroup friendGroup) { if (name == null && getRiotApi() != null) { try { name = getRiotApi().getName(userId); } catch (final IOException e) { e.printStackTrace(); } } try { connection .getRoster() .createEntry( Strin...
[ "public", "void", "addFriendById", "(", "String", "userId", ",", "String", "name", ",", "FriendGroup", "friendGroup", ")", "{", "if", "(", "name", "==", "null", "&&", "getRiotApi", "(", ")", "!=", "null", ")", "{", "try", "{", "name", "=", "getRiotApi", ...
Sends an friend request to an other user. @param userId The userId of the user you want to add (e.g. sum12345678@pvp.net). @param name The name you want to assign to this user. @param friendGroup The FriendGroup you want to put this user in.
[ "Sends", "an", "friend", "request", "to", "an", "other", "user", "." ]
5e4d87d0c054ff2f6510545b0e9f838338695c70
https://github.com/TheHolyWaffle/League-of-Legends-XMPP-Chat-Library/blob/5e4d87d0c054ff2f6510545b0e9f838338695c70/src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java#L221-L242
39,822
TheHolyWaffle/League-of-Legends-XMPP-Chat-Library
src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java
LolChat.addFriendByName
public boolean addFriendByName(String name, FriendGroup friendGroup) { if (getRiotApi() != null) { try { final StringBuilder buf = new StringBuilder(); buf.append("sum"); buf.append(getRiotApi().getSummonerId(name)); buf.append("@pvp.net"); addFriendById(buf.toString(), name, friendGroup); ...
java
public boolean addFriendByName(String name, FriendGroup friendGroup) { if (getRiotApi() != null) { try { final StringBuilder buf = new StringBuilder(); buf.append("sum"); buf.append(getRiotApi().getSummonerId(name)); buf.append("@pvp.net"); addFriendById(buf.toString(), name, friendGroup); ...
[ "public", "boolean", "addFriendByName", "(", "String", "name", ",", "FriendGroup", "friendGroup", ")", "{", "if", "(", "getRiotApi", "(", ")", "!=", "null", ")", "{", "try", "{", "final", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", ...
Sends an friend request to an other user. An Riot API key is required for this. @param name The name of the Friend you want to add (case insensitive) @param friendGroup The FriendGroup you want to put this user in. @return True if succesful otherwise false.
[ "Sends", "an", "friend", "request", "to", "an", "other", "user", ".", "An", "Riot", "API", "key", "is", "required", "for", "this", "." ]
5e4d87d0c054ff2f6510545b0e9f838338695c70
https://github.com/TheHolyWaffle/League-of-Legends-XMPP-Chat-Library/blob/5e4d87d0c054ff2f6510545b0e9f838338695c70/src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java#L266-L281
39,823
TheHolyWaffle/League-of-Legends-XMPP-Chat-Library
src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java
LolChat.addFriendGroup
public FriendGroup addFriendGroup(String name) { final RosterGroup g = connection.getRoster().createGroup(name); if (g != null) { return new FriendGroup(this, connection, g); } return null; }
java
public FriendGroup addFriendGroup(String name) { final RosterGroup g = connection.getRoster().createGroup(name); if (g != null) { return new FriendGroup(this, connection, g); } return null; }
[ "public", "FriendGroup", "addFriendGroup", "(", "String", "name", ")", "{", "final", "RosterGroup", "g", "=", "connection", ".", "getRoster", "(", ")", ".", "createGroup", "(", "name", ")", ";", "if", "(", "g", "!=", "null", ")", "{", "return", "new", ...
Creates a new FriendGroup. If this FriendGroup contains no Friends when you logout it will be erased from the server. @param name The name of this FriendGroup @return The new FriendGroup or null if a FriendGroup with this name already exists.
[ "Creates", "a", "new", "FriendGroup", ".", "If", "this", "FriendGroup", "contains", "no", "Friends", "when", "you", "logout", "it", "will", "be", "erased", "from", "the", "server", "." ]
5e4d87d0c054ff2f6510545b0e9f838338695c70
https://github.com/TheHolyWaffle/League-of-Legends-XMPP-Chat-Library/blob/5e4d87d0c054ff2f6510545b0e9f838338695c70/src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java#L292-L298
39,824
TheHolyWaffle/League-of-Legends-XMPP-Chat-Library
src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java
LolChat.disconnect
public void disconnect() { connection.getRoster().removeRosterListener(leagueRosterListener); try { connection.disconnect(); } catch (final NotConnectedException e) { e.printStackTrace(); } stop = true; }
java
public void disconnect() { connection.getRoster().removeRosterListener(leagueRosterListener); try { connection.disconnect(); } catch (final NotConnectedException e) { e.printStackTrace(); } stop = true; }
[ "public", "void", "disconnect", "(", ")", "{", "connection", ".", "getRoster", "(", ")", ".", "removeRosterListener", "(", "leagueRosterListener", ")", ";", "try", "{", "connection", ".", "disconnect", "(", ")", ";", "}", "catch", "(", "final", "NotConnected...
Disconnects from chatserver and releases all resources.
[ "Disconnects", "from", "chatserver", "and", "releases", "all", "resources", "." ]
5e4d87d0c054ff2f6510545b0e9f838338695c70
https://github.com/TheHolyWaffle/League-of-Legends-XMPP-Chat-Library/blob/5e4d87d0c054ff2f6510545b0e9f838338695c70/src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java#L404-L412
39,825
TheHolyWaffle/League-of-Legends-XMPP-Chat-Library
src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java
LolChat.getFriend
public Friend getFriend(Filter<Friend> filter) { for (final RosterEntry e : connection.getRoster().getEntries()) { final Friend f = new Friend(this, connection, e); if (filter.accept(f)) { return f; } } return null; }
java
public Friend getFriend(Filter<Friend> filter) { for (final RosterEntry e : connection.getRoster().getEntries()) { final Friend f = new Friend(this, connection, e); if (filter.accept(f)) { return f; } } return null; }
[ "public", "Friend", "getFriend", "(", "Filter", "<", "Friend", ">", "filter", ")", "{", "for", "(", "final", "RosterEntry", "e", ":", "connection", ".", "getRoster", "(", ")", ".", "getEntries", "(", ")", ")", "{", "final", "Friend", "f", "=", "new", ...
Gets a friend based on a given filter. @param filter The filter defines conditions that your Friend must meet. @return The first Friend that meets the conditions or null if not found.
[ "Gets", "a", "friend", "based", "on", "a", "given", "filter", "." ]
5e4d87d0c054ff2f6510545b0e9f838338695c70
https://github.com/TheHolyWaffle/League-of-Legends-XMPP-Chat-Library/blob/5e4d87d0c054ff2f6510545b0e9f838338695c70/src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java#L439-L447
39,826
TheHolyWaffle/League-of-Legends-XMPP-Chat-Library
src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java
LolChat.getFriendById
public Friend getFriendById(String xmppAddress) { final RosterEntry entry = connection.getRoster().getEntry( StringUtils.parseBareAddress(xmppAddress)); if (entry != null) { return new Friend(this, connection, entry); } return null; }
java
public Friend getFriendById(String xmppAddress) { final RosterEntry entry = connection.getRoster().getEntry( StringUtils.parseBareAddress(xmppAddress)); if (entry != null) { return new Friend(this, connection, entry); } return null; }
[ "public", "Friend", "getFriendById", "(", "String", "xmppAddress", ")", "{", "final", "RosterEntry", "entry", "=", "connection", ".", "getRoster", "(", ")", ".", "getEntry", "(", "StringUtils", ".", "parseBareAddress", "(", "xmppAddress", ")", ")", ";", "if", ...
Gets a friend based on his XMPPAddress. @param xmppAddress For example sum12345678@pvp.net @return The corresponding Friend or null if user is not found or he is not a friend of you.
[ "Gets", "a", "friend", "based", "on", "his", "XMPPAddress", "." ]
5e4d87d0c054ff2f6510545b0e9f838338695c70
https://github.com/TheHolyWaffle/League-of-Legends-XMPP-Chat-Library/blob/5e4d87d0c054ff2f6510545b0e9f838338695c70/src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java#L457-L464
39,827
TheHolyWaffle/League-of-Legends-XMPP-Chat-Library
src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java
LolChat.getFriendGroupByName
public FriendGroup getFriendGroupByName(String name) { final RosterGroup g = connection.getRoster().getGroup(name); if (g != null) { return new FriendGroup(this, connection, g); } return addFriendGroup(name); }
java
public FriendGroup getFriendGroupByName(String name) { final RosterGroup g = connection.getRoster().getGroup(name); if (g != null) { return new FriendGroup(this, connection, g); } return addFriendGroup(name); }
[ "public", "FriendGroup", "getFriendGroupByName", "(", "String", "name", ")", "{", "final", "RosterGroup", "g", "=", "connection", ".", "getRoster", "(", ")", ".", "getGroup", "(", "name", ")", ";", "if", "(", "g", "!=", "null", ")", "{", "return", "new",...
Gets a FriendGroup by name, for example "Duo Partners". The name is case sensitive! The FriendGroup will be created if it didn't exist yet. @param name The name of your group (case-sensitive) @return The corresponding FriendGroup
[ "Gets", "a", "FriendGroup", "by", "name", "for", "example", "Duo", "Partners", ".", "The", "name", "is", "case", "sensitive!", "The", "FriendGroup", "will", "be", "created", "if", "it", "didn", "t", "exist", "yet", "." ]
5e4d87d0c054ff2f6510545b0e9f838338695c70
https://github.com/TheHolyWaffle/League-of-Legends-XMPP-Chat-Library/blob/5e4d87d0c054ff2f6510545b0e9f838338695c70/src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java#L493-L499
39,828
TheHolyWaffle/League-of-Legends-XMPP-Chat-Library
src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java
LolChat.getFriendGroups
public List<FriendGroup> getFriendGroups() { final ArrayList<FriendGroup> groups = new ArrayList<>(); for (final RosterGroup g : connection.getRoster().getGroups()) { groups.add(new FriendGroup(this, connection, g)); } return groups; }
java
public List<FriendGroup> getFriendGroups() { final ArrayList<FriendGroup> groups = new ArrayList<>(); for (final RosterGroup g : connection.getRoster().getGroups()) { groups.add(new FriendGroup(this, connection, g)); } return groups; }
[ "public", "List", "<", "FriendGroup", ">", "getFriendGroups", "(", ")", "{", "final", "ArrayList", "<", "FriendGroup", ">", "groups", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "final", "RosterGroup", "g", ":", "connection", ".", "getRoster"...
Get a list of all your FriendGroups. @return A List of all your FriendGroups
[ "Get", "a", "list", "of", "all", "your", "FriendGroups", "." ]
5e4d87d0c054ff2f6510545b0e9f838338695c70
https://github.com/TheHolyWaffle/League-of-Legends-XMPP-Chat-Library/blob/5e4d87d0c054ff2f6510545b0e9f838338695c70/src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java#L506-L512
39,829
TheHolyWaffle/League-of-Legends-XMPP-Chat-Library
src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java
LolChat.getFriends
public List<Friend> getFriends() { return getFriends(new Filter<Friend>() { public boolean accept(Friend e) { return true; } }); }
java
public List<Friend> getFriends() { return getFriends(new Filter<Friend>() { public boolean accept(Friend e) { return true; } }); }
[ "public", "List", "<", "Friend", ">", "getFriends", "(", ")", "{", "return", "getFriends", "(", "new", "Filter", "<", "Friend", ">", "(", ")", "{", "public", "boolean", "accept", "(", "Friend", "e", ")", "{", "return", "true", ";", "}", "}", ")", "...
Get all your friends, both online and offline. @return A List of all your Friends
[ "Get", "all", "your", "friends", "both", "online", "and", "offline", "." ]
5e4d87d0c054ff2f6510545b0e9f838338695c70
https://github.com/TheHolyWaffle/League-of-Legends-XMPP-Chat-Library/blob/5e4d87d0c054ff2f6510545b0e9f838338695c70/src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java#L537-L544
39,830
TheHolyWaffle/League-of-Legends-XMPP-Chat-Library
src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java
LolChat.getFriends
public List<Friend> getFriends(Filter<Friend> filter) { final ArrayList<Friend> friends = new ArrayList<>(); for (final RosterEntry e : connection.getRoster().getEntries()) { final Friend f = new Friend(this, connection, e); if (filter.accept(f)) { friends.add(f); } } return friends; }
java
public List<Friend> getFriends(Filter<Friend> filter) { final ArrayList<Friend> friends = new ArrayList<>(); for (final RosterEntry e : connection.getRoster().getEntries()) { final Friend f = new Friend(this, connection, e); if (filter.accept(f)) { friends.add(f); } } return friends; }
[ "public", "List", "<", "Friend", ">", "getFriends", "(", "Filter", "<", "Friend", ">", "filter", ")", "{", "final", "ArrayList", "<", "Friend", ">", "friends", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "final", "RosterEntry", "e", ":", ...
Gets a list of your friends based on a given filter. @param filter The filter defines conditions that your Friends must meet. @return A List of your Friends that meet the condition of your Filter
[ "Gets", "a", "list", "of", "your", "friends", "based", "on", "a", "given", "filter", "." ]
5e4d87d0c054ff2f6510545b0e9f838338695c70
https://github.com/TheHolyWaffle/League-of-Legends-XMPP-Chat-Library/blob/5e4d87d0c054ff2f6510545b0e9f838338695c70/src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java#L553-L562
39,831
TheHolyWaffle/League-of-Legends-XMPP-Chat-Library
src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java
LolChat.getName
public String getName(boolean forcedUpdate) { if ((name == null || forcedUpdate) && getRiotApi() != null) { try { name = getRiotApi().getName(connection.getUser()); } catch (final IOException e) { e.printStackTrace(); } } return name; }
java
public String getName(boolean forcedUpdate) { if ((name == null || forcedUpdate) && getRiotApi() != null) { try { name = getRiotApi().getName(connection.getUser()); } catch (final IOException e) { e.printStackTrace(); } } return name; }
[ "public", "String", "getName", "(", "boolean", "forcedUpdate", ")", "{", "if", "(", "(", "name", "==", "null", "||", "forcedUpdate", ")", "&&", "getRiotApi", "(", ")", "!=", "null", ")", "{", "try", "{", "name", "=", "getRiotApi", "(", ")", ".", "get...
Gets the name of the user that is logged in. An Riot API key has to be provided. @param forcedUpdate True will force to update the name even when it is not null. @return The name of this user or null if something went wrong.
[ "Gets", "the", "name", "of", "the", "user", "that", "is", "logged", "in", ".", "An", "Riot", "API", "key", "has", "to", "be", "provided", "." ]
5e4d87d0c054ff2f6510545b0e9f838338695c70
https://github.com/TheHolyWaffle/League-of-Legends-XMPP-Chat-Library/blob/5e4d87d0c054ff2f6510545b0e9f838338695c70/src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java#L582-L591
39,832
TheHolyWaffle/League-of-Legends-XMPP-Chat-Library
src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java
LolChat.getOfflineFriends
public List<Friend> getOfflineFriends() { return getFriends(new Filter<Friend>() { public boolean accept(Friend friend) { return !friend.isOnline(); } }); }
java
public List<Friend> getOfflineFriends() { return getFriends(new Filter<Friend>() { public boolean accept(Friend friend) { return !friend.isOnline(); } }); }
[ "public", "List", "<", "Friend", ">", "getOfflineFriends", "(", ")", "{", "return", "getFriends", "(", "new", "Filter", "<", "Friend", ">", "(", ")", "{", "public", "boolean", "accept", "(", "Friend", "friend", ")", "{", "return", "!", "friend", ".", "...
Get all your friends who are offline. @return A list of all your offline Friends
[ "Get", "all", "your", "friends", "who", "are", "offline", "." ]
5e4d87d0c054ff2f6510545b0e9f838338695c70
https://github.com/TheHolyWaffle/League-of-Legends-XMPP-Chat-Library/blob/5e4d87d0c054ff2f6510545b0e9f838338695c70/src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java#L598-L605
39,833
TheHolyWaffle/League-of-Legends-XMPP-Chat-Library
src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java
LolChat.getOnlineFriends
public List<Friend> getOnlineFriends() { return getFriends(new Filter<Friend>() { public boolean accept(Friend friend) { return friend.isOnline(); } }); }
java
public List<Friend> getOnlineFriends() { return getFriends(new Filter<Friend>() { public boolean accept(Friend friend) { return friend.isOnline(); } }); }
[ "public", "List", "<", "Friend", ">", "getOnlineFriends", "(", ")", "{", "return", "getFriends", "(", "new", "Filter", "<", "Friend", ">", "(", ")", "{", "public", "boolean", "accept", "(", "Friend", "friend", ")", "{", "return", "friend", ".", "isOnline...
Get all your friends who are online. @return A list of all your online Friends
[ "Get", "all", "your", "friends", "who", "are", "online", "." ]
5e4d87d0c054ff2f6510545b0e9f838338695c70
https://github.com/TheHolyWaffle/League-of-Legends-XMPP-Chat-Library/blob/5e4d87d0c054ff2f6510545b0e9f838338695c70/src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java#L612-L619
39,834
TheHolyWaffle/League-of-Legends-XMPP-Chat-Library
src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java
LolChat.getPendingFriendRequests
public List<Friend> getPendingFriendRequests() { return getFriends(new Filter<Friend>() { public boolean accept(Friend friend) { return friend.getFriendStatus() == FriendStatus.ADD_REQUEST_PENDING; } }); }
java
public List<Friend> getPendingFriendRequests() { return getFriends(new Filter<Friend>() { public boolean accept(Friend friend) { return friend.getFriendStatus() == FriendStatus.ADD_REQUEST_PENDING; } }); }
[ "public", "List", "<", "Friend", ">", "getPendingFriendRequests", "(", ")", "{", "return", "getFriends", "(", "new", "Filter", "<", "Friend", ">", "(", ")", "{", "public", "boolean", "accept", "(", "Friend", "friend", ")", "{", "return", "friend", ".", "...
Gets a list of user that you've sent friend requests but haven't answered yet. @return A list of Friends.
[ "Gets", "a", "list", "of", "user", "that", "you", "ve", "sent", "friend", "requests", "but", "haven", "t", "answered", "yet", "." ]
5e4d87d0c054ff2f6510545b0e9f838338695c70
https://github.com/TheHolyWaffle/League-of-Legends-XMPP-Chat-Library/blob/5e4d87d0c054ff2f6510545b0e9f838338695c70/src/main/java/com/github/theholywaffle/lolchatapi/LolChat.java#L627-L634
39,835
atomix/catalyst
netty/src/main/java/io/atomix/catalyst/transport/netty/NettyOptions.java
NettyOptions.threads
public int threads() { int threads = reader.getInteger(THREADS, DEFAULT_THREADS); if (threads == -1) { return Runtime.getRuntime().availableProcessors(); } return threads; }
java
public int threads() { int threads = reader.getInteger(THREADS, DEFAULT_THREADS); if (threads == -1) { return Runtime.getRuntime().availableProcessors(); } return threads; }
[ "public", "int", "threads", "(", ")", "{", "int", "threads", "=", "reader", ".", "getInteger", "(", "THREADS", ",", "DEFAULT_THREADS", ")", ";", "if", "(", "threads", "==", "-", "1", ")", "{", "return", "Runtime", ".", "getRuntime", "(", ")", ".", "a...
The number of event loop threads.
[ "The", "number", "of", "event", "loop", "threads", "." ]
140e762cb975cd8ee1fd85119043c5b8bf917c5c
https://github.com/atomix/catalyst/blob/140e762cb975cd8ee1fd85119043c5b8bf917c5c/netty/src/main/java/io/atomix/catalyst/transport/netty/NettyOptions.java#L71-L77
39,836
atomix/catalyst
netty/src/main/java/io/atomix/catalyst/transport/netty/NettyOptions.java
NettyOptions.sslProtocol
public SslProtocol sslProtocol() { String protocol = reader.getString(SSL_PROTOCOL, DEFAULT_SSL_PROTOCOL).replace(".", "_"); try { return SslProtocol.valueOf(protocol); } catch (IllegalArgumentException e) { throw new ConfigurationException("unknown SSL protocol: " + protocol, e); } }
java
public SslProtocol sslProtocol() { String protocol = reader.getString(SSL_PROTOCOL, DEFAULT_SSL_PROTOCOL).replace(".", "_"); try { return SslProtocol.valueOf(protocol); } catch (IllegalArgumentException e) { throw new ConfigurationException("unknown SSL protocol: " + protocol, e); } }
[ "public", "SslProtocol", "sslProtocol", "(", ")", "{", "String", "protocol", "=", "reader", ".", "getString", "(", "SSL_PROTOCOL", ",", "DEFAULT_SSL_PROTOCOL", ")", ".", "replace", "(", "\".\"", ",", "\"_\"", ")", ";", "try", "{", "return", "SslProtocol", "....
The SSL Protocol.
[ "The", "SSL", "Protocol", "." ]
140e762cb975cd8ee1fd85119043c5b8bf917c5c
https://github.com/atomix/catalyst/blob/140e762cb975cd8ee1fd85119043c5b8bf917c5c/netty/src/main/java/io/atomix/catalyst/transport/netty/NettyOptions.java#L152-L159
39,837
atomix/catalyst
netty/src/main/java/io/atomix/catalyst/transport/netty/NettyServer.java
NettyServer.listen
private void listen(Address address, Consumer<Connection> listener, ThreadContext context) { channelGroup = new DefaultChannelGroup("catalyst-acceptor-channels", GlobalEventExecutor.INSTANCE); handler = new ServerHandler(connections, listener, context, transport.properties()); final ServerBootstrap bootst...
java
private void listen(Address address, Consumer<Connection> listener, ThreadContext context) { channelGroup = new DefaultChannelGroup("catalyst-acceptor-channels", GlobalEventExecutor.INSTANCE); handler = new ServerHandler(connections, listener, context, transport.properties()); final ServerBootstrap bootst...
[ "private", "void", "listen", "(", "Address", "address", ",", "Consumer", "<", "Connection", ">", "listener", ",", "ThreadContext", "context", ")", "{", "channelGroup", "=", "new", "DefaultChannelGroup", "(", "\"catalyst-acceptor-channels\"", ",", "GlobalEventExecutor"...
Starts listening for the given member.
[ "Starts", "listening", "for", "the", "given", "member", "." ]
140e762cb975cd8ee1fd85119043c5b8bf917c5c
https://github.com/atomix/catalyst/blob/140e762cb975cd8ee1fd85119043c5b8bf917c5c/netty/src/main/java/io/atomix/catalyst/transport/netty/NettyServer.java#L87-L136
39,838
atomix/catalyst
concurrent/src/main/java/io/atomix/catalyst/concurrent/Runnables.java
Runnables.logFailure
static Runnable logFailure(final Runnable runnable, Logger logger) { return () -> { try { runnable.run(); } catch (Throwable t) { if (!(t instanceof RejectedExecutionException)) { logger.error("An uncaught exception occurred", t); } throw t; } }; }
java
static Runnable logFailure(final Runnable runnable, Logger logger) { return () -> { try { runnable.run(); } catch (Throwable t) { if (!(t instanceof RejectedExecutionException)) { logger.error("An uncaught exception occurred", t); } throw t; } }; }
[ "static", "Runnable", "logFailure", "(", "final", "Runnable", "runnable", ",", "Logger", "logger", ")", "{", "return", "(", ")", "->", "{", "try", "{", "runnable", ".", "run", "(", ")", ";", "}", "catch", "(", "Throwable", "t", ")", "{", "if", "(", ...
Returns a wrapped runnable that logs and rethrows uncaught exceptions.
[ "Returns", "a", "wrapped", "runnable", "that", "logs", "and", "rethrows", "uncaught", "exceptions", "." ]
140e762cb975cd8ee1fd85119043c5b8bf917c5c
https://github.com/atomix/catalyst/blob/140e762cb975cd8ee1fd85119043c5b8bf917c5c/concurrent/src/main/java/io/atomix/catalyst/concurrent/Runnables.java#L17-L28
39,839
TheHolyWaffle/League-of-Legends-XMPP-Chat-Library
src/main/java/com/github/theholywaffle/lolchatapi/wrapper/Friend.java
Friend.delete
public boolean delete() { try { con.getRoster().removeEntry(get()); return true; } catch (XMPPException | NotLoggedInException | NoResponseException | NotConnectedException e) { e.printStackTrace(); } return false; }
java
public boolean delete() { try { con.getRoster().removeEntry(get()); return true; } catch (XMPPException | NotLoggedInException | NoResponseException | NotConnectedException e) { e.printStackTrace(); } return false; }
[ "public", "boolean", "delete", "(", ")", "{", "try", "{", "con", ".", "getRoster", "(", ")", ".", "removeEntry", "(", "get", "(", ")", ")", ";", "return", "true", ";", "}", "catch", "(", "XMPPException", "|", "NotLoggedInException", "|", "NoResponseExcep...
Deletes this friend. @return true if succesful, otherwise false
[ "Deletes", "this", "friend", "." ]
5e4d87d0c054ff2f6510545b0e9f838338695c70
https://github.com/TheHolyWaffle/League-of-Legends-XMPP-Chat-Library/blob/5e4d87d0c054ff2f6510545b0e9f838338695c70/src/main/java/com/github/theholywaffle/lolchatapi/wrapper/Friend.java#L98-L107
39,840
TheHolyWaffle/League-of-Legends-XMPP-Chat-Library
src/main/java/com/github/theholywaffle/lolchatapi/wrapper/Friend.java
Friend.getFriendStatus
public FriendStatus getFriendStatus() { for (final FriendStatus status : FriendStatus.values()) { if (status.status == get().getStatus()) { return status; } } return null; }
java
public FriendStatus getFriendStatus() { for (final FriendStatus status : FriendStatus.values()) { if (status.status == get().getStatus()) { return status; } } return null; }
[ "public", "FriendStatus", "getFriendStatus", "(", ")", "{", "for", "(", "final", "FriendStatus", "status", ":", "FriendStatus", ".", "values", "(", ")", ")", "{", "if", "(", "status", ".", "status", "==", "get", "(", ")", ".", "getStatus", "(", ")", ")...
Gets the relation between you and this friend. @return The FriendStatus @see FriendStatus
[ "Gets", "the", "relation", "between", "you", "and", "this", "friend", "." ]
5e4d87d0c054ff2f6510545b0e9f838338695c70
https://github.com/TheHolyWaffle/League-of-Legends-XMPP-Chat-Library/blob/5e4d87d0c054ff2f6510545b0e9f838338695c70/src/main/java/com/github/theholywaffle/lolchatapi/wrapper/Friend.java#L149-L156
39,841
TheHolyWaffle/League-of-Legends-XMPP-Chat-Library
src/main/java/com/github/theholywaffle/lolchatapi/wrapper/Friend.java
Friend.getGroup
public FriendGroup getGroup() { final Collection<RosterGroup> groups = get().getGroups(); if (groups.size() > 0) { return new FriendGroup(api, con, get().getGroups().iterator() .next()); } return null; }
java
public FriendGroup getGroup() { final Collection<RosterGroup> groups = get().getGroups(); if (groups.size() > 0) { return new FriendGroup(api, con, get().getGroups().iterator() .next()); } return null; }
[ "public", "FriendGroup", "getGroup", "(", ")", "{", "final", "Collection", "<", "RosterGroup", ">", "groups", "=", "get", "(", ")", ".", "getGroups", "(", ")", ";", "if", "(", "groups", ".", "size", "(", ")", ">", "0", ")", "{", "return", "new", "F...
Gets the FriendGroup that contains this friend. @return the FriendGroup that currently contains this Friend or null if this Friend is not in a FriendGroup.
[ "Gets", "the", "FriendGroup", "that", "contains", "this", "friend", "." ]
5e4d87d0c054ff2f6510545b0e9f838338695c70
https://github.com/TheHolyWaffle/League-of-Legends-XMPP-Chat-Library/blob/5e4d87d0c054ff2f6510545b0e9f838338695c70/src/main/java/com/github/theholywaffle/lolchatapi/wrapper/Friend.java#L164-L171
39,842
TheHolyWaffle/League-of-Legends-XMPP-Chat-Library
src/main/java/com/github/theholywaffle/lolchatapi/wrapper/Friend.java
Friend.getName
public String getName(boolean forcedUpdate) { String name = get().getName(); if ((name == null || forcedUpdate) && api.getRiotApi() != null) { try { name = api.getRiotApi().getName(getUserId()); setName(name); } catch (final IOException e) { e.printStackTrace(); } } return name; ...
java
public String getName(boolean forcedUpdate) { String name = get().getName(); if ((name == null || forcedUpdate) && api.getRiotApi() != null) { try { name = api.getRiotApi().getName(getUserId()); setName(name); } catch (final IOException e) { e.printStackTrace(); } } return name; ...
[ "public", "String", "getName", "(", "boolean", "forcedUpdate", ")", "{", "String", "name", "=", "get", "(", ")", ".", "getName", "(", ")", ";", "if", "(", "(", "name", "==", "null", "||", "forcedUpdate", ")", "&&", "api", ".", "getRiotApi", "(", ")",...
Gets the name of this friend. If the name was null then we try to fetch the name with your Riot API Key if provided. Enable forcedUpdate to always fetch the latest name of this Friend even when the name is not null. @param forcedUpdate True will force to update the name even when it is not null. @return The name of th...
[ "Gets", "the", "name", "of", "this", "friend", ".", "If", "the", "name", "was", "null", "then", "we", "try", "to", "fetch", "the", "name", "with", "your", "Riot", "API", "Key", "if", "provided", ".", "Enable", "forcedUpdate", "to", "always", "fetch", "...
5e4d87d0c054ff2f6510545b0e9f838338695c70
https://github.com/TheHolyWaffle/League-of-Legends-XMPP-Chat-Library/blob/5e4d87d0c054ff2f6510545b0e9f838338695c70/src/main/java/com/github/theholywaffle/lolchatapi/wrapper/Friend.java#L193-L204
39,843
TheHolyWaffle/League-of-Legends-XMPP-Chat-Library
src/main/java/com/github/theholywaffle/lolchatapi/wrapper/Friend.java
Friend.sendMessage
public void sendMessage(String message) { try { getChat().sendMessage(message); } catch (XMPPException | NotConnectedException e) { e.printStackTrace(); } }
java
public void sendMessage(String message) { try { getChat().sendMessage(message); } catch (XMPPException | NotConnectedException e) { e.printStackTrace(); } }
[ "public", "void", "sendMessage", "(", "String", "message", ")", "{", "try", "{", "getChat", "(", ")", ".", "sendMessage", "(", "message", ")", ";", "}", "catch", "(", "XMPPException", "|", "NotConnectedException", "e", ")", "{", "e", ".", "printStackTrace"...
Sends a message to this friend @param message The message you want to send
[ "Sends", "a", "message", "to", "this", "friend" ]
5e4d87d0c054ff2f6510545b0e9f838338695c70
https://github.com/TheHolyWaffle/League-of-Legends-XMPP-Chat-Library/blob/5e4d87d0c054ff2f6510545b0e9f838338695c70/src/main/java/com/github/theholywaffle/lolchatapi/wrapper/Friend.java#L250-L256
39,844
renepickhardt/metalcon
graphityServer/src/main/java/de/metalcon/server/tomcat/NSSP/Response.java
Response.addStatusMessage
@SuppressWarnings("unchecked") protected void addStatusMessage(final String statusMessage, final String solution) { this.json.put(ProtocolConstants.SOLUTION, solution); this.json.put(ProtocolConstants.STATUS_MESSAGE, statusMessage); }
java
@SuppressWarnings("unchecked") protected void addStatusMessage(final String statusMessage, final String solution) { this.json.put(ProtocolConstants.SOLUTION, solution); this.json.put(ProtocolConstants.STATUS_MESSAGE, statusMessage); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "void", "addStatusMessage", "(", "final", "String", "statusMessage", ",", "final", "String", "solution", ")", "{", "this", ".", "json", ".", "put", "(", "ProtocolConstants", ".", "SOLUTION", ",", ...
add a status message to the response @param statusMessage status message @param solution detailed description and solution
[ "add", "a", "status", "message", "to", "the", "response" ]
26a7bd89d2225fe2172dc958d10f64a1bd9cf52f
https://github.com/renepickhardt/metalcon/blob/26a7bd89d2225fe2172dc958d10f64a1bd9cf52f/graphityServer/src/main/java/de/metalcon/server/tomcat/NSSP/Response.java#L31-L36
39,845
renepickhardt/metalcon
graphityServer/src/main/java/de/metalcon/server/tomcat/TomcatClientResponder.java
TomcatClientResponder.error
public void error(final int errorCode, final String message) { try { this.response.sendError(errorCode, message); } catch (final IOException e) { e.printStackTrace(); } }
java
public void error(final int errorCode, final String message) { try { this.response.sendError(errorCode, message); } catch (final IOException e) { e.printStackTrace(); } }
[ "public", "void", "error", "(", "final", "int", "errorCode", ",", "final", "String", "message", ")", "{", "try", "{", "this", ".", "response", ".", "sendError", "(", "errorCode", ",", "message", ")", ";", "}", "catch", "(", "final", "IOException", "e", ...
abort the response with an error @param errorCode HTTP error code @param message error message
[ "abort", "the", "response", "with", "an", "error" ]
26a7bd89d2225fe2172dc958d10f64a1bd9cf52f
https://github.com/renepickhardt/metalcon/blob/26a7bd89d2225fe2172dc958d10f64a1bd9cf52f/graphityServer/src/main/java/de/metalcon/server/tomcat/TomcatClientResponder.java#L58-L64
39,846
atomix/catalyst
buffer/src/main/java/io/atomix/catalyst/buffer/AbstractBuffer.java
AbstractBuffer.reset
protected AbstractBuffer reset(long offset, long capacity, long maxCapacity) { this.offset = offset; this.capacity = 0; this.initialCapacity = capacity; this.maxCapacity = maxCapacity; capacity(initialCapacity); references.set(0); rewind(); return this; }
java
protected AbstractBuffer reset(long offset, long capacity, long maxCapacity) { this.offset = offset; this.capacity = 0; this.initialCapacity = capacity; this.maxCapacity = maxCapacity; capacity(initialCapacity); references.set(0); rewind(); return this; }
[ "protected", "AbstractBuffer", "reset", "(", "long", "offset", ",", "long", "capacity", ",", "long", "maxCapacity", ")", "{", "this", ".", "offset", "=", "offset", ";", "this", ".", "capacity", "=", "0", ";", "this", ".", "initialCapacity", "=", "capacity"...
Resets the buffer's internal offset and capacity.
[ "Resets", "the", "buffer", "s", "internal", "offset", "and", "capacity", "." ]
140e762cb975cd8ee1fd85119043c5b8bf917c5c
https://github.com/atomix/catalyst/blob/140e762cb975cd8ee1fd85119043c5b8bf917c5c/buffer/src/main/java/io/atomix/catalyst/buffer/AbstractBuffer.java#L75-L84
39,847
atomix/catalyst
buffer/src/main/java/io/atomix/catalyst/buffer/AbstractBuffer.java
AbstractBuffer.checkOffset
protected void checkOffset(long offset) { if (offset(offset) < this.offset) { throw new IndexOutOfBoundsException(); } else if (limit == -1) { if (offset > maxCapacity) throw new IndexOutOfBoundsException(); } else { if (offset > limit) throw new IndexOutOfBoundsException()...
java
protected void checkOffset(long offset) { if (offset(offset) < this.offset) { throw new IndexOutOfBoundsException(); } else if (limit == -1) { if (offset > maxCapacity) throw new IndexOutOfBoundsException(); } else { if (offset > limit) throw new IndexOutOfBoundsException()...
[ "protected", "void", "checkOffset", "(", "long", "offset", ")", "{", "if", "(", "offset", "(", "offset", ")", "<", "this", ".", "offset", ")", "{", "throw", "new", "IndexOutOfBoundsException", "(", ")", ";", "}", "else", "if", "(", "limit", "==", "-", ...
Checks that the offset is within the bounds of the buffer.
[ "Checks", "that", "the", "offset", "is", "within", "the", "bounds", "of", "the", "buffer", "." ]
140e762cb975cd8ee1fd85119043c5b8bf917c5c
https://github.com/atomix/catalyst/blob/140e762cb975cd8ee1fd85119043c5b8bf917c5c/buffer/src/main/java/io/atomix/catalyst/buffer/AbstractBuffer.java#L319-L329
39,848
atomix/catalyst
buffer/src/main/java/io/atomix/catalyst/buffer/AbstractBuffer.java
AbstractBuffer.checkSlice
protected long checkSlice(long offset, long length) { checkOffset(offset); if (limit == -1) { if (offset + length > capacity) { if (capacity < maxCapacity) { capacity(calculateCapacity(offset + length)); } else { throw new BufferUnderflowException(); } } ...
java
protected long checkSlice(long offset, long length) { checkOffset(offset); if (limit == -1) { if (offset + length > capacity) { if (capacity < maxCapacity) { capacity(calculateCapacity(offset + length)); } else { throw new BufferUnderflowException(); } } ...
[ "protected", "long", "checkSlice", "(", "long", "offset", ",", "long", "length", ")", "{", "checkOffset", "(", "offset", ")", ";", "if", "(", "limit", "==", "-", "1", ")", "{", "if", "(", "offset", "+", "length", ">", "capacity", ")", "{", "if", "(...
Checks bounds for a slice.
[ "Checks", "bounds", "for", "a", "slice", "." ]
140e762cb975cd8ee1fd85119043c5b8bf917c5c
https://github.com/atomix/catalyst/blob/140e762cb975cd8ee1fd85119043c5b8bf917c5c/buffer/src/main/java/io/atomix/catalyst/buffer/AbstractBuffer.java#L334-L349
39,849
renepickhardt/metalcon
graphityServer/src/main/java/de/metalcon/server/tomcat/NSSP/read/ReadRequest.java
ReadRequest.checkRequest
public static ReadRequest checkRequest(final HttpServletRequest request, final ReadResponse readResponse) { final Node user = checkUserIdentifier(request, readResponse); if (user != null) { final Node poster = checkPosterIdentifier(request, readResponse); if (poster != null) { final int numItems = chec...
java
public static ReadRequest checkRequest(final HttpServletRequest request, final ReadResponse readResponse) { final Node user = checkUserIdentifier(request, readResponse); if (user != null) { final Node poster = checkPosterIdentifier(request, readResponse); if (poster != null) { final int numItems = chec...
[ "public", "static", "ReadRequest", "checkRequest", "(", "final", "HttpServletRequest", "request", ",", "final", "ReadResponse", "readResponse", ")", "{", "final", "Node", "user", "=", "checkUserIdentifier", "(", "request", ",", "readResponse", ")", ";", "if", "(",...
check a read request for validity concerning NSSP @param request Tomcat servlet request @param readResponse read response object @return read request object<br> <b>null</b> if the read request is invalid
[ "check", "a", "read", "request", "for", "validity", "concerning", "NSSP" ]
26a7bd89d2225fe2172dc958d10f64a1bd9cf52f
https://github.com/renepickhardt/metalcon/blob/26a7bd89d2225fe2172dc958d10f64a1bd9cf52f/graphityServer/src/main/java/de/metalcon/server/tomcat/NSSP/read/ReadRequest.java#L100-L119
39,850
renepickhardt/metalcon
graphityServer/src/main/java/de/metalcon/server/tomcat/NSSP/read/ReadRequest.java
ReadRequest.checkPosterIdentifier
private static Node checkPosterIdentifier(final HttpServletRequest request, final ReadResponse response) { final String posterId = request .getParameter(ProtocolConstants.Parameters.Read.POSTER_IDENTIFIER); if (posterId != null) { final Node user = NeoUtils.getUserByIdentifier(posterId); if (user != nu...
java
private static Node checkPosterIdentifier(final HttpServletRequest request, final ReadResponse response) { final String posterId = request .getParameter(ProtocolConstants.Parameters.Read.POSTER_IDENTIFIER); if (posterId != null) { final Node user = NeoUtils.getUserByIdentifier(posterId); if (user != nu...
[ "private", "static", "Node", "checkPosterIdentifier", "(", "final", "HttpServletRequest", "request", ",", "final", "ReadResponse", "response", ")", "{", "final", "String", "posterId", "=", "request", ".", "getParameter", "(", "ProtocolConstants", ".", "Parameters", ...
check if the request contains a valid poster identifier @param request Tomcat servlet request @param response response object @return user node with the identifier passed<br> <b>null</b> if the identifier is invalid
[ "check", "if", "the", "request", "contains", "a", "valid", "poster", "identifier" ]
26a7bd89d2225fe2172dc958d10f64a1bd9cf52f
https://github.com/renepickhardt/metalcon/blob/26a7bd89d2225fe2172dc958d10f64a1bd9cf52f/graphityServer/src/main/java/de/metalcon/server/tomcat/NSSP/read/ReadRequest.java#L158-L173
39,851
renepickhardt/metalcon
graphityServer/src/main/java/de/metalcon/server/tomcat/NSSP/read/ReadRequest.java
ReadRequest.checkNumItems
private static int checkNumItems(final HttpServletRequest request, final ReadResponse response) { final String sNumItems = request .getParameter(ProtocolConstants.Parameters.Read.NUM_ITEMS); if (sNumItems != null) { int numItems; try { numItems = Integer.valueOf(sNumItems); if (numItems > 0) { ...
java
private static int checkNumItems(final HttpServletRequest request, final ReadResponse response) { final String sNumItems = request .getParameter(ProtocolConstants.Parameters.Read.NUM_ITEMS); if (sNumItems != null) { int numItems; try { numItems = Integer.valueOf(sNumItems); if (numItems > 0) { ...
[ "private", "static", "int", "checkNumItems", "(", "final", "HttpServletRequest", "request", ",", "final", "ReadResponse", "response", ")", "{", "final", "String", "sNumItems", "=", "request", ".", "getParameter", "(", "ProtocolConstants", ".", "Parameters", ".", "...
check if the request contains a valid number of items to retrieve @param request Tomcat servlet request @param response response object @return number of items to retrieve<br> zero if the number is invalid
[ "check", "if", "the", "request", "contains", "a", "valid", "number", "of", "items", "to", "retrieve" ]
26a7bd89d2225fe2172dc958d10f64a1bd9cf52f
https://github.com/renepickhardt/metalcon/blob/26a7bd89d2225fe2172dc958d10f64a1bd9cf52f/graphityServer/src/main/java/de/metalcon/server/tomcat/NSSP/read/ReadRequest.java#L185-L208
39,852
renepickhardt/metalcon
graphityServer/src/main/java/de/metalcon/server/tomcat/NSSP/read/ReadRequest.java
ReadRequest.checkOwnUpdates
private static Boolean checkOwnUpdates(final HttpServletRequest request, final ReadResponse response) { final String sOwnUpdates = request .getParameter(ProtocolConstants.Parameters.Read.OWN_UPDATES); if (sOwnUpdates != null) { try { final int iOwnUpdates = Integer.valueOf(sOwnUpdates); return (iO...
java
private static Boolean checkOwnUpdates(final HttpServletRequest request, final ReadResponse response) { final String sOwnUpdates = request .getParameter(ProtocolConstants.Parameters.Read.OWN_UPDATES); if (sOwnUpdates != null) { try { final int iOwnUpdates = Integer.valueOf(sOwnUpdates); return (iO...
[ "private", "static", "Boolean", "checkOwnUpdates", "(", "final", "HttpServletRequest", "request", ",", "final", "ReadResponse", "response", ")", "{", "final", "String", "sOwnUpdates", "=", "request", ".", "getParameter", "(", "ProtocolConstants", ".", "Parameters", ...
check if the request contains a valid retrieval flag @param request Tomcat servlet request @param response response object @return retrieval flag<br> <b>null</b> if the retrieval flag is invalid
[ "check", "if", "the", "request", "contains", "a", "valid", "retrieval", "flag" ]
26a7bd89d2225fe2172dc958d10f64a1bd9cf52f
https://github.com/renepickhardt/metalcon/blob/26a7bd89d2225fe2172dc958d10f64a1bd9cf52f/graphityServer/src/main/java/de/metalcon/server/tomcat/NSSP/read/ReadRequest.java#L220-L236
39,853
atomix/catalyst
netty/src/main/java/io/atomix/catalyst/transport/netty/NettyTls.java
NettyTls.initSslEngine
public SSLEngine initSslEngine(boolean client) throws Exception { // Load the keystore KeyStore keyStore = loadKeystore(properties.sslKeyStorePath(), properties.sslKeyStorePassword()); // Setup the keyManager to use our keystore KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(KeyMan...
java
public SSLEngine initSslEngine(boolean client) throws Exception { // Load the keystore KeyStore keyStore = loadKeystore(properties.sslKeyStorePath(), properties.sslKeyStorePassword()); // Setup the keyManager to use our keystore KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(KeyMan...
[ "public", "SSLEngine", "initSslEngine", "(", "boolean", "client", ")", "throws", "Exception", "{", "// Load the keystore", "KeyStore", "keyStore", "=", "loadKeystore", "(", "properties", ".", "sslKeyStorePath", "(", ")", ",", "properties", ".", "sslKeyStorePassword", ...
Initializes an SSL engine. @param client Indicates whether the engine is being initialized for a client. @return The initialized SSL engine.
[ "Initializes", "an", "SSL", "engine", "." ]
140e762cb975cd8ee1fd85119043c5b8bf917c5c
https://github.com/atomix/catalyst/blob/140e762cb975cd8ee1fd85119043c5b8bf917c5c/netty/src/main/java/io/atomix/catalyst/transport/netty/NettyTls.java#L46-L82
39,854
renepickhardt/metalcon
graphityServer/src/main/java/de/metalcon/server/Configs.java
Configs.initialize
private void initialize() throws IllegalArgumentException, IllegalAccessException { Field[] fields = this.getClass().getFields(); for (Field f : fields) { if (this.getProperty(f.getName()) == null) { System.err.print("Property '" + f.getName() + "' not defined in config file"); } if (f.getType...
java
private void initialize() throws IllegalArgumentException, IllegalAccessException { Field[] fields = this.getClass().getFields(); for (Field f : fields) { if (this.getProperty(f.getName()) == null) { System.err.print("Property '" + f.getName() + "' not defined in config file"); } if (f.getType...
[ "private", "void", "initialize", "(", ")", "throws", "IllegalArgumentException", ",", "IllegalAccessException", "{", "Field", "[", "]", "fields", "=", "this", ".", "getClass", "(", ")", ".", "getFields", "(", ")", ";", "for", "(", "Field", "f", ":", "field...
Fills all fields with the data defined in the config file. @throws IllegalArgumentException @throws IllegalAccessException
[ "Fills", "all", "fields", "with", "the", "data", "defined", "in", "the", "config", "file", "." ]
26a7bd89d2225fe2172dc958d10f64a1bd9cf52f
https://github.com/renepickhardt/metalcon/blob/26a7bd89d2225fe2172dc958d10f64a1bd9cf52f/graphityServer/src/main/java/de/metalcon/server/Configs.java#L92-L127
39,855
renepickhardt/metalcon
autocompleteServer/src/main/java/de/metalcon/autocompleteServer/Helper/SuggestTree.java
SuggestTree.weightOf
public int weightOf(String suggestion) { Node n = getNode(suggestion); return (n != null) ? n.weight : -1; }
java
public int weightOf(String suggestion) { Node n = getNode(suggestion); return (n != null) ? n.weight : -1; }
[ "public", "int", "weightOf", "(", "String", "suggestion", ")", "{", "Node", "n", "=", "getNode", "(", "suggestion", ")", ";", "return", "(", "n", "!=", "null", ")", "?", "n", ".", "weight", ":", "-", "1", ";", "}" ]
Returns the weight of the specified suggestion in this tree, or -1 if the tree does not contain the suggestion. @throws NullPointerException if the specified suggestion is {@code null}
[ "Returns", "the", "weight", "of", "the", "specified", "suggestion", "in", "this", "tree", "or", "-", "1", "if", "the", "tree", "does", "not", "contain", "the", "suggestion", "." ]
26a7bd89d2225fe2172dc958d10f64a1bd9cf52f
https://github.com/renepickhardt/metalcon/blob/26a7bd89d2225fe2172dc958d10f64a1bd9cf52f/autocompleteServer/src/main/java/de/metalcon/autocompleteServer/Helper/SuggestTree.java#L152-L155
39,856
renepickhardt/metalcon
autocompleteServer/src/main/java/de/metalcon/autocompleteServer/Helper/SuggestTree.java
SuggestTree.put
public void put(String suggestion, int weight, String key) { if(suggestion.isEmpty() || weight < 0) throw new IllegalArgumentException(); if(root == null) { root = new Node(suggestion, weight, key, 0, null); size++; return; } int i = 0; ...
java
public void put(String suggestion, int weight, String key) { if(suggestion.isEmpty() || weight < 0) throw new IllegalArgumentException(); if(root == null) { root = new Node(suggestion, weight, key, 0, null); size++; return; } int i = 0; ...
[ "public", "void", "put", "(", "String", "suggestion", ",", "int", "weight", ",", "String", "key", ")", "{", "if", "(", "suggestion", ".", "isEmpty", "(", ")", "||", "weight", "<", "0", ")", "throw", "new", "IllegalArgumentException", "(", ")", ";", "if...
Inserts the specified suggestion with the specified weight into this tree, or assigns the specified new weight to the suggestion if it is already present. @throws IllegalArgumentException if the specified suggestion is an empty string or the specified weight is negative @throws NullPointerException if the specified sug...
[ "Inserts", "the", "specified", "suggestion", "with", "the", "specified", "weight", "into", "this", "tree", "or", "assigns", "the", "specified", "new", "weight", "to", "the", "suggestion", "if", "it", "is", "already", "present", "." ]
26a7bd89d2225fe2172dc958d10f64a1bd9cf52f
https://github.com/renepickhardt/metalcon/blob/26a7bd89d2225fe2172dc958d10f64a1bd9cf52f/autocompleteServer/src/main/java/de/metalcon/autocompleteServer/Helper/SuggestTree.java#L190-L254
39,857
renepickhardt/metalcon
autocompleteServer/src/main/java/de/metalcon/autocompleteServer/Helper/SuggestTree.java
SuggestTree.remove
public void remove(String suggestion) { Node n = getNode(suggestion); if(n == null) return; n.weight = -1; size--; Node m = n; if(n.mid == null) { Node replacement = removeNode(n); if(replacement != null) replacement.par...
java
public void remove(String suggestion) { Node n = getNode(suggestion); if(n == null) return; n.weight = -1; size--; Node m = n; if(n.mid == null) { Node replacement = removeNode(n); if(replacement != null) replacement.par...
[ "public", "void", "remove", "(", "String", "suggestion", ")", "{", "Node", "n", "=", "getNode", "(", "suggestion", ")", ";", "if", "(", "n", "==", "null", ")", "return", ";", "n", ".", "weight", "=", "-", "1", ";", "size", "--", ";", "Node", "m",...
Removes the specified suggestion from this tree, if present. @throws NullPointerException if the specified suggestion is {@code null}
[ "Removes", "the", "specified", "suggestion", "from", "this", "tree", "if", "present", "." ]
26a7bd89d2225fe2172dc958d10f64a1bd9cf52f
https://github.com/renepickhardt/metalcon/blob/26a7bd89d2225fe2172dc958d10f64a1bd9cf52f/autocompleteServer/src/main/java/de/metalcon/autocompleteServer/Helper/SuggestTree.java#L408-L444
39,858
renepickhardt/metalcon
graphityServer/src/main/java/de/metalcon/socialgraph/algorithms/ReadOptimizedGraphity.java
ReadOptimizedGraphity.updateEgoNetwork
private void updateEgoNetwork(final Node user) { Node followedReplica, followingUser, lastPosterReplica; Node prevReplica, nextReplica; // loop through users following for (Relationship relationship : user.getRelationships( SocialGraphRelationshipType.REPLICA, Direction.INCOMING)) { // load each replica...
java
private void updateEgoNetwork(final Node user) { Node followedReplica, followingUser, lastPosterReplica; Node prevReplica, nextReplica; // loop through users following for (Relationship relationship : user.getRelationships( SocialGraphRelationshipType.REPLICA, Direction.INCOMING)) { // load each replica...
[ "private", "void", "updateEgoNetwork", "(", "final", "Node", "user", ")", "{", "Node", "followedReplica", ",", "followingUser", ",", "lastPosterReplica", ";", "Node", "prevReplica", ",", "nextReplica", ";", "// loop through users following", "for", "(", "Relationship"...
update the ego network of a user @param user user where changes have occurred
[ "update", "the", "ego", "network", "of", "a", "user" ]
26a7bd89d2225fe2172dc958d10f64a1bd9cf52f
https://github.com/renepickhardt/metalcon/blob/26a7bd89d2225fe2172dc958d10f64a1bd9cf52f/graphityServer/src/main/java/de/metalcon/socialgraph/algorithms/ReadOptimizedGraphity.java#L149-L193
39,859
renepickhardt/metalcon
graphityServer/src/main/java/de/metalcon/socialgraph/algorithms/ReadOptimizedGraphity.java
ReadOptimizedGraphity.removeFromReplicaLayer
private void removeFromReplicaLayer(final Node followedReplica) { final Node prev = NeoUtils.getPrevSingleNode(followedReplica, SocialGraphRelationshipType.GRAPHITY); final Node next = NeoUtils.getNextSingleNode(followedReplica, SocialGraphRelationshipType.GRAPHITY); // bridge the user replica in the rep...
java
private void removeFromReplicaLayer(final Node followedReplica) { final Node prev = NeoUtils.getPrevSingleNode(followedReplica, SocialGraphRelationshipType.GRAPHITY); final Node next = NeoUtils.getNextSingleNode(followedReplica, SocialGraphRelationshipType.GRAPHITY); // bridge the user replica in the rep...
[ "private", "void", "removeFromReplicaLayer", "(", "final", "Node", "followedReplica", ")", "{", "final", "Node", "prev", "=", "NeoUtils", ".", "getPrevSingleNode", "(", "followedReplica", ",", "SocialGraphRelationshipType", ".", "GRAPHITY", ")", ";", "final", "Node"...
remove a followed user from the replica layer @param followedReplica replica of the user that will be removed
[ "remove", "a", "followed", "user", "from", "the", "replica", "layer" ]
26a7bd89d2225fe2172dc958d10f64a1bd9cf52f
https://github.com/renepickhardt/metalcon/blob/26a7bd89d2225fe2172dc958d10f64a1bd9cf52f/graphityServer/src/main/java/de/metalcon/socialgraph/algorithms/ReadOptimizedGraphity.java#L276-L302
39,860
renepickhardt/metalcon
graphityServer/src/main/java/de/metalcon/socialgraph/algorithms/ReadOptimizedGraphity.java
ReadOptimizedGraphity.updateReplicaLayerStatusUpdateDeletion
private void updateReplicaLayerStatusUpdateDeletion(final Node user, final Node statusUpdate) { final Node lastUpdate = NeoUtils.getNextSingleNode(user, SocialGraphRelationshipType.UPDATE); // update the ego network if the removal targets the last recent status // update if (statusUpdate.equals(lastUpda...
java
private void updateReplicaLayerStatusUpdateDeletion(final Node user, final Node statusUpdate) { final Node lastUpdate = NeoUtils.getNextSingleNode(user, SocialGraphRelationshipType.UPDATE); // update the ego network if the removal targets the last recent status // update if (statusUpdate.equals(lastUpda...
[ "private", "void", "updateReplicaLayerStatusUpdateDeletion", "(", "final", "Node", "user", ",", "final", "Node", "statusUpdate", ")", "{", "final", "Node", "lastUpdate", "=", "NeoUtils", ".", "getNextSingleNode", "(", "user", ",", "SocialGraphRelationshipType", ".", ...
update the replica layer for status update deletion @param user owner of the status update being deleted @param statusUpdate status update being deleted
[ "update", "the", "replica", "layer", "for", "status", "update", "deletion" ]
26a7bd89d2225fe2172dc958d10f64a1bd9cf52f
https://github.com/renepickhardt/metalcon/blob/26a7bd89d2225fe2172dc958d10f64a1bd9cf52f/graphityServer/src/main/java/de/metalcon/socialgraph/algorithms/ReadOptimizedGraphity.java#L335-L421
39,861
renepickhardt/metalcon
graphityServer/src/main/java/de/metalcon/socialgraph/algorithms/ReadOptimizedGraphity.java
ReadOptimizedGraphity.getLastUpdateByReplica
private static long getLastUpdateByReplica(final Node userReplica) { final Node user = NeoUtils.getNextSingleNode(userReplica, SocialGraphRelationshipType.REPLICA); if (user.hasProperty(Properties.User.LAST_UPDATE)) { return (long) user.getProperty(Properties.User.LAST_UPDATE); } return 0; }
java
private static long getLastUpdateByReplica(final Node userReplica) { final Node user = NeoUtils.getNextSingleNode(userReplica, SocialGraphRelationshipType.REPLICA); if (user.hasProperty(Properties.User.LAST_UPDATE)) { return (long) user.getProperty(Properties.User.LAST_UPDATE); } return 0; }
[ "private", "static", "long", "getLastUpdateByReplica", "(", "final", "Node", "userReplica", ")", "{", "final", "Node", "user", "=", "NeoUtils", ".", "getNextSingleNode", "(", "userReplica", ",", "SocialGraphRelationshipType", ".", "REPLICA", ")", ";", "if", "(", ...
get a user's last recent status update's time stamp @param userReplica replica of the user targeted @return last recent status update's time stamp
[ "get", "a", "user", "s", "last", "recent", "status", "update", "s", "time", "stamp" ]
26a7bd89d2225fe2172dc958d10f64a1bd9cf52f
https://github.com/renepickhardt/metalcon/blob/26a7bd89d2225fe2172dc958d10f64a1bd9cf52f/graphityServer/src/main/java/de/metalcon/socialgraph/algorithms/ReadOptimizedGraphity.java#L467-L474
39,862
renepickhardt/metalcon
graphityServer/src/main/java/de/metalcon/server/tomcat/NSSP/create/follow/CreateFollowRequest.java
CreateFollowRequest.checkRequest
public static CreateFollowRequest checkRequest( final FormItemList formItemList, final CreateRequest createRequest, final CreateFollowResponse createFollowResponse) { final Node user = checkUserIdentifier(formItemList, createFollowResponse); if (user != null) { final Node followed = checkFollowedIdenti...
java
public static CreateFollowRequest checkRequest( final FormItemList formItemList, final CreateRequest createRequest, final CreateFollowResponse createFollowResponse) { final Node user = checkUserIdentifier(formItemList, createFollowResponse); if (user != null) { final Node followed = checkFollowedIdenti...
[ "public", "static", "CreateFollowRequest", "checkRequest", "(", "final", "FormItemList", "formItemList", ",", "final", "CreateRequest", "createRequest", ",", "final", "CreateFollowResponse", "createFollowResponse", ")", "{", "final", "Node", "user", "=", "checkUserIdentif...
check a create follow edge request for validity concerning NSSP @param formItemList form item list extracted @param createRequest basic create request object @param createFollowResponse create follow edge response object @return create follow edge request object<br> <b>null</b> if the create follow edge request is inv...
[ "check", "a", "create", "follow", "edge", "request", "for", "validity", "concerning", "NSSP" ]
26a7bd89d2225fe2172dc958d10f64a1bd9cf52f
https://github.com/renepickhardt/metalcon/blob/26a7bd89d2225fe2172dc958d10f64a1bd9cf52f/graphityServer/src/main/java/de/metalcon/server/tomcat/NSSP/create/follow/CreateFollowRequest.java#L74-L89
39,863
recruit-mp/android-HeaderFooterGridView
library/src/main/java/jp/co/recruit_mp/android/headerfootergridview/HeaderFooterGridView.java
HeaderFooterGridView.removeFooterView
public boolean removeFooterView(View v) { if (mFooterViewInfos.size() > 0) { boolean result = false; ListAdapter adapter = getAdapter(); if (adapter != null && ((HeaderFooterViewGridAdapter) adapter).removeFooter(v)) { result = true; } ...
java
public boolean removeFooterView(View v) { if (mFooterViewInfos.size() > 0) { boolean result = false; ListAdapter adapter = getAdapter(); if (adapter != null && ((HeaderFooterViewGridAdapter) adapter).removeFooter(v)) { result = true; } ...
[ "public", "boolean", "removeFooterView", "(", "View", "v", ")", "{", "if", "(", "mFooterViewInfos", ".", "size", "(", ")", ">", "0", ")", "{", "boolean", "result", "=", "false", ";", "ListAdapter", "adapter", "=", "getAdapter", "(", ")", ";", "if", "("...
Removes a previously-added footer view. @param v The view to remove @return true if the view was removed, false if the view was not a footer view
[ "Removes", "a", "previously", "-", "added", "footer", "view", "." ]
a3deb03fffaa5b7e6723994b8b79b4c8e3e54c34
https://github.com/recruit-mp/android-HeaderFooterGridView/blob/a3deb03fffaa5b7e6723994b8b79b4c8e3e54c34/library/src/main/java/jp/co/recruit_mp/android/headerfootergridview/HeaderFooterGridView.java#L252-L263
39,864
iron-io/iron_mq_java
src/main/java/io/iron/ironmq/Queue.java
Queue.reserve
public Messages reserve(int numberOfMessages, int timeout, int wait) throws IOException { if (numberOfMessages < 1 || numberOfMessages > 100) { throw new IllegalArgumentException("numberOfMessages has to be within 1..100"); } MessagesReservationModel payload = new MessagesReservatio...
java
public Messages reserve(int numberOfMessages, int timeout, int wait) throws IOException { if (numberOfMessages < 1 || numberOfMessages > 100) { throw new IllegalArgumentException("numberOfMessages has to be within 1..100"); } MessagesReservationModel payload = new MessagesReservatio...
[ "public", "Messages", "reserve", "(", "int", "numberOfMessages", ",", "int", "timeout", ",", "int", "wait", ")", "throws", "IOException", "{", "if", "(", "numberOfMessages", "<", "1", "||", "numberOfMessages", ">", "100", ")", "{", "throw", "new", "IllegalAr...
Retrieves Messages from the queue and reserves it. If there are no items on the queue, an EmptyQueueException is thrown. @param numberOfMessages The number of messages to receive. Max. is 100. @param timeout timeout in seconds. @param wait Time to long poll for messages, in seconds. Max is 30 seconds. Default 0. @throw...
[ "Retrieves", "Messages", "from", "the", "queue", "and", "reserves", "it", ".", "If", "there", "are", "no", "items", "on", "the", "queue", "an", "EmptyQueueException", "is", "thrown", "." ]
62d6a86545ca7ef31b7b4797aae0c5b31394a507
https://github.com/iron-io/iron_mq_java/blob/62d6a86545ca7ef31b7b4797aae0c5b31394a507/src/main/java/io/iron/ironmq/Queue.java#L118-L129
39,865
iron-io/iron_mq_java
src/main/java/io/iron/ironmq/Queue.java
Queue.peek
public Message peek() throws IOException { Messages msgs = peek(1); Message msg; try { msg = msgs.getMessage(0); } catch (IndexOutOfBoundsException e) { throw new EmptyQueueException(); } return msg; }
java
public Message peek() throws IOException { Messages msgs = peek(1); Message msg; try { msg = msgs.getMessage(0); } catch (IndexOutOfBoundsException e) { throw new EmptyQueueException(); } return msg; }
[ "public", "Message", "peek", "(", ")", "throws", "IOException", "{", "Messages", "msgs", "=", "peek", "(", "1", ")", ";", "Message", "msg", ";", "try", "{", "msg", "=", "msgs", ".", "getMessage", "(", "0", ")", ";", "}", "catch", "(", "IndexOutOfBoun...
Peeking at a queue returns the next messages on the queue, but it does not reserve them. If there are no items on the queue, an EmptyQueueException is thrown. @throws io.iron.ironmq.EmptyQueueException If the queue is empty. @throws io.iron.ironmq.HTTPException If the IronMQ service returns a status other than 2...
[ "Peeking", "at", "a", "queue", "returns", "the", "next", "messages", "on", "the", "queue", "but", "it", "does", "not", "reserve", "them", ".", "If", "there", "are", "no", "items", "on", "the", "queue", "an", "EmptyQueueException", "is", "thrown", "." ]
62d6a86545ca7ef31b7b4797aae0c5b31394a507
https://github.com/iron-io/iron_mq_java/blob/62d6a86545ca7ef31b7b4797aae0c5b31394a507/src/main/java/io/iron/ironmq/Queue.java#L139-L149
39,866
iron-io/iron_mq_java
src/main/java/io/iron/ironmq/Queue.java
Queue.peek
public Messages peek(int numberOfMessages) throws IOException { if (numberOfMessages < 1 || numberOfMessages > 100) { throw new IllegalArgumentException("numberOfMessages has to be within 1..100"); } IronReader reader = client.get("queues/" + name + "/messages?n=" + numberOfMessages)...
java
public Messages peek(int numberOfMessages) throws IOException { if (numberOfMessages < 1 || numberOfMessages > 100) { throw new IllegalArgumentException("numberOfMessages has to be within 1..100"); } IronReader reader = client.get("queues/" + name + "/messages?n=" + numberOfMessages)...
[ "public", "Messages", "peek", "(", "int", "numberOfMessages", ")", "throws", "IOException", "{", "if", "(", "numberOfMessages", "<", "1", "||", "numberOfMessages", ">", "100", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"numberOfMessages has to be w...
Peeking at a queue returns the next messages on the queue, but it does not reserve them. @param numberOfMessages The maximum number of messages to peek. Default is 1. Maximum is 100. Note: You may not receive all n messages on every request, the more sparse the queue, the less likely you are to receive all n messages....
[ "Peeking", "at", "a", "queue", "returns", "the", "next", "messages", "on", "the", "queue", "but", "it", "does", "not", "reserve", "them", "." ]
62d6a86545ca7ef31b7b4797aae0c5b31394a507
https://github.com/iron-io/iron_mq_java/blob/62d6a86545ca7ef31b7b4797aae0c5b31394a507/src/main/java/io/iron/ironmq/Queue.java#L161-L171
39,867
iron-io/iron_mq_java
src/main/java/io/iron/ironmq/Queue.java
Queue.touchMessage
public MessageOptions touchMessage(String id, String reservationId, int timeout) throws IOException { return touchMessage(id, reservationId, (long) timeout); }
java
public MessageOptions touchMessage(String id, String reservationId, int timeout) throws IOException { return touchMessage(id, reservationId, (long) timeout); }
[ "public", "MessageOptions", "touchMessage", "(", "String", "id", ",", "String", "reservationId", ",", "int", "timeout", ")", "throws", "IOException", "{", "return", "touchMessage", "(", "id", ",", "reservationId", ",", "(", "long", ")", "timeout", ")", ";", ...
Touching a reserved message extends its timeout to the specified duration. @param id The ID of the message to delete. @param reservationId This id is returned when you reserve a message and must be provided to delete a message that is reserved. @param timeout After timeout (in seconds), item will be placed back onto q...
[ "Touching", "a", "reserved", "message", "extends", "its", "timeout", "to", "the", "specified", "duration", "." ]
62d6a86545ca7ef31b7b4797aae0c5b31394a507
https://github.com/iron-io/iron_mq_java/blob/62d6a86545ca7ef31b7b4797aae0c5b31394a507/src/main/java/io/iron/ironmq/Queue.java#L236-L238
39,868
iron-io/iron_mq_java
src/main/java/io/iron/ironmq/Queue.java
Queue.push
public String push(String msg, long delay) throws IOException { Message message = new Message(); message.setBody(msg); message.setDelay(delay); Messages msgs = new Messages(message); IronReader reader = client.post("queues/" + name + "/messages", msgs); Ids ids = gson.f...
java
public String push(String msg, long delay) throws IOException { Message message = new Message(); message.setBody(msg); message.setDelay(delay); Messages msgs = new Messages(message); IronReader reader = client.post("queues/" + name + "/messages", msgs); Ids ids = gson.f...
[ "public", "String", "push", "(", "String", "msg", ",", "long", "delay", ")", "throws", "IOException", "{", "Message", "message", "=", "new", "Message", "(", ")", ";", "message", ".", "setBody", "(", "msg", ")", ";", "message", ".", "setDelay", "(", "de...
Pushes a message onto the queue. @param msg The body of the message to push. @param delay The message's delay in seconds. @return The new message's ID @throws io.iron.ironmq.HTTPException If the IronMQ service returns a status other than 200 OK. @throws java.io.IOException If there is an error accessing the IronMQ se...
[ "Pushes", "a", "message", "onto", "the", "queue", "." ]
62d6a86545ca7ef31b7b4797aae0c5b31394a507
https://github.com/iron-io/iron_mq_java/blob/62d6a86545ca7ef31b7b4797aae0c5b31394a507/src/main/java/io/iron/ironmq/Queue.java#L389-L400
39,869
iron-io/iron_mq_java
src/main/java/io/iron/ironmq/Queue.java
Queue.pushMessages
public Ids pushMessages(String[] msg, long delay) throws IOException { ArrayList<Message> messages = new ArrayList<Message>(); for (String messageName: msg){ Message message = new Message(); message.setBody(messageName); message.setDelay(delay); messages.a...
java
public Ids pushMessages(String[] msg, long delay) throws IOException { ArrayList<Message> messages = new ArrayList<Message>(); for (String messageName: msg){ Message message = new Message(); message.setBody(messageName); message.setDelay(delay); messages.a...
[ "public", "Ids", "pushMessages", "(", "String", "[", "]", "msg", ",", "long", "delay", ")", "throws", "IOException", "{", "ArrayList", "<", "Message", ">", "messages", "=", "new", "ArrayList", "<", "Message", ">", "(", ")", ";", "for", "(", "String", "...
Pushes a messages onto the queue. @param msg The array of the messages to push. @param delay The message's delay in seconds. @return The IDs of new messages @throws io.iron.ironmq.HTTPException If the IronMQ service returns a status other than 200 OK. @throws java.io.IOException If there is an error accessing the Iro...
[ "Pushes", "a", "messages", "onto", "the", "queue", "." ]
62d6a86545ca7ef31b7b4797aae0c5b31394a507
https://github.com/iron-io/iron_mq_java/blob/62d6a86545ca7ef31b7b4797aae0c5b31394a507/src/main/java/io/iron/ironmq/Queue.java#L412-L427
39,870
iron-io/iron_mq_java
src/main/java/io/iron/ironmq/Queue.java
Queue.getInfoAboutQueue
public QueueModel getInfoAboutQueue() throws IOException { IronReader reader = client.get("queues/" + name); QueueContainer queueContainer = gson.fromJson(reader.reader, QueueContainer.class); reader.close(); return queueContainer.getQueue(); }
java
public QueueModel getInfoAboutQueue() throws IOException { IronReader reader = client.get("queues/" + name); QueueContainer queueContainer = gson.fromJson(reader.reader, QueueContainer.class); reader.close(); return queueContainer.getQueue(); }
[ "public", "QueueModel", "getInfoAboutQueue", "(", ")", "throws", "IOException", "{", "IronReader", "reader", "=", "client", ".", "get", "(", "\"queues/\"", "+", "name", ")", ";", "QueueContainer", "queueContainer", "=", "gson", ".", "fromJson", "(", "reader", ...
Retrieves Info about queue. If there is no queue, an EmptyQueueException is thrown. @throws io.iron.ironmq.EmptyQueueException If there is no queue. @throws io.iron.ironmq.HTTPException If the IronMQ service returns a status other than 200 OK. @throws java.io.IOException If there is an error accessing the IronMQ server...
[ "Retrieves", "Info", "about", "queue", ".", "If", "there", "is", "no", "queue", "an", "EmptyQueueException", "is", "thrown", "." ]
62d6a86545ca7ef31b7b4797aae0c5b31394a507
https://github.com/iron-io/iron_mq_java/blob/62d6a86545ca7ef31b7b4797aae0c5b31394a507/src/main/java/io/iron/ironmq/Queue.java#L451-L456
39,871
iron-io/iron_mq_java
src/main/java/io/iron/ironmq/Queue.java
Queue.getMessageById
public Message getMessageById(String id) throws IOException { String url = "queues/" + name + "/messages/" + id; IronReader reader = client.get(url); MessageContainer container = gson.fromJson(reader.reader, MessageContainer.class); reader.close(); return container.getMessage(); ...
java
public Message getMessageById(String id) throws IOException { String url = "queues/" + name + "/messages/" + id; IronReader reader = client.get(url); MessageContainer container = gson.fromJson(reader.reader, MessageContainer.class); reader.close(); return container.getMessage(); ...
[ "public", "Message", "getMessageById", "(", "String", "id", ")", "throws", "IOException", "{", "String", "url", "=", "\"queues/\"", "+", "name", "+", "\"/messages/\"", "+", "id", ";", "IronReader", "reader", "=", "client", ".", "get", "(", "url", ")", ";",...
Retrieves Message from the queue by message id. If there are no items on the queue, an EmptyQueueException is thrown. @param id The ID of the message to get. @throws io.iron.ironmq.HTTPException If the IronMQ service returns a status other than 200 OK. @throws java.io.IOException If there is an error accessing the Iron...
[ "Retrieves", "Message", "from", "the", "queue", "by", "message", "id", ".", "If", "there", "are", "no", "items", "on", "the", "queue", "an", "EmptyQueueException", "is", "thrown", "." ]
62d6a86545ca7ef31b7b4797aae0c5b31394a507
https://github.com/iron-io/iron_mq_java/blob/62d6a86545ca7ef31b7b4797aae0c5b31394a507/src/main/java/io/iron/ironmq/Queue.java#L465-L471
39,872
iron-io/iron_mq_java
src/main/java/io/iron/ironmq/Queue.java
Queue.addSubscribers
public void addSubscribers(Subscribers subscribers) throws IOException { String payload = gson.toJson(subscribers); IronReader reader = client.post("queues/" + name + "/subscribers", payload); reader.close(); }
java
public void addSubscribers(Subscribers subscribers) throws IOException { String payload = gson.toJson(subscribers); IronReader reader = client.post("queues/" + name + "/subscribers", payload); reader.close(); }
[ "public", "void", "addSubscribers", "(", "Subscribers", "subscribers", ")", "throws", "IOException", "{", "String", "payload", "=", "gson", ".", "toJson", "(", "subscribers", ")", ";", "IronReader", "reader", "=", "client", ".", "post", "(", "\"queues/\"", "+"...
Add subscribers to Queue. If there is no queue, an EmptyQueueException is thrown. @param subscribers The array of subscribers. @throws io.iron.ironmq.HTTPException If the IronMQ service returns a status other than 200 OK. @throws java.io.IOException If there is an error accessing the IronMQ server.
[ "Add", "subscribers", "to", "Queue", ".", "If", "there", "is", "no", "queue", "an", "EmptyQueueException", "is", "thrown", "." ]
62d6a86545ca7ef31b7b4797aae0c5b31394a507
https://github.com/iron-io/iron_mq_java/blob/62d6a86545ca7ef31b7b4797aae0c5b31394a507/src/main/java/io/iron/ironmq/Queue.java#L550-L554
39,873
iron-io/iron_mq_java
src/main/java/io/iron/ironmq/Queue.java
Queue.replaceSubscribers
public void replaceSubscribers(Subscribers subscribers) throws IOException { String payload = gson.toJson(subscribers); IronReader reader = client.put("queues/" + name + "/subscribers", payload); reader.close(); }
java
public void replaceSubscribers(Subscribers subscribers) throws IOException { String payload = gson.toJson(subscribers); IronReader reader = client.put("queues/" + name + "/subscribers", payload); reader.close(); }
[ "public", "void", "replaceSubscribers", "(", "Subscribers", "subscribers", ")", "throws", "IOException", "{", "String", "payload", "=", "gson", ".", "toJson", "(", "subscribers", ")", ";", "IronReader", "reader", "=", "client", ".", "put", "(", "\"queues/\"", ...
Sets list of subscribers to a queue. Older subscribers will be removed. If there is no queue, an EmptyQueueException is thrown. @param subscribers The array of subscribers. @throws io.iron.ironmq.HTTPException If the IronMQ service returns a status other than 200 OK. @throws java.io.IOException If there is an error acc...
[ "Sets", "list", "of", "subscribers", "to", "a", "queue", ".", "Older", "subscribers", "will", "be", "removed", ".", "If", "there", "is", "no", "queue", "an", "EmptyQueueException", "is", "thrown", "." ]
62d6a86545ca7ef31b7b4797aae0c5b31394a507
https://github.com/iron-io/iron_mq_java/blob/62d6a86545ca7ef31b7b4797aae0c5b31394a507/src/main/java/io/iron/ironmq/Queue.java#L615-L619
39,874
iron-io/iron_mq_java
src/main/java/io/iron/ironmq/Queue.java
Queue.removeSubscribers
public void removeSubscribers(Subscribers subscribers) throws IOException { String url = "queues/" + name + "/subscribers"; String jsonMessages = gson.toJson(subscribers); IronReader reader = client.delete(url, jsonMessages); reader.close(); }
java
public void removeSubscribers(Subscribers subscribers) throws IOException { String url = "queues/" + name + "/subscribers"; String jsonMessages = gson.toJson(subscribers); IronReader reader = client.delete(url, jsonMessages); reader.close(); }
[ "public", "void", "removeSubscribers", "(", "Subscribers", "subscribers", ")", "throws", "IOException", "{", "String", "url", "=", "\"queues/\"", "+", "name", "+", "\"/subscribers\"", ";", "String", "jsonMessages", "=", "gson", ".", "toJson", "(", "subscribers", ...
Remove subscribers from Queue. If there is no queue, an EmptyQueueException is thrown. @param subscribers The array list of subscribers. @throws io.iron.ironmq.HTTPException If the IronMQ service returns a status other than 200 OK. @throws java.io.IOException If there is an error accessing the IronMQ server.
[ "Remove", "subscribers", "from", "Queue", ".", "If", "there", "is", "no", "queue", "an", "EmptyQueueException", "is", "thrown", "." ]
62d6a86545ca7ef31b7b4797aae0c5b31394a507
https://github.com/iron-io/iron_mq_java/blob/62d6a86545ca7ef31b7b4797aae0c5b31394a507/src/main/java/io/iron/ironmq/Queue.java#L647-L652
39,875
iron-io/iron_mq_java
src/main/java/io/iron/ironmq/Queue.java
Queue.getPushStatusForMessage
public SubscribersInfo getPushStatusForMessage(String messageId) throws IOException { String url = "queues/" + name + "/messages/" + messageId + "/subscribers"; IronReader reader = client.get(url); SubscribersInfo subscribersInfo = gson.fromJson(reader.reader, SubscribersInfo.class); rea...
java
public SubscribersInfo getPushStatusForMessage(String messageId) throws IOException { String url = "queues/" + name + "/messages/" + messageId + "/subscribers"; IronReader reader = client.get(url); SubscribersInfo subscribersInfo = gson.fromJson(reader.reader, SubscribersInfo.class); rea...
[ "public", "SubscribersInfo", "getPushStatusForMessage", "(", "String", "messageId", ")", "throws", "IOException", "{", "String", "url", "=", "\"queues/\"", "+", "name", "+", "\"/messages/\"", "+", "messageId", "+", "\"/subscribers\"", ";", "IronReader", "reader", "=...
Get push info of message by message id. If there is no message, an EmptyQueueException is thrown. @param messageId The Message ID. @throws io.iron.ironmq.HTTPException If the IronMQ service returns a status other than 200 OK. @throws java.io.IOException If there is an error accessing the IronMQ server.
[ "Get", "push", "info", "of", "message", "by", "message", "id", ".", "If", "there", "is", "no", "message", "an", "EmptyQueueException", "is", "thrown", "." ]
62d6a86545ca7ef31b7b4797aae0c5b31394a507
https://github.com/iron-io/iron_mq_java/blob/62d6a86545ca7ef31b7b4797aae0c5b31394a507/src/main/java/io/iron/ironmq/Queue.java#L660-L666
39,876
iron-io/iron_mq_java
src/main/java/io/iron/ironmq/Queue.java
Queue.deletePushMessageForSubscriber
public void deletePushMessageForSubscriber(String messageId, String reservationId, String subscriberName) throws IOException { deleteMessage(messageId, reservationId, subscriberName); }
java
public void deletePushMessageForSubscriber(String messageId, String reservationId, String subscriberName) throws IOException { deleteMessage(messageId, reservationId, subscriberName); }
[ "public", "void", "deletePushMessageForSubscriber", "(", "String", "messageId", ",", "String", "reservationId", ",", "String", "subscriberName", ")", "throws", "IOException", "{", "deleteMessage", "(", "messageId", ",", "reservationId", ",", "subscriberName", ")", ";"...
Delete push message for subscriber by subscriber ID and message ID. If there is no message or subscriber, an EmptyQueueException is thrown. @param subscriberName The name of Subscriber. @param messageId The Message ID. @throws io.iron.ironmq.HTTPException If the IronMQ service returns a status other than 200 OK. @throw...
[ "Delete", "push", "message", "for", "subscriber", "by", "subscriber", "ID", "and", "message", "ID", ".", "If", "there", "is", "no", "message", "or", "subscriber", "an", "EmptyQueueException", "is", "thrown", "." ]
62d6a86545ca7ef31b7b4797aae0c5b31394a507
https://github.com/iron-io/iron_mq_java/blob/62d6a86545ca7ef31b7b4797aae0c5b31394a507/src/main/java/io/iron/ironmq/Queue.java#L676-L678
39,877
iron-io/iron_mq_java
src/main/java/io/iron/ironmq/Queue.java
Queue.updateAlerts
public QueueModel updateAlerts(ArrayList<Alert> alerts) throws IOException { QueueModel payload = new QueueModel(alerts); return this.update(payload); }
java
public QueueModel updateAlerts(ArrayList<Alert> alerts) throws IOException { QueueModel payload = new QueueModel(alerts); return this.update(payload); }
[ "public", "QueueModel", "updateAlerts", "(", "ArrayList", "<", "Alert", ">", "alerts", ")", "throws", "IOException", "{", "QueueModel", "payload", "=", "new", "QueueModel", "(", "alerts", ")", ";", "return", "this", ".", "update", "(", "payload", ")", ";", ...
Replace current queue alerts with a given list of alerts. If there is no queue, an EmptyQueueException is thrown. @param alerts The array list of alerts. @throws io.iron.ironmq.HTTPException If the IronMQ service returns a status other than 200 OK. @throws java.io.IOException If there is an error accessing the IronMQ s...
[ "Replace", "current", "queue", "alerts", "with", "a", "given", "list", "of", "alerts", ".", "If", "there", "is", "no", "queue", "an", "EmptyQueueException", "is", "thrown", "." ]
62d6a86545ca7ef31b7b4797aae0c5b31394a507
https://github.com/iron-io/iron_mq_java/blob/62d6a86545ca7ef31b7b4797aae0c5b31394a507/src/main/java/io/iron/ironmq/Queue.java#L813-L816
39,878
iron-io/iron_mq_java
src/main/java/io/iron/ironmq/Queue.java
Queue.deleteAlertsFromQueue
public void deleteAlertsFromQueue(ArrayList<Alert> alert_ids) throws IOException { String url = "queues/" + name + "/alerts"; Alerts alert = new Alerts(alert_ids); String jsonMessages = gson.toJson(alert); IronReader reader = client.delete(url, jsonMessages); reader.close(); ...
java
public void deleteAlertsFromQueue(ArrayList<Alert> alert_ids) throws IOException { String url = "queues/" + name + "/alerts"; Alerts alert = new Alerts(alert_ids); String jsonMessages = gson.toJson(alert); IronReader reader = client.delete(url, jsonMessages); reader.close(); ...
[ "public", "void", "deleteAlertsFromQueue", "(", "ArrayList", "<", "Alert", ">", "alert_ids", ")", "throws", "IOException", "{", "String", "url", "=", "\"queues/\"", "+", "name", "+", "\"/alerts\"", ";", "Alerts", "alert", "=", "new", "Alerts", "(", "alert_ids"...
Delete alerts from a queue. If there is no queue, an EmptyQueueException is thrown. @param alert_ids The array list of alert ids. @throws io.iron.ironmq.HTTPException If the IronMQ service returns a status other than 200 OK. @throws java.io.IOException If there is an error accessing the IronMQ server.
[ "Delete", "alerts", "from", "a", "queue", ".", "If", "there", "is", "no", "queue", "an", "EmptyQueueException", "is", "thrown", "." ]
62d6a86545ca7ef31b7b4797aae0c5b31394a507
https://github.com/iron-io/iron_mq_java/blob/62d6a86545ca7ef31b7b4797aae0c5b31394a507/src/main/java/io/iron/ironmq/Queue.java#L824-L830
39,879
iron-io/iron_mq_java
src/main/java/io/iron/ironmq/Queue.java
Queue.deleteAlertFromQueueById
public void deleteAlertFromQueueById(String alert_id) throws IOException { String url = "queues/" + name + "/alerts/" + alert_id; IronReader reader = client.delete(url); reader.close(); }
java
public void deleteAlertFromQueueById(String alert_id) throws IOException { String url = "queues/" + name + "/alerts/" + alert_id; IronReader reader = client.delete(url); reader.close(); }
[ "public", "void", "deleteAlertFromQueueById", "(", "String", "alert_id", ")", "throws", "IOException", "{", "String", "url", "=", "\"queues/\"", "+", "name", "+", "\"/alerts/\"", "+", "alert_id", ";", "IronReader", "reader", "=", "client", ".", "delete", "(", ...
Delete alert from a queue by alert id. If there is no queue, an EmptyQueueException is thrown. @param alert_id The alert id. @throws io.iron.ironmq.HTTPException If the IronMQ service returns a status other than 200 OK. @throws java.io.IOException If there is an error accessing the IronMQ server.
[ "Delete", "alert", "from", "a", "queue", "by", "alert", "id", ".", "If", "there", "is", "no", "queue", "an", "EmptyQueueException", "is", "thrown", "." ]
62d6a86545ca7ef31b7b4797aae0c5b31394a507
https://github.com/iron-io/iron_mq_java/blob/62d6a86545ca7ef31b7b4797aae0c5b31394a507/src/main/java/io/iron/ironmq/Queue.java#L838-L842
39,880
iron-io/iron_mq_java
src/main/java/io/iron/ironmq/keystone/Token.java
Token.isExpired
public boolean isExpired(int seconds) { long diff = localIssuedAt.getTime() - issuedAt.getTime(); long localExpiresAtTime = expiresAt.getTime() + diff; return (new Date().getTime() - seconds * 1000) >= localExpiresAtTime; }
java
public boolean isExpired(int seconds) { long diff = localIssuedAt.getTime() - issuedAt.getTime(); long localExpiresAtTime = expiresAt.getTime() + diff; return (new Date().getTime() - seconds * 1000) >= localExpiresAtTime; }
[ "public", "boolean", "isExpired", "(", "int", "seconds", ")", "{", "long", "diff", "=", "localIssuedAt", ".", "getTime", "(", ")", "-", "issuedAt", ".", "getTime", "(", ")", ";", "long", "localExpiresAtTime", "=", "expiresAt", ".", "getTime", "(", ")", "...
Indicated if token will expire after N seconds. @param seconds Number of seconds
[ "Indicated", "if", "token", "will", "expire", "after", "N", "seconds", "." ]
62d6a86545ca7ef31b7b4797aae0c5b31394a507
https://github.com/iron-io/iron_mq_java/blob/62d6a86545ca7ef31b7b4797aae0c5b31394a507/src/main/java/io/iron/ironmq/keystone/Token.java#L62-L66
39,881
goodow/realtime-channel
src/main/java/com/goodow/realtime/channel/impl/ReliableSubscribeBus.java
ReliableSubscribeBus.scheduleAcknowledgment
private void scheduleAcknowledgment(final String topic) { if (!acknowledgeScheduled.has(topic)) { acknowledgeScheduled.set(topic, true); Platform.scheduler().scheduleDelay(acknowledgeDelayMillis, new Handler<Void>() { @Override public void handle(Void event) { if (acknowledgeSc...
java
private void scheduleAcknowledgment(final String topic) { if (!acknowledgeScheduled.has(topic)) { acknowledgeScheduled.set(topic, true); Platform.scheduler().scheduleDelay(acknowledgeDelayMillis, new Handler<Void>() { @Override public void handle(Void event) { if (acknowledgeSc...
[ "private", "void", "scheduleAcknowledgment", "(", "final", "String", "topic", ")", "{", "if", "(", "!", "acknowledgeScheduled", ".", "has", "(", "topic", ")", ")", "{", "acknowledgeScheduled", ".", "set", "(", "topic", ",", "true", ")", ";", "Platform", "....
Acknowledgment Number is the next sequence number that the receiver is expecting
[ "Acknowledgment", "Number", "is", "the", "next", "sequence", "number", "that", "the", "receiver", "is", "expecting" ]
695a5d2035857404d053f7ec698176ff92c8b1e2
https://github.com/goodow/realtime-channel/blob/695a5d2035857404d053f7ec698176ff92c8b1e2/src/main/java/com/goodow/realtime/channel/impl/ReliableSubscribeBus.java#L208-L232
39,882
goodow/realtime-channel
src/main/java/com/goodow/realtime/core/impl/FutureResultImpl.java
FutureResultImpl.setFailure
@Override public FutureResultImpl<T> setFailure(Throwable throwable) { this.throwable = throwable; failed = true; checkCallHandler(); return this; }
java
@Override public FutureResultImpl<T> setFailure(Throwable throwable) { this.throwable = throwable; failed = true; checkCallHandler(); return this; }
[ "@", "Override", "public", "FutureResultImpl", "<", "T", ">", "setFailure", "(", "Throwable", "throwable", ")", "{", "this", ".", "throwable", "=", "throwable", ";", "failed", "=", "true", ";", "checkCallHandler", "(", ")", ";", "return", "this", ";", "}" ...
Set the failure. Any handler will be called, if there is one
[ "Set", "the", "failure", ".", "Any", "handler", "will", "be", "called", "if", "there", "is", "one" ]
695a5d2035857404d053f7ec698176ff92c8b1e2
https://github.com/goodow/realtime-channel/blob/695a5d2035857404d053f7ec698176ff92c8b1e2/src/main/java/com/goodow/realtime/core/impl/FutureResultImpl.java#L90-L96
39,883
goodow/realtime-channel
src/main/java/com/goodow/realtime/core/impl/FutureResultImpl.java
FutureResultImpl.setHandler
@Override public FutureResultImpl<T> setHandler(Handler<AsyncResult<T>> handler) { this.handler = handler; checkCallHandler(); return this; }
java
@Override public FutureResultImpl<T> setHandler(Handler<AsyncResult<T>> handler) { this.handler = handler; checkCallHandler(); return this; }
[ "@", "Override", "public", "FutureResultImpl", "<", "T", ">", "setHandler", "(", "Handler", "<", "AsyncResult", "<", "T", ">", ">", "handler", ")", "{", "this", ".", "handler", "=", "handler", ";", "checkCallHandler", "(", ")", ";", "return", "this", ";"...
Set a handler for the result. It will get called when it's complete
[ "Set", "a", "handler", "for", "the", "result", ".", "It", "will", "get", "called", "when", "it", "s", "complete" ]
695a5d2035857404d053f7ec698176ff92c8b1e2
https://github.com/goodow/realtime-channel/blob/695a5d2035857404d053f7ec698176ff92c8b1e2/src/main/java/com/goodow/realtime/core/impl/FutureResultImpl.java#L101-L106
39,884
goodow/realtime-channel
src/main/java/com/goodow/realtime/core/impl/FutureResultImpl.java
FutureResultImpl.setResult
@Override public FutureResultImpl<T> setResult(T result) { this.result = result; succeeded = true; checkCallHandler(); return this; }
java
@Override public FutureResultImpl<T> setResult(T result) { this.result = result; succeeded = true; checkCallHandler(); return this; }
[ "@", "Override", "public", "FutureResultImpl", "<", "T", ">", "setResult", "(", "T", "result", ")", "{", "this", ".", "result", "=", "result", ";", "succeeded", "=", "true", ";", "checkCallHandler", "(", ")", ";", "return", "this", ";", "}" ]
Set the result. Any handler will be called, if there is one
[ "Set", "the", "result", ".", "Any", "handler", "will", "be", "called", "if", "there", "is", "one" ]
695a5d2035857404d053f7ec698176ff92c8b1e2
https://github.com/goodow/realtime-channel/blob/695a5d2035857404d053f7ec698176ff92c8b1e2/src/main/java/com/goodow/realtime/core/impl/FutureResultImpl.java#L111-L117
39,885
goodow/realtime-channel
src/main/java/com/goodow/realtime/channel/util/FuzzingBackOffGenerator.java
FuzzingBackOffGenerator.next
public BackOffParameters next() { int ret = Math.min(nextBackOffTime, maxBackOff); nextBackOffTime += backOffTime; if (nextBackOffTime <= 0) { nextBackOffTime = Integer.MAX_VALUE; } backOffTime = ret; int randomizeTime = (int) (backOffTime * (1.0 + (Math.random() * randomizationFactor)));...
java
public BackOffParameters next() { int ret = Math.min(nextBackOffTime, maxBackOff); nextBackOffTime += backOffTime; if (nextBackOffTime <= 0) { nextBackOffTime = Integer.MAX_VALUE; } backOffTime = ret; int randomizeTime = (int) (backOffTime * (1.0 + (Math.random() * randomizationFactor)));...
[ "public", "BackOffParameters", "next", "(", ")", "{", "int", "ret", "=", "Math", ".", "min", "(", "nextBackOffTime", ",", "maxBackOff", ")", ";", "nextBackOffTime", "+=", "backOffTime", ";", "if", "(", "nextBackOffTime", "<=", "0", ")", "{", "nextBackOffTime...
Gets the next back off time. Until maxBackOff is reached.
[ "Gets", "the", "next", "back", "off", "time", ".", "Until", "maxBackOff", "is", "reached", "." ]
695a5d2035857404d053f7ec698176ff92c8b1e2
https://github.com/goodow/realtime-channel/blob/695a5d2035857404d053f7ec698176ff92c8b1e2/src/main/java/com/goodow/realtime/channel/util/FuzzingBackOffGenerator.java#L67-L79
39,886
jboss/jboss-jstl-api_spec
src/main/java/javax/servlet/jsp/jstl/core/IteratedExpression.java
IteratedExpression.getItem
public Object getItem(ELContext context, int i) { if (originalListObject == null) { originalListObject = orig.getValue(context); if (originalListObject instanceof Collection) { type = TypesEnum.ACollection; } else if (originalListObject instanceof Iterator) { ...
java
public Object getItem(ELContext context, int i) { if (originalListObject == null) { originalListObject = orig.getValue(context); if (originalListObject instanceof Collection) { type = TypesEnum.ACollection; } else if (originalListObject instanceof Iterator) { ...
[ "public", "Object", "getItem", "(", "ELContext", "context", ",", "int", "i", ")", "{", "if", "(", "originalListObject", "==", "null", ")", "{", "originalListObject", "=", "orig", ".", "getValue", "(", "context", ")", ";", "if", "(", "originalListObject", "...
Iterates the original expression and returns the value at the index. @param context against which the expression should be evaluated @param i the index of the value to return @return the value at the index
[ "Iterates", "the", "original", "expression", "and", "returns", "the", "value", "at", "the", "index", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/javax/servlet/jsp/jstl/core/IteratedExpression.java#L68-L100
39,887
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tag/common/xml/ParseSupport.java
ParseSupport.doEndTag
@Override public int doEndTag() throws JspException { // produce a Document by parsing whatever the attributes tell us to use Object xmlText = this.xml; if (xmlText == null) { // if the attribute was specified, use the body as 'xml' if (bodyContent != null && bodyCont...
java
@Override public int doEndTag() throws JspException { // produce a Document by parsing whatever the attributes tell us to use Object xmlText = this.xml; if (xmlText == null) { // if the attribute was specified, use the body as 'xml' if (bodyContent != null && bodyCont...
[ "@", "Override", "public", "int", "doEndTag", "(", ")", "throws", "JspException", "{", "// produce a Document by parsing whatever the attributes tell us to use", "Object", "xmlText", "=", "this", ".", "xml", ";", "if", "(", "xmlText", "==", "null", ")", "{", "// if ...
parse 'source' or body, storing result in 'var'
[ "parse", "source", "or", "body", "storing", "result", "in", "var" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tag/common/xml/ParseSupport.java#L89-L126
39,888
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tag/common/xml/ParseSupport.java
ParseSupport.parseInputSourceWithFilter
private Document parseInputSourceWithFilter(InputSource s, XMLFilter f) throws JspException { try { XMLReader xr = XmlUtil.newXMLReader(entityResolver); // (note that we overwrite the filter's parent. this seems // to be expected usage. we could cache and reset the old...
java
private Document parseInputSourceWithFilter(InputSource s, XMLFilter f) throws JspException { try { XMLReader xr = XmlUtil.newXMLReader(entityResolver); // (note that we overwrite the filter's parent. this seems // to be expected usage. we could cache and reset the old...
[ "private", "Document", "parseInputSourceWithFilter", "(", "InputSource", "s", ",", "XMLFilter", "f", ")", "throws", "JspException", "{", "try", "{", "XMLReader", "xr", "=", "XmlUtil", ".", "newXMLReader", "(", "entityResolver", ")", ";", "// (note that we overwrit...
Parses the given InputSource after, applying the given XMLFilter.
[ "Parses", "the", "given", "InputSource", "after", "applying", "the", "given", "XMLFilter", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tag/common/xml/ParseSupport.java#L142-L167
39,889
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tag/common/xml/ParseSupport.java
ParseSupport.parseInputSource
private Document parseInputSource(InputSource s) throws JspException { try { DocumentBuilder db = XmlUtil.newDocumentBuilder(); db.setEntityResolver(entityResolver); return db.parse(s); } catch (SAXException e) { throw new JspException(e); } catch ...
java
private Document parseInputSource(InputSource s) throws JspException { try { DocumentBuilder db = XmlUtil.newDocumentBuilder(); db.setEntityResolver(entityResolver); return db.parse(s); } catch (SAXException e) { throw new JspException(e); } catch ...
[ "private", "Document", "parseInputSource", "(", "InputSource", "s", ")", "throws", "JspException", "{", "try", "{", "DocumentBuilder", "db", "=", "XmlUtil", ".", "newDocumentBuilder", "(", ")", ";", "db", ".", "setEntityResolver", "(", "entityResolver", ")", ";"...
Parses the given InputSource into a Document.
[ "Parses", "the", "given", "InputSource", "into", "a", "Document", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tag/common/xml/ParseSupport.java#L172-L182
39,890
jboss/jboss-jstl-api_spec
src/main/java/javax/servlet/jsp/jstl/core/ConditionalTagSupport.java
ConditionalTagSupport.setScope
public void setScope(String scope) { if (scope.equalsIgnoreCase("page")) { this.scope = PageContext.PAGE_SCOPE; } else if (scope.equalsIgnoreCase("request")) { this.scope = PageContext.REQUEST_SCOPE; } else if (scope.equalsIgnoreCase("session")) { this.scope =...
java
public void setScope(String scope) { if (scope.equalsIgnoreCase("page")) { this.scope = PageContext.PAGE_SCOPE; } else if (scope.equalsIgnoreCase("request")) { this.scope = PageContext.REQUEST_SCOPE; } else if (scope.equalsIgnoreCase("session")) { this.scope =...
[ "public", "void", "setScope", "(", "String", "scope", ")", "{", "if", "(", "scope", ".", "equalsIgnoreCase", "(", "\"page\"", ")", ")", "{", "this", ".", "scope", "=", "PageContext", ".", "PAGE_SCOPE", ";", "}", "else", "if", "(", "scope", ".", "equals...
Sets the 'scope' attribute. @param scope Scope of the 'var' attribute
[ "Sets", "the", "scope", "attribute", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/javax/servlet/jsp/jstl/core/ConditionalTagSupport.java#L130-L141
39,891
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tag/common/core/Util.java
Util.getContentTypeAttribute
public static String getContentTypeAttribute(String input, String name) { int begin; int end; int index = input.toUpperCase().indexOf(name.toUpperCase()); if (index == -1) { return null; } index = index + name.length(); // positioned after the attribute name ...
java
public static String getContentTypeAttribute(String input, String name) { int begin; int end; int index = input.toUpperCase().indexOf(name.toUpperCase()); if (index == -1) { return null; } index = index + name.length(); // positioned after the attribute name ...
[ "public", "static", "String", "getContentTypeAttribute", "(", "String", "input", ",", "String", "name", ")", "{", "int", "begin", ";", "int", "end", ";", "int", "index", "=", "input", ".", "toUpperCase", "(", ")", ".", "indexOf", "(", "name", ".", "toUpp...
Get the value associated with a content-type attribute. Syntax defined in RFC 2045, section 5.1.
[ "Get", "the", "value", "associated", "with", "a", "content", "-", "type", "attribute", ".", "Syntax", "defined", "in", "RFC", "2045", "section", "5", ".", "1", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tag/common/core/Util.java#L112-L145
39,892
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/EnumeratedMap.java
EnumeratedMap.getAsMap
public Map getAsMap() { if (mMap != null) { return mMap; } else { Map m = convertToMap(); if (!isMutable()) { mMap = m; } return m; } }
java
public Map getAsMap() { if (mMap != null) { return mMap; } else { Map m = convertToMap(); if (!isMutable()) { mMap = m; } return m; } }
[ "public", "Map", "getAsMap", "(", ")", "{", "if", "(", "mMap", "!=", "null", ")", "{", "return", "mMap", ";", "}", "else", "{", "Map", "m", "=", "convertToMap", "(", ")", ";", "if", "(", "!", "isMutable", "(", ")", ")", "{", "mMap", "=", "m", ...
Converts the MapSource to a Map. If the map is not mutable, this is cached
[ "Converts", "the", "MapSource", "to", "a", "Map", ".", "If", "the", "map", "is", "not", "mutable", "this", "is", "cached" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/EnumeratedMap.java#L147-L157
39,893
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/lang/jstl/EnumeratedMap.java
EnumeratedMap.convertToMap
Map convertToMap() { Map ret = new HashMap(); for (Enumeration e = enumerateKeys(); e.hasMoreElements();) { Object key = e.nextElement(); Object value = getValue(key); ret.put(key, value); } return ret; }
java
Map convertToMap() { Map ret = new HashMap(); for (Enumeration e = enumerateKeys(); e.hasMoreElements();) { Object key = e.nextElement(); Object value = getValue(key); ret.put(key, value); } return ret; }
[ "Map", "convertToMap", "(", ")", "{", "Map", "ret", "=", "new", "HashMap", "(", ")", ";", "for", "(", "Enumeration", "e", "=", "enumerateKeys", "(", ")", ";", "e", ".", "hasMoreElements", "(", ")", ";", ")", "{", "Object", "key", "=", "e", ".", "...
Converts to a Map
[ "Converts", "to", "a", "Map" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/lang/jstl/EnumeratedMap.java#L164-L172
39,894
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tag/common/core/ParamSupport.java
ParamSupport.doEndTag
@Override public int doEndTag() throws JspException { Tag t = findAncestorWithClass(this, ParamParent.class); if (t == null) { throw new JspTagException( Resources.getMessage("PARAM_OUTSIDE_PARENT")); } // take no action for null or empty names ...
java
@Override public int doEndTag() throws JspException { Tag t = findAncestorWithClass(this, ParamParent.class); if (t == null) { throw new JspTagException( Resources.getMessage("PARAM_OUTSIDE_PARENT")); } // take no action for null or empty names ...
[ "@", "Override", "public", "int", "doEndTag", "(", ")", "throws", "JspException", "{", "Tag", "t", "=", "findAncestorWithClass", "(", "this", ",", "ParamParent", ".", "class", ")", ";", "if", "(", "t", "==", "null", ")", "{", "throw", "new", "JspTagExcep...
simply send our name and value to our appropriate ancestor
[ "simply", "send", "our", "name", "and", "value", "to", "our", "appropriate", "ancestor" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tag/common/core/ParamSupport.java#L73-L107
39,895
E7du/jfinal-ext3
src/main/java/com/jfinal/ext/kit/ArrayKit.java
ArrayKit.union
public static String[] union(String[] arr1, String[] arr2) { Set<String> set = new HashSet<String>(); for (String str : arr1) { set.add(str); } for (String str : arr2) { set.add(str); } String[] result = {}; return set.toArray(result); }
java
public static String[] union(String[] arr1, String[] arr2) { Set<String> set = new HashSet<String>(); for (String str : arr1) { set.add(str); } for (String str : arr2) { set.add(str); } String[] result = {}; return set.toArray(result); }
[ "public", "static", "String", "[", "]", "union", "(", "String", "[", "]", "arr1", ",", "String", "[", "]", "arr2", ")", "{", "Set", "<", "String", ">", "set", "=", "new", "HashSet", "<", "String", ">", "(", ")", ";", "for", "(", "String", "str", ...
Arr1 union Arr2 @param arr1 @param arr2
[ "Arr1", "union", "Arr2" ]
8ffcbd150fd50c72852bb778bd427b5eb19254dc
https://github.com/E7du/jfinal-ext3/blob/8ffcbd150fd50c72852bb778bd427b5eb19254dc/src/main/java/com/jfinal/ext/kit/ArrayKit.java#L32-L42
39,896
E7du/jfinal-ext3
src/main/java/com/jfinal/ext/kit/ArrayKit.java
ArrayKit.intersect
public static String[] intersect(String[] arr1, String[] arr2) { Map<String, Boolean> map = new HashMap<String, Boolean>(); LinkedList<String> list = new LinkedList<String>(); for (String str : arr1) { if (!map.containsKey(str)) { map.put(str, Boolean.FALSE); } } for (String str : arr2) { if (map...
java
public static String[] intersect(String[] arr1, String[] arr2) { Map<String, Boolean> map = new HashMap<String, Boolean>(); LinkedList<String> list = new LinkedList<String>(); for (String str : arr1) { if (!map.containsKey(str)) { map.put(str, Boolean.FALSE); } } for (String str : arr2) { if (map...
[ "public", "static", "String", "[", "]", "intersect", "(", "String", "[", "]", "arr1", ",", "String", "[", "]", "arr2", ")", "{", "Map", "<", "String", ",", "Boolean", ">", "map", "=", "new", "HashMap", "<", "String", ",", "Boolean", ">", "(", ")", ...
Arr1 intersect Arr2 @param arr1 @param arr2
[ "Arr1", "intersect", "Arr2" ]
8ffcbd150fd50c72852bb778bd427b5eb19254dc
https://github.com/E7du/jfinal-ext3/blob/8ffcbd150fd50c72852bb778bd427b5eb19254dc/src/main/java/com/jfinal/ext/kit/ArrayKit.java#L49-L71
39,897
E7du/jfinal-ext3
src/main/java/com/jfinal/ext/kit/ArrayKit.java
ArrayKit.minus
public static String[] minus(String[] arr1, String[] arr2) { LinkedList<String> list = new LinkedList<String>(); LinkedList<String> history = new LinkedList<String>(); String[] longerArr = arr1; String[] shorterArr = arr2; if (arr1.length > arr2.length) { longerArr = arr2; shorterArr = arr1; } for (...
java
public static String[] minus(String[] arr1, String[] arr2) { LinkedList<String> list = new LinkedList<String>(); LinkedList<String> history = new LinkedList<String>(); String[] longerArr = arr1; String[] shorterArr = arr2; if (arr1.length > arr2.length) { longerArr = arr2; shorterArr = arr1; } for (...
[ "public", "static", "String", "[", "]", "minus", "(", "String", "[", "]", "arr1", ",", "String", "[", "]", "arr2", ")", "{", "LinkedList", "<", "String", ">", "list", "=", "new", "LinkedList", "<", "String", ">", "(", ")", ";", "LinkedList", "<", "...
Arr1 minus Arr2 @param arr1 @param arr2
[ "Arr1", "minus", "Arr2" ]
8ffcbd150fd50c72852bb778bd427b5eb19254dc
https://github.com/E7du/jfinal-ext3/blob/8ffcbd150fd50c72852bb778bd427b5eb19254dc/src/main/java/com/jfinal/ext/kit/ArrayKit.java#L78-L105
39,898
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tag/common/sql/TransactionTagSupport.java
TransactionTagSupport.doEndTag
@Override public int doEndTag() throws JspException { try { conn.commit(); } catch (SQLException e) { throw new JspTagException( Resources.getMessage("TRANSACTION_COMMIT_ERROR", e.toString()), e); } return EVAL_P...
java
@Override public int doEndTag() throws JspException { try { conn.commit(); } catch (SQLException e) { throw new JspTagException( Resources.getMessage("TRANSACTION_COMMIT_ERROR", e.toString()), e); } return EVAL_P...
[ "@", "Override", "public", "int", "doEndTag", "(", ")", "throws", "JspException", "{", "try", "{", "conn", ".", "commit", "(", ")", ";", "}", "catch", "(", "SQLException", "e", ")", "{", "throw", "new", "JspTagException", "(", "Resources", ".", "getMessa...
Commits the transaction.
[ "Commits", "the", "transaction", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tag/common/sql/TransactionTagSupport.java#L124-L134
39,899
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tag/common/sql/TransactionTagSupport.java
TransactionTagSupport.doCatch
public void doCatch(Throwable t) throws Throwable { if (conn != null) { try { conn.rollback(); } catch (SQLException e) { // Ignore to not hide orignal exception } } throw t; }
java
public void doCatch(Throwable t) throws Throwable { if (conn != null) { try { conn.rollback(); } catch (SQLException e) { // Ignore to not hide orignal exception } } throw t; }
[ "public", "void", "doCatch", "(", "Throwable", "t", ")", "throws", "Throwable", "{", "if", "(", "conn", "!=", "null", ")", "{", "try", "{", "conn", ".", "rollback", "(", ")", ";", "}", "catch", "(", "SQLException", "e", ")", "{", "// Ignore to not hide...
Rollbacks the transaction and rethrows the Throwable.
[ "Rollbacks", "the", "transaction", "and", "rethrows", "the", "Throwable", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tag/common/sql/TransactionTagSupport.java#L139-L148