public class PublishingCacheStore extends Object implements com.tangosol.net.cache.BinaryEntryStore
PublishingCacheStore will distribute all CacheEvents occurring on a
BinaryEntryStore to an EventDistributor
Copyright (c) 2008. All Rights Reserved. Oracle Corporation.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
EventDistributor,
EventDistributorBuilder| Constructor and Description |
|---|
PublishingCacheStore(String cacheName)
Standard Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
distribute(Event event)
Requests an
Event to be distributed via the established EventDistributors. |
protected void |
distribute(List<Event> events)
Requests a collection of
Events to be distributed via the established EventDistributors. |
void |
erase(com.tangosol.util.BinaryEntry entry)
The erase method distributes an
EntryRemovedEvent with the EventDistributor. |
void |
eraseAll(Set setEntries)
The eraseAll method will distribute a collection of erased entries using the
EventDistributor. |
protected long |
getExpiry(com.tangosol.util.BinaryEntry entry)
Obtains the time the specified
BinaryEntry will expire, relative
to the epoc, not a delta time. |
protected boolean |
isDistributable(Event event,
EventDistributor distributor,
EventDistributorTemplate template)
Determine if an
Event should be distributed by an EventDistributor. |
void |
load(com.tangosol.util.BinaryEntry binaryEntry) |
void |
loadAll(Set setBinEntries) |
void |
store(com.tangosol.util.BinaryEntry entry)
The store method requests than an entry be distributed using the configured
EventDistributorBuilder. |
void |
storeAll(Set colEntries)
The storeAll method distributes a batch of events with the
EventDistributor. |
public PublishingCacheStore(String cacheName)
cacheName - The name of the cache from which CacheEvents will be distributed.protected boolean isDistributable(Event event, EventDistributor distributor, EventDistributorTemplate template)
Event should be distributed by an EventDistributor.event - the Eventdistributor - the EventDistributor that would distribute the Eventtemplate - the EventDistributorTemplate for the EventDistributortrue if the Event should be sent to the EventDistributorprotected void distribute(Event event)
Event to be distributed via the established EventDistributors.event - The Event to distribute.protected void distribute(List<Event> events)
Events to be distributed via the established EventDistributors.public void loadAll(Set setBinEntries)
loadAll in interface com.tangosol.net.cache.BinaryEntryStorepublic void store(com.tangosol.util.BinaryEntry entry)
EventDistributorBuilder. The method checks to see that the entry wasn't
marked for removal (removes are not distributed here, they're distributed on erase). It will then
decorates the BinaryEntry with the affilitate associated and requests that
the EventDistributorBuilder distribute the event.store in interface com.tangosol.net.cache.BinaryEntryStoreentry - The BinaryEntry that was storedpublic void erase(com.tangosol.util.BinaryEntry entry)
EntryRemovedEvent with the EventDistributor.erase in interface com.tangosol.net.cache.BinaryEntryStoreentry - The entry that was erasedpublic void storeAll(Set colEntries)
EventDistributor.
The method ensures that each entry wasn't marked for delete (delete events are not distributed here,
they're distributed on erase). It will then decorate the BinaryEntry with the ClusterMetaInfo and
request that the EventDistributor distributed the operation.storeAll in interface com.tangosol.net.cache.BinaryEntryStorecolEntries - the collection of Entries that were storedpublic void eraseAll(Set setEntries)
EventDistributor.eraseAll in interface com.tangosol.net.cache.BinaryEntryStoresetEntries - The entries that were erasedpublic void load(com.tangosol.util.BinaryEntry binaryEntry)
load in interface com.tangosol.net.cache.BinaryEntryStoreprotected long getExpiry(com.tangosol.util.BinaryEntry entry)
BinaryEntry will expire, relative
to the epoc, not a delta time.entry - the BinaryEntryCopyright © 2014. All rights reserved.