public class Function extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Function.Builder
Builder class for creating Function instances.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getBucket()
Returns the bucket for this stored JS function.
|
String |
getFunction()
Returns the function for this Erlang function.
|
String |
getKey()
Returns the key for this stored JS function.
|
String |
getModule()
Returns the module for this Erlang function.
|
String |
getName()
Returns the name of this named JS function.
|
String |
getSource()
Returns the source for this anonymous JS function.
|
int |
hashCode() |
boolean |
isAnonymous()
Return whether this is an anonymous JS function or not.
|
boolean |
isJavascript()
Returns whether this function is Javascript or not.
|
boolean |
isNamed()
Return whether this is a named JS function or not.
|
boolean |
isStored()
Return whether this is a JS function stored as an object in Riak.
|
static Function |
newAnonymousJsFunction(String source)
Static factory method for Anonymous JS Functions.
|
static Function |
newErlangFunction(String module,
String function)
Static factory method for Erlang Functions.
|
static Function |
newNamedJsFunction(String name)
Static factory method for Named Javascript Functions.
|
static Function |
newStoredJsFunction(String bucket,
String key)
Static factory method for Stored Javascript Functions.
|
public boolean isJavascript()
public boolean isNamed()
public boolean isStored()
public boolean isAnonymous()
public String getName()
public String getBucket()
public String getKey()
public String getSource()
public String getModule()
public String getFunction()
public static Function newNamedJsFunction(String name)
name
- the name of the Javascript function.public static Function newStoredJsFunction(String bucket, String key)
bucket
- The bucket where the JS function is storedkey
- the key for the object containing the JS functionpublic static Function newAnonymousJsFunction(String source)
source
- the javascript sourcepublic static Function newErlangFunction(String module, String function)
module
- the module that contains the Erlang function.function
- the name of the erlang function.Copyright © 2014. All rights reserved.