Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tangosol.coherence.servlet
Interface HttpSessionCollection.SessionDistributionController

All Known Implementing Classes:
  AbstractHttpSessionCollection.DistributedController, AbstractHttpSessionCollection.HybridController, AbstractHttpSessionCollection.LocalController

Enclosing interface:
  HttpSessionCollection

    public static interface HttpSessionCollection.SessionDistributionController

An optional interface to override the default distribution of session objects in the cluster, allowing the sessions to remain "local" to the originating application until a later point in the life of the session, that point determined by the implementation of this interface.

Further, once a session is distributed, the distribution of its attributes can be controlled in the same manner, specifying that some attributes remain local and others are distributed.

This interface exists primarily to assist in the conversion from non-distributed to distributed systems, particularly when concerns exist about the cost of distribution of all sessions and all attributes.

Since:
  Coherence 2.4

Method Summary
`void` | `init(HttpSessionCollection collection)` Initialize the session distribution controller, so that it has the necessary context with which to make decisions regarding when to distribute sessions and their attributes.
`boolean` | `isSessionAttributeDistributed(HttpSessionModel model, java.lang.String sName)` Determine if the specified attribute of the HttpSession associated with the passed session model should be distributed.
`boolean` | `isSessionDistributed(HttpSessionModel model)` Determine if the HttpSession associated with the passed session model should be distributed.

Method Detail

### init

    void init(HttpSessionCollection collection)

  Initialize the session distribution controller, so that it has the necessary context with which to make decisions regarding when to distribute sessions and their attributes.

  Parameters:
    `collection` - the HttpSessionCollection object for which the distribution controller is working

### isSessionDistributed

    boolean isSessionDistributed(HttpSessionModel model)

  Determine if the HttpSession associated with the passed session model should be distributed. This method will only be called for sessions that are not already distributed.

  Parameters:
    `model` - the model for the HttpSession to evaluate for distribution
  Returns:
    true if the passed session model should be distributed

### isSessionAttributeDistributed

    boolean isSessionAttributeDistributed(HttpSessionModel model,
                                          java.lang.String sName)

  Determine if the specified attribute of the HttpSession associated with the passed session model should be distributed. This method will only be called for sessions that are distributed, and only for attributes that are not already distributed. Further, it may only be called when an attribute is added or when its value is modified. The value itself is not passed for performance reasons; if necessary, the implementation can obtain the value from the model, but it is suggested that the implementation use the name to make the determination if possible, and only failing that obtain and evaluate the attribute value.

  Parameters:
    `model` - the model for the HttpSession being evaluated
    `sName` - the name of the session attribute to evaluate for distribution
  Returns:
    true if the specified attribute for the passed session model should be distributed

Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2010, Oracle. All rights reserved.