Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.5.8 generated on January 11 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.solarmetric.kodo.runtime.event.impl
Class TCPRemoteCommitProvider

    java.lang.Object
      |
      +--com.solarmetric.kodo.runtime.event.impl.RemoteCommitProviderImpl
            |
            +--com.solarmetric.kodo.runtime.event.impl.TCPRemoteCommitProvider

All Implemented Interfaces:
  Configurable, RemoteCommitProvider

public class TCPRemoteCommitProvider
extends RemoteCommitProviderImpl
implements Configurable

TCP-based implementation of `RemoteCommitProvider` that listens for object modifications and propagates those changes to other RemoteCommitProviders over TCP sockets.

Since:
  2.5.0

Inner Class Summary
`protected static class` | `TCPRemoteCommitProvider.HostAddress` Utility class to store an InetAddress and an int.
`protected static class` | `TCPRemoteCommitProvider.TCPPortListener` Responsible for listening for packets and processing the received packets.

Fields inherited from class com.solarmetric.kodo.runtime.event.impl.RemoteCommitProviderImpl
`_factory, _log`

Constructor Summary
`TCPRemoteCommitProvider()`

Method Summary
`void` | `broadcastCommitInfo(Set adds, Set updates, Set deletes)` Notifies other PersistenceManagerFactory objects in this JVM and on other machines of changes to the cache.
`void` | `close()` Close any resources used by this provider
`void` | `endConfiguration()` Subclasses that need to perform actions in `Configurable.endConfiguration()` must invoke this method.
`protected long` | `getID()`
`protected byte[]` | `getLocalhost()`
`protected int` | `getPort()`
`protected void` | `sendUpdatePacket(byte[] bytes)` Sends a change notification packet to other machines in this provider cluster.
`void` | `setAddresses(String names)` Sets the list of addresses to which this provider will broadcast to the values in the comma-separated `names` list.
`void` | `setPort(int port)` Sets the port that this provider should listen on.
`void` | `startConfiguration()` Invoked before configuration is begun on this object

Methods inherited from class com.solarmetric.kodo.runtime.event.impl.RemoteCommitProviderImpl
`receivedCommitInfo, setPersistenceManagerFactory`

Methods inherited from class java.lang.Object
`, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TCPRemoteCommitProvider

    public TCPRemoteCommitProvider()
                            throws UnknownHostException

Method Detail

### getID

    protected long getID()

  Returns:
    a number for this provider that is unique to this JVM.

### getLocalhost

    protected byte[] getLocalhost()

  Returns:
    the cached address of this machine.

### getPort

    protected int getPort()

  Returns:
    the port that this provider will listen on.

### setPort

    public void setPort(int port)

  Sets the port that this provider should listen on.

### setAddresses

    public void setAddresses(String names)
                      throws UnknownHostException

  Sets the list of addresses to which this provider will broadcast to the values in the comma-separated `names` list.

### broadcastCommitInfo

    public void broadcastCommitInfo(Set adds,
                                    Set updates,
                                    Set deletes)

  Description copied from interface: `RemoteCommitProvider`

  Notifies other PersistenceManagerFactory objects in this JVM and on other machines of changes to the cache. This method must not notify the PersistenceManagerFactory associated with the PersistenceManager that originated this commit.

  `adds`, `updates`, and `deletes` are sets of object IDs that were added, updated, or deleted.

### close

    public void close()

  Description copied from interface: `RemoteCommitProvider`
  Close any resources used by this provider

### startConfiguration

    public void startConfiguration()

  Description copied from interface: `Configurable`
  Invoked before configuration is begun on this object
  Specified by:
    `startConfiguration` in interface `Configurable`

### endConfiguration

    public void endConfiguration()

  Subclasses that need to perform actions in `Configurable.endConfiguration()` must invoke this method.
  Specified by:
    `endConfiguration` in interface `Configurable`

### sendUpdatePacket

    protected void sendUpdatePacket(byte[] bytes)

  Sends a change notification packet to other machines in this provider cluster.

Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.5.8 generated on January 11 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.