Tabnine Logo
DistributableEntry.getContext
Code IndexAdd Tabnine to your IDE (free)

How to use
getContext
method
in
com.oracle.coherence.patterns.eventdistribution.events.DistributableEntry

Best Java code snippets using com.oracle.coherence.patterns.eventdistribution.events.DistributableEntry.getContext (Showing top 5 results out of 315)

origin: com.oracle.coherence.incubator/coherence-eventdistributionpattern

/**
 * Extracts the {@link ClusterMetaInfo} of the {@link Cluster} from where the {@link EntryEvent} originated.
 *
 * @param entryEvent The {@link DistributableEntryEvent} from which to determine the {@link ClusterMetaInfo}.
 *
 * @return {@link ClusterMetaInfo}
 */
@SuppressWarnings({"rawtypes"})
private ClusterMetaInfo getSourceClusterMetaInfo(DistributableEntryEvent entryEvent)
{
  Binary binaryValue = entryEvent.getEntry().getBinaryValue();
  Map decorations = binaryValue == null
           ? null : (Map) entryEvent.getEntry().getContext().getInternalValueDecoration(binaryValue,
                                                  BackingMapManagerContext
                                                    .DECO_CUSTOM);
  if (decorations == null)
  {
    throw new IllegalStateException("Can't extract the CLUSTER_INFO_DECORATION_KEY from the EntryEvent. The BinaryValue is not decorated");
  }
  ClusterMetaInfo sourceClusterMetaInfo =
    (ClusterMetaInfo) decorations.get(DistributableEntry.CLUSTER_META_INFO_DECORATION_KEY);
  if (sourceClusterMetaInfo == null)
  {
    throw new IllegalStateException("Expecting a non-null value for CLUSTER_INFO_DECORATION_KEY");
  }
  return sourceClusterMetaInfo;
}
origin: com.oracle.coherence.incubator/coherence-pushreplicationpattern

? null : (Map) entryEvent.getEntry().getContext().getInternalValueDecoration(binaryValue,
                                       BackingMapManagerContext
                                         .DECO_CUSTOM);
origin: com.oracle.coherence.incubator/coherence-eventdistributionpattern

@Override
public Object getOriginalValue()
{
  Object originalValue;
  if (originalBinaryValue == null || originalBinaryValue.length() == 0)
  {
    originalValue = null;
  }
  else
  {
    try
    {
      if (getContext() == null && getSerializer() != null)
      {
        originalValue = serializer.deserialize(originalBinaryValue.getBufferInput());
      }
      else
      {
        originalValue = getContext().getValueFromInternalConverter().convert(originalBinaryValue);
      }
    }
    catch (Exception e)
    {
      throw Base.ensureRuntimeException(e);
    }
  }
  // TODO: we should hold a weak reference to the result as we might call this method again.
  return originalValue;
}
origin: com.oracle.coherence.incubator/coherence-eventdistributionpattern

@Override
public Object getKey()
{
  Object key;
  if (binaryKey == null || binaryKey.length() == 0)
  {
    key = null;
  }
  else
  {
    try
    {
      if (getContext() == null && getSerializer() != null)
      {
        key = serializer.deserialize(binaryKey.getBufferInput());
      }
      else
      {
        key = getContext().getKeyFromInternalConverter().convert(binaryKey);
      }
    }
    catch (Exception e)
    {
      throw Base.ensureRuntimeException(e);
    }
  }
  // TODO: we should hold a weak reference to the result as we might call this method again.
  return key;
}
origin: com.oracle.coherence.incubator/coherence-eventdistributionpattern

@Override
public Object getValue()
{
  Object value;
  if (binaryValue == null || binaryValue.length() == 0)
  {
    value = null;
  }
  else
  {
    try
    {
      if (getContext() == null && getSerializer() != null)
      {
        value = serializer.deserialize(binaryValue.getBufferInput());
      }
      else
      {
        value = getContext().getValueFromInternalConverter().convert(binaryValue);
      }
    }
    catch (Exception e)
    {
      throw Base.ensureRuntimeException(e);
    }
  }
  // TODO: we should hold a weak reference to the result as we might call this method again.
  return value;
}
com.oracle.coherence.patterns.eventdistribution.eventsDistributableEntrygetContext

Popular methods of DistributableEntry

  • <init>
    Standard Constructor (with a BinaryEntry).
  • getBinaryValue
  • getBinaryKey
  • getExpiry
  • getKey
  • getOriginalBinaryValue
  • getOriginalValue
  • getSerializer
  • getValue
  • setContext
    Sets the BackingMapManagerContext for the Entry.
  • setOriginalBinaryValue
  • setValue
  • setOriginalBinaryValue,
  • setValue

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setRequestProperty (URLConnection)
  • getApplicationContext (Context)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • JList (javax.swing)
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now