com.atlassian.jira.index.ha
Class OfBizReplicatedIndexOperationStore

java.lang.Object
  extended by com.atlassian.jira.index.ha.OfBizReplicatedIndexOperationStore

public class OfBizReplicatedIndexOperationStore
extends Object

Stores index operation events

Since:
v6.1

Constructor Summary
OfBizReplicatedIndexOperationStore(OfBizDelegator ofBizDelegator)
           
 
Method Summary
 boolean contains(long id)
           
 ReplicatedIndexOperation createIndexOperation(Timestamp indexTime, ReplicatedIndexOperation.AffectedIndex affectedIndex, ReplicatedIndexOperation.SharedEntityType entityType, ReplicatedIndexOperation.Operation operation, Set<Long> affectedIds)
          Creates and stores the index operation in the underlying database, only if the node is in a cluster.
 int deleteOperationsBefore(Date before)
           
 Set<ReplicatedIndexOperation> getIndexOperationsAfter(Date sinceTime)
          Returns a set of IndexOperations that have happened since the time specified.
 Set<ReplicatedIndexOperation> getIndexOperationsAfter(Long id)
          Returns a set of IndexOperations that have happened since the time specified.
 long largestIdForNode(Long nodeId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OfBizReplicatedIndexOperationStore

public OfBizReplicatedIndexOperationStore(OfBizDelegator ofBizDelegator)
Method Detail

createIndexOperation

@Nullable
public ReplicatedIndexOperation createIndexOperation(@Nonnull
                                                              Timestamp indexTime,
                                                              @Nonnull
                                                              ReplicatedIndexOperation.AffectedIndex affectedIndex,
                                                              @Nonnull
                                                              ReplicatedIndexOperation.SharedEntityType entityType,
                                                              @Nonnull
                                                              ReplicatedIndexOperation.Operation operation,
                                                              @Nonnull
                                                              Set<Long> affectedIds)
Creates and stores the index operation in the underlying database, only if the node is in a cluster.

Parameters:
indexTime - time of indexing operation
operation - the ReplicatedIndexOperation.Operation that was performed on the underlying index
affectedIds - Set of issueids that participated in the index opertaion
Returns:
the operation that was inserted into the underlying db - may be null if the node is not clustered

getIndexOperationsAfter

public Set<ReplicatedIndexOperation> getIndexOperationsAfter(Date sinceTime)
Returns a set of IndexOperations that have happened since the time specified.

Parameters:
sinceTime -
Returns:
a set of ReplicatedIndexOperation that have taken place on other nodes after a specified time

deleteOperationsBefore

public int deleteOperationsBefore(Date before)

getIndexOperationsAfter

public Set<ReplicatedIndexOperation> getIndexOperationsAfter(Long id)
Returns a set of IndexOperations that have happened since the time specified.

Parameters:
id -
Returns:
a set of ReplicatedIndexOperation that have taken place on other nodes after a specified id

largestIdForNode

public long largestIdForNode(Long nodeId)
Parameters:
nodeId - The nodeId to check
Returns:
the id of the last IndexOperation that was performed on the replicated index for the specifiednode ID.

contains

public boolean contains(long id)
Parameters:
id - the NodeIndexOperation id to check
Returns:
true if the database contains this index operation


Copyright © 2002-2013 Atlassian. All Rights Reserved.