com.atlassian.confluence.api.model.journal
Class JournalEntry

java.lang.Object
  extended by com.atlassian.confluence.api.model.journal.JournalEntry

@PublicApi
@ParametersAreNonnullByDefault
public class JournalEntry
extends java.lang.Object

Entry in a journal. Journal entries contain a message that should be processed by all nodes at some point of time in the future.

Typical user of journal entries is indexing subsystem, where it's important that indexes on all cluster nodes will be kept in sync. When a document changes, indexing subsystem would create a new journal entry with details of the change. Later on nodes will ask for these entries and then update their indexes accordingly.

Since:
5.6

Constructor Summary
JournalEntry(JournalIdentifier journalId, java.lang.String type, java.lang.String message)
          Creates a new journal entry for persisting.
JournalEntry(long id, JournalIdentifier journalId, java.util.Date creationDate, java.lang.String type, java.lang.String message)
          Creates a new journal entry describing an entry that has been persisted
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.util.Date getCreationDate()
           
 long getId()
           
 JournalIdentifier getJournalId()
           
 java.lang.String getMessage()
           
 java.lang.String getType()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JournalEntry

public JournalEntry(JournalIdentifier journalId,
                    java.lang.String type,
                    @Nullable
                    java.lang.String message)
Creates a new journal entry for persisting.

Parameters:
journalId - id of journal the entry belongs to
type - journal specific type of the entry (max length 255)
message - entry payload (max length 2047)

JournalEntry

public JournalEntry(long id,
                    JournalIdentifier journalId,
                    java.util.Date creationDate,
                    java.lang.String type,
                    @Nullable
                    java.lang.String message)
Creates a new journal entry describing an entry that has been persisted

Parameters:
id - id of the entry
journalId - id of journal the entry belongs to
creationDate - date when the entry was persisted
type - journal specific type of the entry (max length 255)
message - entry payload (max length 2047)
Method Detail

getId

public long getId()

getJournalId

public JournalIdentifier getJournalId()

getCreationDate

public java.util.Date getCreationDate()

getType

public java.lang.String getType()

getMessage

public java.lang.String getMessage()

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2003-2014 Atlassian. All Rights Reserved.