Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


com.tangosol.net.partition
Class VersionedOwnership

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.util.BitHelper
          extended by com.tangosol.util.ExternalizableHelper
              extended by com.tangosol.net.partition.Ownership
                  extended by com.tangosol.net.partition.VersionedOwnership

All Implemented Interfaces:
ExternalizableLite, PortableObject, java.io.Serializable, java.lang.Cloneable

public class VersionedOwnership
extends Ownership

An extension of the partition Ownership object which also carries a change version. Ownership versions are used to track changes in the ownership rather than the contents of a partition.

Since:
Coherence 12.1.3
Author:
rhl 2013.08.19

Field Summary
protected  int m_nVersion
          The ownership version.

 

Fields inherited from class com.tangosol.net.partition.Ownership
m_aiOwner

 

Constructor Summary
VersionedOwnership()
          Default constructor (needed for serialization).
VersionedOwnership(int cBackups, int nVersion)
          Default constructor (needed for serialization).

 

Method Summary
 java.lang.Object clone()
          Create a clone of this Ownership.
 boolean equals(java.lang.Object o)
          Indicates whether some other object is "equal to" this one.
 java.lang.String getDescription()
          Return a human-readable description of this Ownership.
 int getVersion()
          Return the ownership version.
 void readExternal(java.io.DataInput in)
          Restore the contents of this object by loading the object's state from the passed DataInput object.
 void readExternal(PofReader in)
          Restore the contents of a user type instance by reading its state using the specified PofReader object.
 void setVersion(int nVersion)
          Set the new ownership version.
 void writeExternal(java.io.DataOutput out)
          Save the contents of this object by storing the object's state into the passed DataOutput object.
 void writeExternal(PofWriter out)
          Save the contents of a POF user type instance by writing its state using the specified PofWriter object.

 

Methods inherited from class com.tangosol.net.partition.Ownership
getBackupCount, getOwner, getOwners, getPrimaryOwner, hashCode, setOwner, setOwners, setOwners, setPrimaryOwner, toString

 

Methods inherited from class com.tangosol.util.BitHelper
countBits, countBits, countBits, indexOfLSB, indexOfLSB, indexOfLSB, indexOfMSB, indexOfMSB, indexOfMSB, rotateLeft, rotateLeft, rotateLeft, rotateRight, rotateRight, rotateRight, toBitString, toBitString, toBitString, toBytes, toBytes, toBytes, toBytes, toInt, toInt, toLong, toLong

 

Field Detail

m_nVersion

protected int m_nVersion
The ownership version.

Constructor Detail

VersionedOwnership

public VersionedOwnership()
Default constructor (needed for serialization).

VersionedOwnership

public VersionedOwnership(int cBackups,
                          int nVersion)
Default constructor (needed for serialization).

Method Detail

getVersion

public int getVersion()
Return the ownership version.
Returns:
the ownership version

setVersion

public void setVersion(int nVersion)
Set the new ownership version.
Parameters:
nVersion - the ownership version

getDescription

public java.lang.String getDescription()
Return a human-readable description of this Ownership.
Overrides:
getDescription in class Ownership
Returns:
a human-readable description

clone

public java.lang.Object clone()
Create a clone of this Ownership.
Overrides:
clone in class Ownership
Returns:
a clone of the Ownership object

equals

public boolean equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one.
Overrides:
equals in class Ownership
Parameters:
o - the object to test for equality
Returns:
true if this object is the same as the given one; false otherwise.

readExternal

public void readExternal(java.io.DataInput in)
                  throws java.io.IOException
Restore the contents of this object by loading the object's state from the passed DataInput object.
Specified by:
readExternal in interface ExternalizableLite
Overrides:
readExternal in class Ownership
Parameters:
in - the DataInput stream to read data from in order to restore the state of this object
Throws:
java.io.IOException - if an I/O exception occurs
java.io.NotActiveException - if the object is not in its initial state, and therefore cannot be deserialized into

writeExternal

public void writeExternal(java.io.DataOutput out)
                   throws java.io.IOException
Save the contents of this object by storing the object's state into the passed DataOutput object.
Specified by:
writeExternal in interface ExternalizableLite
Overrides:
writeExternal in class Ownership
Parameters:
out - the DataOutput stream to write the state of this object to
Throws:
java.io.IOException - if an I/O exception occurs

readExternal

public void readExternal(PofReader in)
                  throws java.io.IOException
Restore the contents of a user type instance by reading its state using the specified PofReader object.
Specified by:
readExternal in interface PortableObject
Overrides:
readExternal in class Ownership
Parameters:
in - the PofReader from which to read the object's state
Throws:
java.io.IOException - if an I/O error occurs

writeExternal

public void writeExternal(PofWriter out)
                   throws java.io.IOException
Save the contents of a POF user type instance by writing its state using the specified PofWriter object.
Specified by:
writeExternal in interface PortableObject
Overrides:
writeExternal in class Ownership
Parameters:
out - the PofWriter to which to write the object's state
Throws:
java.io.IOException - if an I/O error occurs

Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.