com.j_spaces.core.client
Class MetaDataEntry

java.lang.Object
  extended by com.j_spaces.core.client.MetaDataEntry
All Implemented Interfaces:
IMetaDataEntry, Serializable, Entry
Direct Known Subclasses:
Command, DSession, GSMessageImpl

public class MetaDataEntry
extends Object
implements IMetaDataEntry

This class implements entry and provide optimistic locking and UID capabilities.

 For more detailed information about MetaDataEntry class usage see:
 Optimistic locking actions

 IMPORTANT NOTE: In order to serialize meta-info of MetaDataEntry when the extended class 
 is java.io.Externalizable the extended class should invoke explicitly the 
 super methods _writeExternal()/_readExternal() of MetaDataEntry within writeExternal/readExternal of extended class. 
  
 For example:
  
 public class A extends MetaDataEntry
   implements java.io.Externalizable
 {
   public long age;
   
   public void writeExternal(java.io.ObjectOutput out)
                      throws IOException
          {
    super._writeExternal( out );
    
    out.writeLong( age ); 
          } 

          public void readExternal(java.io.ObjectInput in)
                      throws IOException, ClassNotFoundException
   {
    super._readExternal( in );
    
    age = in.readLong();
   }
  } 
 
 

See Also:
Serialized Form

Constructor Summary
MetaDataEntry()
          no args public constructor
 
Method Summary
 EntryInfo __getEntryInfo()
          Returns entry info.
 void __setEntryInfo(EntryInfo entryInfo)
          Set entry info.
 boolean isFifo()
          Returns FIFO status.
 boolean isNOWriteLeaseMode()
          Check write mode.
 boolean isTransient()
          Returns true if entry is transient, otherwise false.
 void makePersistent()
          Makes this entry a persistent entry.
 void makeTransient()
          Makes this entry a transient entry.
 void setFifo(boolean fifo)
          Enable/Disable FIFO mechanism.
 void setNOWriteLeaseMode(boolean noWriteLeaseMode)
          Set true do not return Lease object after write, false return Lease object after write.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetaDataEntry

public MetaDataEntry()
no args public constructor

Method Detail

__setEntryInfo

public void __setEntryInfo(EntryInfo entryInfo)
Set entry info.

Specified by:
__setEntryInfo in interface IMetaDataEntry
Parameters:
entryInfo - Entry Info.

__getEntryInfo

public EntryInfo __getEntryInfo()
Returns entry info.

Specified by:
__getEntryInfo in interface IMetaDataEntry
Returns:
Entry info.

setFifo

public void setFifo(boolean fifo)
Enable/Disable FIFO mechanism.

Specified by:
setFifo in interface IMetaDataEntry
Parameters:
fifo - true enable FIFO, otherwise false.

isFifo

public boolean isFifo()
Returns FIFO status.

Specified by:
isFifo in interface IMetaDataEntry
Returns:
true if FIFO enabled, otherwise false.

makePersistent

public void makePersistent()
Makes this entry a persistent entry. Can be called only if the entry has not been written yet to the space.

Specified by:
makePersistent in interface IMetaDataEntry

makeTransient

public void makeTransient()
Makes this entry a transient entry.

Specified by:
makeTransient in interface IMetaDataEntry

isTransient

public boolean isTransient()
Returns true if entry is transient, otherwise false.

Specified by:
isTransient in interface IMetaDataEntry
Returns:
true if entry is transient, otherwise false.

setNOWriteLeaseMode

public void setNOWriteLeaseMode(boolean noWriteLeaseMode)
Set true do not return Lease object after write, false return Lease object after write.

Specified by:
setNOWriteLeaseMode in interface IMetaDataEntry
Parameters:
noWriteLeaseMode - write mode.

isNOWriteLeaseMode

public boolean isNOWriteLeaseMode()
Check write mode.

Specified by:
isNOWriteLeaseMode in interface IMetaDataEntry
Returns:
true if do not return Lease object after write, otherwise false.