public class BeanPersistIds extends Object implements Serializable
This information is broadcast across the cluster so that remote BeanListeners are notified of the inserts updates and deletes that occured.
You control it the data is broadcast and what data is broadcast by the BeanListener.getClusterData() method. It is guessed that often just the Id property or perhaps a few properties in a Map will be broadcast to reduce the size of data sent around the network.
| Constructor and Description |
|---|
BeanPersistIds(BeanDescriptor<?> desc)
Create the payload.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addId(PersistRequest.Type type,
Serializable id) |
BeanDescriptor<?> |
getBeanDescriptor() |
List<Serializable> |
getDeleteIds() |
String |
getDescriptorId()
Return the Descriptor Id.
|
List<Serializable> |
getInsertIds() |
List<Serializable> |
getUpdateIds() |
void |
notifyCacheAndListener()
Notify the cache and local BeanPersistListener of this event that came
from another server in the cluster.
|
static BeanPersistIds |
readBinaryMessage(SpiEbeanServer server,
DataInput dataInput) |
void |
setBeanDescriptor(BeanDescriptor<?> beanDescriptor) |
String |
toString() |
void |
writeBinaryMessage(BinaryMessageList msgList)
Write the contents into a BinaryMessage form.
|
public BeanPersistIds(BeanDescriptor<?> desc)
public static BeanPersistIds readBinaryMessage(SpiEbeanServer server, DataInput dataInput) throws IOException
IOExceptionpublic void writeBinaryMessage(BinaryMessageList msgList) throws IOException
For a RemoteBeanPersist with a large number of id's note that this is broken up into many BinaryMessages each with a maximum of 100 ids. This enables the contents of a large RemoteTransactionEvent to be split up across multiple Packets.
IOExceptionpublic void addId(PersistRequest.Type type, Serializable id)
public BeanDescriptor<?> getBeanDescriptor()
public String getDescriptorId()
public List<Serializable> getInsertIds()
public List<Serializable> getUpdateIds()
public List<Serializable> getDeleteIds()
public void setBeanDescriptor(BeanDescriptor<?> beanDescriptor)
public void notifyCacheAndListener()
Copyright © 2014. All Rights Reserved.