~ubuntu-branches/ubuntu/trusty/ehcache/trusty

« back to all changes in this revision

Viewing changes to src/main/java/net/sf/ehcache/writer/writebehind/operations/DeleteOperation.java

  • Committer: Package Import Robot
  • Author(s): Emmanuel Bourg
  • Date: 2013-05-06 14:53:07 UTC
  • mfrom: (1.1.7) (2.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20130506145307-v5bhw5yu70re00l3
Tags: 2.6.7-1
* Team upload.
* New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
 
 *  Copyright 2003-2010 Terracotta, Inc.
 
2
 *  Copyright Terracotta, Inc.
3
3
 *
4
4
 *  Licensed under the Apache License, Version 2.0 (the "License");
5
5
 *  you may not use this file except in compliance with the License.
26
26
 * Implements the delete operation for write behind
27
27
 *
28
28
 * @author Geert Bevin
29
 
 * @version $Id: DeleteOperation.java 4467 2011-08-02 10:07:08Z alexsnaps $
 
29
 * @version $Id: DeleteOperation.java 5799 2012-06-15 20:30:56Z twu $
30
30
 */
31
31
public class DeleteOperation implements SingleOperation {
32
32
    private final CacheEntry entry;
119
119
        }
120
120
        cacheWriter.throwAway(element, SingleOperationType.DELETE, e);
121
121
    }
 
122
 
 
123
    /**
 
124
     * {@inheritDoc}
 
125
     */
 
126
    public int hashCode() {
 
127
      return getKey().hashCode();
 
128
    }
 
129
 
 
130
    /**
 
131
     * {@inheritDoc}
 
132
     */
 
133
    public boolean equals(Object other) {
 
134
      if (other instanceof DeleteOperation) {
 
135
        return getCreationTime() == ((DeleteOperation) other).getCreationTime() &&
 
136
                getKey().equals(((DeleteOperation) other).getKey());
 
137
      } else {
 
138
        return false;
 
139
      }
 
140
    }
122
141
}