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

## kodo.event
Class TCPRemoteCommitProvider

    java.lang.Object
      |
      +--kodo.event.AbstractRemoteCommitProvider
            |
            +--kodo.event.TCPRemoteCommitProvider

All Implemented Interfaces:
  com.solarmetric.util.Closeable, Configurable, RemoteCommitProvider

public class TCPRemoteCommitProvider
extends AbstractRemoteCommitProvider
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 kodo.event.AbstractRemoteCommitProvider
`eventManager, log`

Constructor Summary
`TCPRemoteCommitProvider()`

Method Summary
`void` | `broadcast(RemoteCommitEvent event)` Notifies other remote event managers 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.

Methods inherited from class kodo.event.AbstractRemoteCommitProvider
`setConfiguration, setRemoteCommitEventManager, startConfiguration`

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

Methods inherited from interface com.solarmetric.conf.Configurable
`setConfiguration, startConfiguration`

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.

### broadcast

    public void broadcast(RemoteCommitEvent event)

  Description copied from interface: `RemoteCommitProvider`
  Notifies other remote event managers in this JVM and on other machines of changes to the cache. This method must not notify the event manager associated with the persistence manager that originated this commit.

### close

    public void close()

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

### endConfiguration

    public void endConfiguration()

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

### 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 3.1.6 generated on August 25 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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