|
GigaSpaces XAP 8.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openspaces.remoting.scripting.StaticScript
public class StaticScript
A script that holds the actual script as a String. The name, type, and script must be provided.
| Constructor Summary | |
|---|---|
StaticScript()
Constructs a new static script. |
|
StaticScript(String name,
String type,
String script)
Constructs a new static script. |
|
| Method Summary | ||
|---|---|---|
|
broadcast(RemoteResultReducer<T,Y> reducer)
Broadcast the execution of this script over all active partitions. |
|
StaticScript |
cache(boolean shouldCache)
Should this script be cached or not. |
|
Object[] |
getMetaArguments()
Returns a set of meta arguments that are used for remote invocation. |
|
String |
getName()
Returns the name of the script. |
|
Map<String,Object> |
getParameters()
Returns the set of parameters that will be passes to the script execution. |
|
RemoteResultReducer |
getReducer()
Returns the reducer that will be used in case broadcasting is enabled or not. |
|
Object |
getRouting()
Returns the routing index. |
|
String |
getScriptAsString()
Returns the script as a String. |
|
String |
getType()
Returns the type of a script. |
|
StaticScript |
metaArguments(Object... metaArguments)
Adds another meta argument to the script |
|
StaticScript |
name(String name)
Sets the name of the script. |
|
StaticScript |
parameter(String name,
Object value)
Puts a parameter that can be used during script execution. |
|
void |
readExternal(ObjectInput in)
|
|
StaticScript |
routing(Object routing)
Sets the routing index (which partition it will "hit") for the scirpt. |
|
StaticScript |
script(String script)
Sets the actual script source. |
|
Boolean |
shouldBroadcast()
Return true if broadcast should be enabled or not. |
|
boolean |
shouldCache()
Returns if this script should be cached or not. |
|
String |
toString()
|
|
StaticScript |
type(String type)
Sets the type of the script. |
|
void |
writeExternal(ObjectOutput out)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StaticScript()
public StaticScript(String name,
String type,
String script)
name - The name of the script.type - The type of the script (for example, groovy).script - The actual script as a String.| Method Detail |
|---|
public String getScriptAsString()
getScriptAsString in interface Scriptpublic String getName()
getName in interface Scriptpublic String getType()
groovy.
getType in interface Scriptpublic Map<String,Object> getParameters()
getParameters in interface Scriptpublic boolean shouldCache()
shouldCache in interface Scriptpublic Object getRouting()
getRouting in interface Scriptpublic RemoteResultReducer getReducer()
BroadcastIndicator
getReducer in interface BroadcastIndicatorpublic Boolean shouldBroadcast()
BroadcastIndicatortrue if broadcast should be enabled or not. Return null
if should not affect it in any manner.
- Specified by:
shouldBroadcast in interface BroadcastIndicator
public Object[] getMetaArguments()
Script
getMetaArguments in interface ScriptSpaceRemotingInvocation.getMetaArguments()public StaticScript name(String name)
public StaticScript script(String script)
public StaticScript type(String type)
groovy.
public StaticScript cache(boolean shouldCache)
true.
public StaticScript parameter(String name,
Object value)
name - The name of the parameter.value - The value of the parameter.public StaticScript routing(Object routing)
public StaticScript metaArguments(Object... metaArguments)
Script.getMetaArguments(),
SpaceRemotingInvocation.getMetaArguments(),
ScriptingMetaArgumentsHandlerpublic <T,Y> StaticScript broadcast(RemoteResultReducer<T,Y> reducer)
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizableIOException
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface ExternalizableIOException
ClassNotFoundExceptionpublic String toString()
toString in class Object
|
GigaSpaces XAP 8.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||