railo.runtime.type.scope
Class ClusterWrap

java.lang.Object
  extended by railo.runtime.type.util.StructSupport
      extended by railo.runtime.type.StructImpl
          extended by railo.runtime.type.scope.ScopeSupport
              extended by railo.runtime.type.scope.ClusterWrap
All Implemented Interfaces:
Serializable, Cloneable, Map, Dumpable, Castable, Collection, Iteratorable, Scope, Cluster, Sizeable, Struct

public final class ClusterWrap
extends ScopeSupport
implements Cluster, Sizeable

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface railo.runtime.type.Collection
Collection.Key
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class railo.runtime.type.scope.ScopeSupport
APPLICATION, CGI, CLIENT, CLUSTER, COOKIE, FORM, REQUEST, SCOPE_COUNT, SCOPE_VAR, SESSION, URL
 
Fields inherited from class railo.runtime.type.StructImpl
TYPE_SOFT
 
Fields inherited from interface railo.runtime.type.Scope
SCOPE_APPLICATION, SCOPE_ARGUMENTS, SCOPE_CALLER, SCOPE_CGI, SCOPE_CLIENT, SCOPE_CLUSTER, SCOPE_COOKIE, SCOPE_COUNT, SCOPE_FORM, SCOPE_LOCAL, SCOPE_REQUEST, SCOPE_SERVER, SCOPE_SESSION, SCOPE_UNDEFINED, SCOPE_URL, SCOPE_VARIABLES
 
Fields inherited from interface railo.runtime.type.Struct
TYPE_LINKED, TYPE_REGULAR, TYPE_SYNC, TYPE_WEAKED
 
Constructor Summary
ClusterWrap(ConfigServer cs, ClusterRemote core)
           
 
Method Summary
 void broadcast()
          broadcast data on stack
 Collection duplicate(boolean deepCopy)
           
 Object get(Collection.Key key)
          return a value from the collection
 Object get(Collection.Key key, Object defaultValue)
          return a value from the collection, if key doesn't exist, dont throw a exception, reeturns null
 int getType()
           
 String getTypeAsString()
           
 void init(ConfigServer configServer)
           
 Object remove(Collection.Key key)
          removes value from collection and return it when it exists, otherwise throws a exception
 Object remove(String key)
           
 Object removeEL(Collection.Key key)
          removes value from collection and return it when it exists, otherwise returns null
 Object set(Collection.Key key, Object value)
          sets a value to the collection
 Object setEL(Collection.Key key, Object value)
          sets a value to the collection, if key doesn't exist, dont throw a exception, returns null
 void setEntry(ClusterEntry newEntry)
           
 long sizeOf()
          return the size of the object
 DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp)
          method to print out information to a object as HTML
 
Methods inherited from class railo.runtime.type.scope.ScopeSupport
_getId, initialize, isInitalized, release, toDumpData
 
Methods inherited from class railo.runtime.type.StructImpl
clear, containsKey, containsValue, copy, keyIterator, keys, keysAsString, size, valueIterator, values
 
Methods inherited from class railo.runtime.type.util.StructSupport
castToBoolean, castToBooleanValue, castToDateTime, castToDateTime, castToDoubleValue, castToDoubleValue, castToString, castToString, clone, compareTo, compareTo, compareTo, compareTo, containsKey, containsKey, entrySet, equals, get, get, get, invalidKey, isEmpty, iterator, keySet, put, putAll, remove, set, setEL, toString
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface railo.runtime.type.Scope
initialize, isInitalized, release
 
Methods inherited from interface railo.runtime.type.Collection
clear, clone, containsKey, containsKey, get, get, keys, keysAsString, set, setEL, size
 
Methods inherited from interface railo.runtime.type.Iteratorable
iterator, keyIterator, valueIterator
 
Methods inherited from interface railo.runtime.op.Castable
castToBoolean, castToBooleanValue, castToDateTime, castToDateTime, castToDoubleValue, castToDoubleValue, castToString, castToString, compareTo, compareTo, compareTo, compareTo
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

ClusterWrap

public ClusterWrap(ConfigServer cs,
                   ClusterRemote core)
Method Detail

init

public void init(ConfigServer configServer)
Specified by:
init in interface Cluster

remove

public Object remove(String key)
              throws PageException
Overrides:
remove in class StructImpl
Throws:
PageException
See Also:
StructImpl.remove(java.lang.String)

get

public Object get(Collection.Key key)
           throws PageException
Description copied from interface: Collection
return a value from the collection

Specified by:
get in interface Collection
Overrides:
get in class StructImpl
Parameters:
key - key of the value to get must be lower case
Returns:
value on key position
Throws:
PageException
See Also:
StructImpl.get(railo.runtime.type.Collection.Key)

get

public Object get(Collection.Key key,
                  Object defaultValue)
Description copied from interface: Collection
return a value from the collection, if key doesn't exist, dont throw a exception, reeturns null

Specified by:
get in interface Collection
Overrides:
get in class StructImpl
Parameters:
key - key of the value to get
Returns:
value on key position or null
See Also:
StructImpl.get(railo.runtime.type.Collection.Key, java.lang.Object)

remove

public Object remove(Collection.Key key)
              throws PageException
Description copied from interface: Collection
removes value from collection and return it when it exists, otherwise throws a exception

Specified by:
remove in interface Collection
Overrides:
remove in class StructImpl
Parameters:
key - key of the collection
Returns:
removed Object
Throws:
PageException
See Also:
StructImpl.remove(railo.runtime.type.Collection.Key)

removeEL

public Object removeEL(Collection.Key key)
Description copied from interface: Collection
removes value from collection and return it when it exists, otherwise returns null

Specified by:
removeEL in interface Collection
Overrides:
removeEL in class StructImpl
Parameters:
key - key of the collection
Returns:
removed Object
See Also:
Collection.removeEL(railo.runtime.type.Collection.Key)

setEL

public Object setEL(Collection.Key key,
                    Object value)
Description copied from interface: Collection
sets a value to the collection, if key doesn't exist, dont throw a exception, returns null

Specified by:
setEL in interface Collection
Overrides:
setEL in class StructImpl
Parameters:
key - key of the value to get
value - value to set
Returns:
value on key position or null
See Also:
StructImpl.setEL(railo.runtime.type.Collection.Key, java.lang.Object)

setEntry

public void setEntry(ClusterEntry newEntry)
Specified by:
setEntry in interface Cluster

set

public Object set(Collection.Key key,
                  Object value)
           throws PageException
Description copied from interface: Collection
sets a value to the collection

Specified by:
set in interface Collection
Overrides:
set in class StructImpl
Parameters:
key - key of the new value
value - value to set
Returns:
value setted
Throws:
PageException
See Also:
StructImpl.set(railo.runtime.type.Collection.Key, java.lang.Object)

toDumpData

public DumpData toDumpData(PageContext pageContext,
                           int maxlevel,
                           DumpProperties dp)
Description copied from interface: Dumpable
method to print out information to a object as HTML

Specified by:
toDumpData in interface Dumpable
Overrides:
toDumpData in class ScopeSupport
Returns:
HTML print out
See Also:
railo.runtime.type.scope.ScopeSupport#toDumpData(railo.runtime.PageContext, int)

getType

public int getType()
Specified by:
getType in interface Scope
Overrides:
getType in class ScopeSupport
Returns:
return the scope type (SCOPE_SERVER, SCOPE_SESSION usw.)
See Also:
ScopeSupport.getType()

getTypeAsString

public String getTypeAsString()
Specified by:
getTypeAsString in interface Scope
Overrides:
getTypeAsString in class ScopeSupport
Returns:
return the scope type as a String (server,session usw.)
See Also:
ScopeSupport.getTypeAsString()

duplicate

public Collection duplicate(boolean deepCopy)
Specified by:
duplicate in interface Collection
Overrides:
duplicate in class StructImpl
See Also:
StructImpl.duplicate(boolean)

broadcast

public void broadcast()
Description copied from interface: Cluster
broadcast data on stack

Specified by:
broadcast in interface Cluster
See Also:
Cluster.broadcast()

sizeOf

public long sizeOf()
Description copied from interface: Sizeable
return the size of the object

Specified by:
sizeOf in interface Sizeable
Overrides:
sizeOf in class ScopeSupport
Returns:
size of the object
See Also:
Sizeable.sizeOf()


Copyright © 2012 Railo