com.openexchange.admin.rmi.dataobjects
Class SchemaSelectStrategy

java.lang.Object
  extended by com.openexchange.admin.rmi.dataobjects.SchemaSelectStrategy
All Implemented Interfaces:
java.io.Serializable

public class SchemaSelectStrategy
extends java.lang.Object
implements java.io.Serializable

Defines a strategy where to create contexts. The default strategy should be automatic where the server decides on the current schema load, which willl be determined on every call. In memory just loads the schema load once and handles/updates the information in memory. This might be more error-prone, but is also more efficient. If a schema is provided, the context will be created in this schema regardless of it's load. Only one strategy can be configured. Setting one strategy automaticalle disables the other strategies.

Since:
v7.8.0
Author:
Martin Herfurth
See Also:
Serialized Form

Nested Class Summary
static class SchemaSelectStrategy.Strategy
          The strategy enumeration
 
Method Summary
static SchemaSelectStrategy automatic()
          Creates a schema strategy for auto-determining schema name
static SchemaSelectStrategy getDefault()
          Creates the default strategy
 java.lang.String getSchema()
          Returns the configured schema.
 SchemaSelectStrategy.Strategy getStrategy()
          Returns the strategy.
static SchemaSelectStrategy inMemory()
          Creates a schema strategy for fetching the schema name from in-memory cache.
static SchemaSelectStrategy schema(java.lang.String schemaName)
          Creates a schema strategy for a pre-defined schema name
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

automatic

public static SchemaSelectStrategy automatic()
Creates a schema strategy for auto-determining schema name

Returns:
The appropriate schema strategy

inMemory

public static SchemaSelectStrategy inMemory()
Creates a schema strategy for fetching the schema name from in-memory cache.

Returns:
The appropriate schema strategy

schema

public static SchemaSelectStrategy schema(java.lang.String schemaName)
Creates a schema strategy for a pre-defined schema name

Parameters:
schemaName - The schema name
Returns:
The appropriate schema strategy

getDefault

public static SchemaSelectStrategy getDefault()
Creates the default strategy

Returns:
The defualt strategy

getSchema

public java.lang.String getSchema()
Returns the configured schema.

Returns:
The schema

getStrategy

public SchemaSelectStrategy.Strategy getStrategy()
Returns the strategy.

Returns:
The strategy